Polish planner icons and mobile theme controls
This commit is contained in:
@@ -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`);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user