generated from innei-template/vite-react-tailwind-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
61 lines (60 loc) · 1.63 KB
/
index.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Linear</title>
<script>
function setTheme() {
let e = 'color-mode',
t = document.documentElement,
a = localStorage.getItem(e)
function h() {
return window.matchMedia
? window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: window.matchMedia('(prefers-color-scheme: light)').matches
? 'light'
: void 0
: void 0
}
if (!a) {
t.dataset.theme = h() || 'light'
return
}
switch ((a = JSON.parse(a))) {
case 'dark':
t.dataset.theme = 'dark'
break
case 'light':
t.dataset.theme = 'light'
break
case 'system':
t.dataset.theme = h() || 'light'
}
}
setTheme()
</script>
<style>
#skeleton {
position: fixed;
top: 0;
left: 0;
width: 256px;
height: 100%;
background-color: hsl(var(--sidebar) / var(--tw-bg-opacity, 1));
display: flex;
flex-direction: column;
grow: 1;
inset: 0;
z-index: 2;
}
</style>
</head>
<body class="flex h-full flex-col">
<div id="skeleton"></div>
<div id="root" class="flex h-full flex-col"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>