-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (39 loc) · 1.57 KB
/
index.html
File metadata and controls
41 lines (39 loc) · 1.57 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
39
40
41
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<meta name="description" content="nonogram" />
<meta name="keywords" content="nonogram" />
<title>nonogram</title>
<link rel="manifest" href="/manifest.json" />
<link href="/icons/icon-16x16.png" rel="icon" type="image/png" sizes="16x16" />
<link href="/icons/icon-32x32.png" rel="icon" type="image/png" sizes="32x32" />
<meta name="theme-color" content="#000000" />
<script>
const m = window.matchMedia('(prefers-color-scheme: dark)');
const theme = (() => {
if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) return localStorage.getItem('theme');
if (m.matches) return 'dark';
return 'system';
})();
if (theme === 'dark' || (theme === 'system' && m.matches)) document.documentElement.classList.add('dark');
m.addEventListener('change', (e) => {
if ((localStorage.getItem('theme') || 'system') !== 'system') return;
if (e.matches) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
});
</script>
</head>
<body class="h-full tabular-nums dark:bg-black">
<div id="root" class="flex h-full flex-col"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>