Polish planner icons and mobile theme controls

This commit is contained in:
2026-04-13 14:27:15 +02:00
parent 7faa65d6c9
commit d0d5bad803
15 changed files with 244 additions and 13 deletions
+16 -1
View File
@@ -12,7 +12,22 @@
root.dataset.theme = finalTheme;
toggles().forEach((button) => {
button.textContent = finalTheme === "dark" ? "Hell" : "Dunkel";
const nextModeLabel = finalTheme === "dark" ? "Hell" : "Dunkel";
const label = button.querySelector("[data-theme-label]");
const icon = button.querySelector("[data-theme-icon]");
if (label) {
label.textContent = nextModeLabel;
} else {
button.textContent = nextModeLabel;
}
if (icon) {
icon.classList.toggle("icon-sun-theme", finalTheme === "dark");
icon.classList.toggle("icon-moon-theme", finalTheme !== "dark");
}
button.setAttribute("aria-label", `${nextModeLabel} aktivieren`);
});
};