-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathindex.html
More file actions
32 lines (31 loc) · 1.29 KB
/
index.html
File metadata and controls
32 lines (31 loc) · 1.29 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
/>
<meta name="theme-color" content="#000000" />
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<title>Thunderbolt</title>
</head>
<body>
<script>
// Apply theme before first paint to prevent flash of white on dark mode.
// Must stay in sync with the storageKey and logic in src/lib/theme-provider.tsx.
;(function () {
var theme = localStorage.getItem('ui_theme')
var isDark =
theme === 'dark' || (theme !== 'light' && matchMedia('(prefers-color-scheme: dark)').matches)
document.documentElement.classList.add(isDark ? 'dark' : 'light')
document.documentElement.style.backgroundColor = isDark ? '#0a0a0a' : '#fff'
document.querySelector('meta[name="theme-color"]')?.setAttribute('content', isDark ? '#0a0a0a' : '#fff')
})()
</script>
<div id="root"></div>
<script src="/src/index.tsx" type="module"></script>
</body>
</html>