first commit

This commit is contained in:
anael committed 2026-11-08 15:17:21 +01:00
commit b903eb32cf
61 files changed
+17306

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
// The section must not be in the banner.js (body) file because it can create a quick flash.
//
;
// The section must not be in the theme.js (body) file because it can create a quick flash (switch between light and dark).
function setTheme(theme) {
document.documentElement.classList.remove("light", "dark");
if (theme !== "light" && theme !== "dark") {
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
document.documentElement.classList.add(theme);
document.documentElement.style.colorScheme = theme;
}
setTheme("color-theme" in localStorage ? localStorage.getItem("color-theme") : 'dark')