-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (51 loc) · 2.02 KB
/
index.html
File metadata and controls
58 lines (51 loc) · 2.02 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html class="body--light">
<head>
<title>
<%= productName %>
</title>
<meta charset="utf-8" />
<meta name="description" content="<%= productDescription %>" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>" />
<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png" />
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png" />
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png" />
<link rel="icon" type="image/ico" href="favicon.ico" />
<!-- 预设暗色模式以避免闪烁 -->
<script>
(function () {
try {
const settings = JSON.parse(localStorage.getItem('jei.settings'));
if (settings && settings.darkMode) {
const darkMode = settings.darkMode;
const html = document.documentElement;
const body = document.body;
if (darkMode === 'dark') {
html.classList.remove('body--light');
html.classList.add('body--dark');
body.classList.remove('body--light');
body.classList.add('body--dark');
} else if (darkMode === 'auto') {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (prefersDark) {
html.classList.remove('body--light');
html.classList.add('body--dark');
body.classList.remove('body--light');
body.classList.add('body--dark');
}
}
}
} catch (e) {
// 如果 localStorage 读取失败,保持默认的亮色模式
}
})();
</script>
</head>
<body>
<!-- quasar:entry-point -->
</body>
</html>