language switch functionality added

This commit is contained in:
ben7sys
2024-11-25 00:17:13 +01:00
parent 083e9fd771
commit 558df41289
14 changed files with 579 additions and 108 deletions

View File

@@ -10,10 +10,16 @@
<a href="index.html" id="start-link">Home</a>
<a href="#services" id="expertise-link">Expertise</a>
<a href="#contact" id="contact-link">Kontakt</a>
<button class="theme-toggle" aria-label="Theme Toggle">
<i class="fas fa-sun"></i>
<i class="fas fa-moon"></i>
</button>
<div class="nav-controls">
<div class="language-switcher">
<button class="lang-btn" data-lang="de">DE</button>
<button class="lang-btn" data-lang="en">EN</button>
</div>
<button class="theme-toggle" aria-label="Theme Toggle">
<i class="fas fa-sun"></i>
<i class="fas fa-moon"></i>
</button>
</div>
</nav>
<button class="mobile-menu-toggle" aria-label="Toggle Menu">
@@ -21,11 +27,4 @@
</button>
</div>
<div class="header-horizontal-line"></div>
<script>
// Hide expertise and contact links on non-index pages
if (window.location.pathname !== '/' && window.location.pathname !== '/index.html') {
document.getElementById('expertise-link').style.display = 'none';
document.getElementById('contact-link').style.display = 'none';
}
</script>
</header>