-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
36 lines (36 loc) · 1.21 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
<!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.0" />
<title>Vite + React + TS + UnoCSS + shadcn</title>
<script>
!(function () {
var e =
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches,
t = localStorage.getItem("use-dark") || "system";
('"dark"' === t || (e && '"light"' !== t)) &&
document.documentElement.classList.toggle("dark", !0);
})();
</script>
<style>
html.dark {
color-scheme: dark;
}
</style>
</head>
<body class="h-full">
<div id="root" class="h-full"></div>
<script>
!(function () {
var currentColor = localStorage.getItem("currentColor") || '"neutral"';
var currentRadius = localStorage.getItem("currentRadius") || "0.5";
document.body.classList.add(`theme-${currentColor.slice(1, -1)}`);
document.body.style.setProperty("--radius", `${currentRadius}rem`);
})();
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>