Add menu highlighting logic via HX-Trigger, update templates for dynamic menu state management, and extend mixins to support menu highlighting.

This commit is contained in:
2026-01-16 23:57:06 +01:00
parent 5898a3ac6d
commit 17e91cd7f8
4 changed files with 28 additions and 2 deletions

View File

@@ -116,6 +116,13 @@
</footer>
<script>
document.body.addEventListener("menuHighlight", (event) => {
const active = event.detail.value;
document.querySelectorAll(".menu-item").forEach(el => {
el.classList.toggle("menu-active", el.dataset.menu === active);
});
});
{% comment %}// Shrinking navbar on scroll
const navbar = document.getElementById("mainNavbar");
let lastScroll = 0; window.addEventListener("scroll", () => {