Dark mode
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user