-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (29 loc) · 726 Bytes
/
index.html
File metadata and controls
29 lines (29 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!doctype html>
<html lang="en">
<head>
<script>
(function () {
try {
var d = document.documentElement;
var s = localStorage.getItem("theme");
var isDark = false;
if (s) {
isDark = s === '"dark"' || s === "dark";
} else {
isDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (isDark) {
localStorage.setItem("theme", '"dark"');
}
}
if (isDark) {
d.setAttribute("data-theme", "dark");
d.classList.add("dark");
}
} catch (e) {}
})();
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>