SHOULD WORK
All checks were successful
Build Org Website / build (push) Successful in 45s

This commit is contained in:
2026-05-07 09:33:39 +01:00
parent 11fbf2f331
commit cc0b739e66
321 changed files with 4 additions and 298 deletions

View File

@@ -151,36 +151,11 @@
});
}
function initModeToggle() {
const root = document.documentElement;
const button = document.getElementById("db-mode-toggle");
const label = document.getElementById("db-mode-label");
if (!root || !button) return;
const storageKey = "db-mode";
const saved = localStorage.getItem(storageKey);
const setMode = (mode) => {
const isRetro = mode === "retro";
root.dataset.mode = isRetro ? "retro" : "normal";
button.setAttribute("aria-pressed", String(isRetro));
button.setAttribute("title", isRetro ? "Switch to normal mode" : "Switch to retro mode");
if (label) label.textContent = isRetro ? "Normal mode" : "Retro mode";
localStorage.setItem(storageKey, root.dataset.mode);
};
setMode(saved === "retro" ? "retro" : "normal");
button.addEventListener("click", () => {
setMode(root.dataset.mode === "retro" ? "normal" : "retro");
});
}
function init() {
updateGreeting();
updateClock();
updateStats();
initCommandFilter();
initModeToggle();
setInterval(updateClock, 1000);
loadFeed("/blogs/blogs-list.html", "db-feed-blogs", 6, "/blogs");