dopdown added eventlistener

This commit is contained in:
2026-05-08 09:12:39 +02:00
parent 3828c1b746
commit f50d76e033
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -66,6 +66,14 @@ async function loadData() {
const sidebar_top = document.getElementById("sidebar-top-content");
const navbar_mobile = document.getElementById("navbar-mobile");
const button_mobile2 = document.getElementById("button_mobile");
document.addEventListener("click", (e) => {
if (!e.target.closest("navbar-mobile") && button_mobile2.classList.contains("inactive")) {
navbar_mobile.classList.add("inactive");
}
});
const navbar_mobile_links = document.getElementById("navbar-mobile-links");
const button_navbar_mobile = document.createElement("button");
const button_mobile = document.getElementById("button-mobile");
+1 -1
View File
@@ -8,7 +8,7 @@
--serif: Georgia, serif;
--sans: system-ui, sans-serif;
--nav-w: 230px;
--nav-mobile-w: 100px;
--nav-mobile-w: 200px;
--font-size: 1rem;
}