Update sidebar.

It now is an overlay on mobile
This commit is contained in:
2026-05-17 11:25:05 +02:00
parent fe3522b93b
commit 8244874fe3
6 changed files with 32 additions and 120 deletions
-18
View File
@@ -1,23 +1,5 @@
(function () {
var cal = document.querySelector(".diary-cal");
if (!cal) return;
cal.querySelectorAll(".dropdown > button").forEach(wireDropdown);
var toggle = document.createElement("button");
toggle.type = "button";
toggle.className = "panel-toggle";
toggle.textContent = "Kalender";
toggle.setAttribute("aria-expanded", "false");
toggle.addEventListener("click", function () {
var open = cal.classList.toggle("is-open");
toggle.setAttribute("aria-expanded", open ? "true" : "false");
});
var main = document.querySelector("main");
if (!main) return;
main.parentNode.insertBefore(toggle, main);
if (window.matchMedia("(max-width: 1100px)").matches) {
main.parentNode.insertBefore(cal, main);
}
})();