This commit is contained in:
Enrico Bühler 2024-07-01 21:51:57 +02:00
parent 84dde04352
commit 8ed037123c

View File

@ -64,6 +64,7 @@ import { Menu } from "lucide-astro";
const navMobile = document.getElementById("nav-mobile")!;
const navButtons = navMobile.children;
const init = () => {
button.addEventListener("click", () => {
if (navMobile.classList.contains("hidden")) {
animate(
@ -86,4 +87,11 @@ import { Menu } from "lucide-astro";
navMobile.classList.toggle("hidden");
});
};
init();
document.addEventListener("astro:after-swap", () => {
init();
});
</script>