-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (30 loc) · 1.21 KB
/
Copy pathindex.html
File metadata and controls
30 lines (30 loc) · 1.21 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chocks</title>
<meta name="description" content="Track planned and existing features as a tree." />
<script>
// Applies the saved colour mode before first paint. Without this the page renders
// light and then flips, which is unpleasant in a dark room and reads as a bug.
// Runs ahead of React on purpose; it stays in sync with next-themes by using the
// same localStorage key.
try {
var stored = localStorage.getItem('theme') || 'system'
var dark =
stored === 'dark' ||
(stored === 'system' && matchMedia('(prefers-color-scheme: dark)').matches)
document.documentElement.classList.toggle('dark', dark)
document.documentElement.style.colorScheme = dark ? 'dark' : 'light'
} catch (error) {
// Storage can be unavailable in private mode. Falling back to light is fine.
}
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/ui/main.tsx"></script>
</body>
</html>