In header.html:
Added IDs to navigation links Added script to hide expertise and contact links on non-index pages Kept the Start link visible on all pages to return to homepage In components.js: Fixed the COMPONENTS_LOADED_EVENT declaration to prevent duplicate declaration error Added condition to only enable scroll behavior on index page Kept component loading logic but made it more robust
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
</div>
|
||||
|
||||
<nav class="nav-menu">
|
||||
<a href="#intro">Start</a>
|
||||
<a href="#services">Expertise</a>
|
||||
<a href="#contact">Kontakt</a>
|
||||
<a href="/" id="start-link">Start</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-moon"></i>
|
||||
</button>
|
||||
@@ -19,4 +19,11 @@
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user