forked from jakemor/kanna
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (37 loc) · 1.74 KB
/
Copy pathindex.html
File metadata and controls
38 lines (37 loc) · 1.74 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" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#ffffff" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Kanna" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="icon" type="image/png" sizes="96x96" href="/favicon.png" />
<link rel="icon" type="image/png" sizes="192x192" href="/icon-192.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<script>
(() => {
const storageKey = "lever-theme"
const stored = window.localStorage.getItem(storageKey)
const preference = stored === "light" || stored === "dark" || stored === "system" ? stored : "system"
const resolved = preference === "system"
? (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light")
: preference
const themeColor = resolved === "dark" ? "rgb(33, 34, 35)" : "rgb(255, 255, 255)"
document.documentElement.classList.toggle("dark", resolved === "dark")
document.documentElement.style.colorScheme = resolved
document.querySelector('meta[name="theme-color"]')?.setAttribute("content", themeColor)
document
.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]')
?.setAttribute("content", resolved === "dark" ? "black-translucent" : "default")
})()
</script>
<title>Kanna</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>