pyro/static/js/logic.js
Freyja Wildes cf7ae7c681 [style][template] Make the theme simpler and more consistent
- Make colors simpler and avoid poping color background. Adding more
  unity to the design and better consistency in color use. This
  simplifies the CSS rules
- "begin" and "end" links are always visible. If they make no sense,
  it's a dummy link that isn't a <a> element
- Manipulate visibility of the <nav> element for the stack menu instead
  of the <menu>. It's more consistent like that. Change logic
  accordingly.
2025-07-15 20:19:27 +02:00

15 lines
590 B
JavaScript

document.getElementById("menu-button").addEventListener("click", onClickMenu)
document.getElementById("return-button").addEventListener("click", onClickMenu)
function onClickMenu(event) {
var menu = document.getElementById("nav-stack");
var body = document.querySelector("body");
var html = document.querySelector("html");
if (menu.classList.toggle('active')) {
body.classList.add("overflowHidden");
html.classList.add("overflowHidden");
} else {
body.classList.remove("overflowHidden");
html.classList.remove("overflowHidden");
}
}