-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (41 loc) · 1.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta name="theme-color" content="#fff" />
<meta name="description" content="江海寄余生" />
<link rel="icon" href="/favicon.png" />
<link rel="apple-touch-icon" href="/favicon.png" />
<link rel="shortcut icon" href="/favicon.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>兰亭</title>
</head>
<body>
<script>
(function () {
try {
const theme = localStorage.getItem('theme');
if (!theme) return;
document.documentElement.classList.add(theme);
const MetaThemeColor = {
light: '#fff',
dark: '#18191a',
};
const meta = document.querySelector('meta[name="theme-color"]');
meta?.setAttribute('content', MetaThemeColor[theme]);
} catch (e) {}
})();
</script>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>