style: format JSON and JavaScript files for improved readability and consistency

style(mobile-navbar.js): format code for consistency and improve readability by adding semicolons and proper indentation
This commit is contained in:
2025-08-27 18:14:10 +02:00
parent 1dfdcd271c
commit d8f53890d2
4 changed files with 169 additions and 171 deletions

View File

@@ -1,26 +1,24 @@
const burger = document.querySelector(".hamburger")
const links = document.querySelector(".links")
const body = document.querySelector("body")
const main = document.querySelector("main")
const burger = document.querySelector(".hamburger");
const links = document.querySelector(".links");
const body = document.querySelector("body");
const main = document.querySelector("main");
let shown = false
let shown = false;
burger.addEventListener("click", (e) => {
e.preventDefault()
if (!shown) {
links.style.display = "flex"
body.classList.add("disable-scroll")
burger.textContent = "x"
main.style.visibility = "hidden"
} else {
links.style.display = "none"
body.classList.remove("disable-scroll")
burger.textContent = "☰"
main.style.visibility = "visible"
}
shown = !shown
})
e.preventDefault();
if (!shown) {
links.style.display = "flex";
body.classList.add("disable-scroll");
burger.textContent = "x";
main.style.visibility = "hidden";
} else {
links.style.display = "none";
body.classList.remove("disable-scroll");
burger.textContent = "☰";
main.style.visibility = "visible";
}
shown = !shown;
});