Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Heywood 46defc69d1
be more specific on css selector 2025-03-22 23:17:23 -04:00
Anton Livaja e81f052317
make avtive button in nav bar white 2025-03-22 19:56:37 -07:00
2 changed files with 24 additions and 0 deletions

View File

@ -29,4 +29,24 @@
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
let pathSegment = window.location.pathname.split('/')[1];
if (pathSegment.endsWith('.html')) {
pathSegment = pathSegment.replace('.html', '');
}
const navLinks = document.querySelectorAll('.header-page-links li a');
navLinks.forEach(link => {
let linkPath = link.getAttribute('href').replace('/', '').replace('.html', '');
if (linkPath === pathSegment) {
link.classList.add('active');
}
});
});
</script>
</header>

View File

@ -504,6 +504,10 @@ hr {
transition: transform 0.5s ease;
}
.header-page-links a.active {
color: white;
}
.header-page-links a:hover {
transform: translateY(-2px);
background-color: transparent;