forked from SeaLantern-Studio/SeaLantern
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (36 loc) · 1.16 KB
/
index.html
File metadata and controls
38 lines (36 loc) · 1.16 KB
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
30
31
32
33
34
35
36
37
38
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/assets/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sea Lantern</title>
<link rel="stylesheet" href="/src/styles/initial.css" />
<script>
(function () {
var theme = "auto";
var fontSize = 14;
try {
var cached = localStorage.getItem("sl_theme_cache");
if (cached) {
var parsed = JSON.parse(cached);
if (parsed.theme) theme = parsed.theme;
if (parsed.fontSize) fontSize = parsed.fontSize;
}
} catch (e) {}
var effectiveTheme = theme;
if (theme === "auto") {
effectiveTheme = window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
}
document.documentElement.setAttribute("data-theme", effectiveTheme);
document.documentElement.style.fontSize = fontSize + "px";
})();
</script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>