-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (31 loc) · 1.03 KB
/
Copy pathindex.html
File metadata and controls
31 lines (31 loc) · 1.03 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="./logo.svg" />
<title>Solid Mobile — Component Library</title>
<script>
// 在渲染前读取暗色模式标志,防止闪白
(function() {
var isDark = localStorage.getItem('sc-docs-dark-mode') === '1';
if (!isDark) {
isDark = new URLSearchParams(location.search).get('dark') === '1';
}
if (!isDark) {
try { isDark = matchMedia('(prefers-color-scheme:dark)').matches; } catch(e) {}
}
if (isDark) document.documentElement.classList.add('dark');
})();
</script>
<style>
/* 隐藏滚动条但保留滚动 */
html { -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>