-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (51 loc) · 1.96 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
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=/online-client-home-page/" />
<title>Loading - Wey micro code</title>
<link rel="shortout icon" href="https://static.codemao.cn/coco/player/unstable/HyQ03K_B6.image/png?hash=FucjYUqms5o4oQUizh6fgNC90s4y"/>
<style>
.loading {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.loading img {
width: 150px;
height: 150px;
}
</style>
<body>
<div class="loading">
<img id="light" style="display: none" src="https://static.codemao.cn/coco/player/unstable/r1kzcHora.image/png?hash=FtOvyhfjXplgHdZWGC9cCoHhySxQ" alt="" />
<img id="dark" style="display: none" src="https://static.codemao.cn/coco/player/unstable/r1kzcHora.image/png?hash=FtOvyhfjXplgHdZWGC9cCoHhySxQ" alt="" />
<script>
switch (localStorage.getItem("theme")) {
case "亮色模式":
document.querySelector(".loading").style.background = "#ffffff";
document.querySelector(".loading #light").style.display = "block";
break;
case "暗黑模式":
document.querySelector(".loading").style.background = "#17171A";
document.querySelector(".loading #dark").style.display = "block";
break;
default:
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
document.querySelector(".loading").style.background = "#17171A";
document.querySelector(".loading #dark").style.display = "block";
} else {
document.querySelector(".loading").style.background = "#ffffff";
document.querySelector(".loading #light").style.display = "block";
}
}
</script>
</div>
<div id="app"></div>
</body>
</html>