-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
33 lines (33 loc) · 1.1 KB
/
Copy pathindex.html
File metadata and controls
33 lines (33 loc) · 1.1 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
<!doctype html>
<html lang="en">
<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>TradeNest</title>
<script>
// Apply theme before React mounts to avoid flash
(function () {
try {
var saved = localStorage.getItem('theme');
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var isDark = saved === 'dark' || (saved !== 'light' && prefersDark);
var html = document.documentElement;
var body = document.body;
html.setAttribute('data-theme', isDark ? 'dark' : 'light');
if (isDark) {
html.classList.add('dark');
body.classList.add('dark');
} else {
html.classList.remove('dark');
body.classList.remove('dark');
}
} catch (_) {}
})();
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>