Dark mode

This commit is contained in:
dingo
2026-04-13 14:31:07 -04:00
parent 218fd0746f
commit e35b14fde1
35 changed files with 372 additions and 77 deletions
+11
View File
@@ -8,6 +8,17 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MAX - @Model.Content.ErrorName</title>
<script>
(function () {
const storageKey = "maintenance-theme";
const storedTheme = localStorage.getItem(storageKey);
const prefersDark = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
const theme = storedTheme || (prefersDark ? "dark" : "light");
document.documentElement.setAttribute("data-theme", theme);
document.documentElement.style.colorScheme = theme;
})();
</script>
<link rel="stylesheet" href="~/css/max_error.css" />
</head>
<body>