forked from yml2213/Y-Nav
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (35 loc) · 1.34 KB
/
index.html
File metadata and controls
38 lines (35 loc) · 1.34 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="https://lucide.dev/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script>
(function () {
try {
var stored = localStorage.getItem('theme');
var mode = stored === 'light' || stored === 'dark' || stored === 'system' ? stored : 'system';
var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
var shouldDark = mode === 'dark' || (mode === 'system' && prefersDark);
var root = document.documentElement;
if (shouldDark) {
root.classList.add('dark');
root.style.backgroundColor = '#05070f';
document.body.style.backgroundColor = '#05070f';
} else {
root.classList.remove('dark');
root.style.backgroundColor = '#f8fafc';
document.body.style.backgroundColor = '#f8fafc';
}
} catch (e) {
// Ignore and fall back to default styling.
}
})();
</script>
<title>元启 Y-Nav</title>
</head>
<body class="bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 transition-colors duration-300">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>