diff --git a/hugo.toml b/hugo.toml index 4dcf006..b5970ca 100644 --- a/hugo.toml +++ b/hugo.toml @@ -18,7 +18,9 @@ defaultContentLanguage = 'de' description = "" tags = "" author = "Michi von Ah" - faviconPath = "" + legalLink = "https://legal.michivonah.ch" + faviconPath = "assets/logo/favicon_256.png" + faviconPathSVG = "assets/logo/logo_black.svg" themeColor = "#3498db" twitterUsername = "@michivonah" umamiUrl = "https://data.mchvnh.ch/script.js" diff --git a/i18n/de.toml b/i18n/de.toml index ad51089..b05d615 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -6,4 +6,7 @@ projects = 'Projekte' blog = 'Blog' contact = 'Kontakt' logo = 'Logo' -gotop = 'Nach oben!' \ No newline at end of file +gotop = 'Nach oben!' +godown = 'Nach unten!' +language = 'Sprache' +select-language = 'Sprache auswählen' \ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml index d307370..a950ae9 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -6,4 +6,7 @@ projects = 'Projects' blog = 'Blog' contact = 'Contact' logo = 'Logo' -gotop = 'Go to top' \ No newline at end of file +gotop = 'Go to top' +godown = 'Scroll down!' +language = 'Language' +select-language = 'Select language' \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 91e573d..66cd8fc 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/static/main.js b/static/main.js index f96a751..34f02b7 100644 --- a/static/main.js +++ b/static/main.js @@ -3,6 +3,12 @@ document.addEventListener('DOMContentLoaded', function(){ scrollTopVisibilityUpdate(); updateNavStyle(); calculateAge(".age"); + + // add eventlistener to language selector + const languageSelector = document.querySelector(".language-selector"); + languageSelector.addEventListener('change', function(){ + window.location.href = languageSelector.value + window.location.hash; + }); }); window.addEventListener('scroll', function(){ @@ -68,12 +74,12 @@ const observer = new IntersectionObserver(entries => { actionObject.classList.remove('typewriter-animation'); }); - }); +}); - observer.observe(document.querySelector('.contact-title-wrapper')); +observer.observe(document.querySelector('.contact-title-wrapper')); - // calculate age - function calculateAge(selector){ +// calculate age +function calculateAge(selector){ const obj = document.querySelector(selector); const birthdate = obj.getAttribute("data-birthdate").split(","); const birth = new Date(birthdate[2], birthdate[1] - 1, birthdate[0]); @@ -88,4 +94,4 @@ const observer = new IntersectionObserver(entries => { } obj.textContent = age; - } \ No newline at end of file +} \ No newline at end of file diff --git a/static/style.css b/static/style.css index eb9ff02..7c4cdfd 100644 --- a/static/style.css +++ b/static/style.css @@ -80,8 +80,10 @@ nav.small img{ position: relative; } -.nav-links a:hover, nav a:focus{ +.nav-links a:hover, +.nav-links a:focus{ text-decoration: none; + outline: none; } .nav-links a:not(:last-child)::after{ @@ -97,7 +99,8 @@ nav.small img{ transform: scaleX(0); } -.nav-links a:not(:last-child):hover::after{ +.nav-links a:not(:last-child):hover::after, +.nav-links a:not(:last-child):focus::after{ transform: scaleX(0.5); } @@ -115,11 +118,13 @@ nav.small .nav-links a:last-child{ color: var(--primary); } -.nav-links a:last-child:hover{ +.nav-links a:last-child:hover, +.nav-links a:last-child:focus{ background: var(--secondary); } -nav.small .nav-links a:last-child:hover{ +nav.small .nav-links a:last-child:hover, +nav.small .nav-links a:last-child:focus{ background: var(--secondary); color: var(--color); } @@ -269,7 +274,8 @@ nav.small .nav-links a:last-child:hover{ animation: scrollHint 2000ms infinite; } -.hero a:hover{ +.hero a:hover, +.hero a:focus{ filter: drop-shadow(0 0 1.1rem var(--primary)); } @@ -328,8 +334,10 @@ nav.small .nav-links a:last-child:hover{ transition: var(--baseTransition); } -.about a:hover{ +.about a:hover, +.about a:focus{ background: var(--primary); + outline: none; } .about var{ @@ -349,7 +357,9 @@ nav.small .nav-links a:last-child:hover{ align-content: flex-start; align-items: baseline; flex-wrap: wrap; + -webkit-user-select: none; user-select: none; + } .tag{ @@ -575,11 +585,13 @@ nav.small .nav-links a:last-child:hover{ transition: var(--baseTransition); } -.contact a:hover{ +.contact a:hover, +.contact a:focus{ margin: 10px 20px; color: var(--color); text-decoration: none; transform: scale(1.8); + outline: none; } /* SCROLL TOP */ @@ -666,17 +678,21 @@ nav.small .nav-links a:last-child:hover{ transition: var(--baseTransition); } -.footer a:hover{ +.footer a:hover, +.footer a:focus{ color: var(--color); text-decoration: none; + outline: none; } @media (pointer: fine){ - .footer a:hover:has(i){ + .footer a:hover:has(i), + .footer a:focus:has(i){ transform: scale(1.4); } - .footer a:hover:not(:has(i)){ + .footer a:hover:not(:has(i)), + .footer a:focus:not(:has(i)){ transform: scale(1.1); } }