This commit is contained in:
2026-05-10 21:46:00 +02:00
parent 6e9efd2dbc
commit 02510fb224
11 changed files with 745 additions and 72 deletions

View File

@@ -1,9 +1,9 @@
(function() {
try {
const saved = localStorage.getItem('theme');
const osPref = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
document.documentElement.setAttribute('data-theme', saved || osPref);
const saved = localStorage.getItem("theme");
const osPref = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.setAttribute("data-theme", saved || osPref);
} catch (e) {
document.documentElement.setAttribute('data-theme', 'light');
document.documentElement.setAttribute("data-theme", "light");
}
})();