M assets/sass/_layout_responsive.scss => assets/sass/_layout_responsive.scss +4 -1
@@ 14,7 14,6 @@
justify-content: center;
padding: 10px;
width: 100%;
- border-top: 1px solid #1b1b1b;
background-color: white;
font-size: 14px;
text-align: center;
@@ 24,6 23,10 @@
flex-direction: column;
row-gap: 6px;
color: #1b1b1b;
+
+ &.active {
+ color: #bf3211;
+ }
}
}
M script/navigation.js => script/navigation.js +4 -2
@@ 8,10 8,12 @@
rect.bottom >= document.documentElement.clientHeight / 2;
document
- .querySelector(
+ .querySelectorAll(
`nav a[href='#${element.getAttribute("data-trigger-nav")}']`
)
- .classList.toggle("active", isInViewport);
+ .forEach((element) => {
+ element.classList.toggle("active", isInViewport);
+ });
});
};
document.addEventListener("scroll", handler);