theme : dark par défaut, ignore la préférence système

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-31 19:00:16 +02:00
parent 7efa08b269
commit 425073cff0

View file

@ -2,10 +2,7 @@ const root = document.documentElement;
function initTheme() {
const storedPreference = localStorage.getItem("theme");
const systemPrefersDark = window.matchMedia(
"(prefers-color-scheme: dark)"
).matches;
const theme = storedPreference || (systemPrefersDark ? "dark" : "light");
const theme = storedPreference || "dark";
root.setAttribute("data-theme", theme);
}