5
0
mirror of https://github.com/AJMicke/KickerELO.git synced 2026-03-12 05:51:05 +01:00

Rotated labels on the graph, and first attempt at dark mode

This commit is contained in:
Anton Micke
2025-02-07 23:45:05 +01:00
parent ff17b0444c
commit b5c2f2f21d
3 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
window.applyTheme = () => {
const theme = window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "";
document.documentElement.setAttribute("theme", theme);
};
window
.matchMedia("(prefers-color-scheme: dark)")
.addEventListener('change', function () {
window.applyTheme()
});
window.applyTheme();