blob: 5893110ddddc6163a5b62380323557f84c777889 (
plain) (
blame)
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>
<meta charset="utf-8"/>
<link rel="icon"
href="%sveltekit.assets%/favicon.png"/>
<script>
const value = `; ${document.cookie}`;
const parts = value.split(`; go_theme=`);
let currentTheme = "system";
if (parts.length === 2) {
currentTheme = parts.pop().split(";").shift();
}
if (currentTheme === "light") {
document.querySelector("html").dataset.theme = "light";
} else if (currentTheme === "dark") {
document.querySelector("html").dataset.theme = "dark";
} else {
document.querySelector("html").dataset.theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
</script>
<meta name="viewport"
content="width=device-width, initial-scale=1"/>
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
</body>
</html>
|