-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
127 lines (105 loc) · 2.75 KB
/
404.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>404</title>
<!-- Styles -->
<style>
html {
font-size: 3vmin;
}
body {
margin: 0;
padding: 0;
height: 100vh;
min-height: 100px;
min-width: 300px;
display: flex;
justify-content: center;
align-items: center;
}
#d1 {
display: flex;
justify-content: center;
align-items: center;
height: 20vmin;
}
#logo {
margin: 1em;
order: 1;
height: 100%;
}
#d2 {
margin: 1em;
order: 2;
height: 100%;
display: flex;
flex-direction: column;
}
#h404 {
margin: 0;
order: 1;
font-size: 3em;
height: 60%;
}
#text {
margin: 0;
order: 2;
font-size: 1em;
height: 20%;
}
#countdownDiv {
order: 3;
height: 20%;
display: flex;
}
#countdown {
margin: 0;
order: 1;
font-size: 0.8em;
}
#countdownText {
margin: 0;
margin-left: 0.2em;
order: 2;
font-size: 0.8em;
}
</style>
</head>
<body>
<div id="d1">
<img src="image/logo/cnss-text.png" id="logo">
<div id="d2">
<h1 id="h404">404</h1>
<p id="text">这里没有 FLAG 喵 ~</p>
<div id="countdownDiv">
<span id="countdown">10</span>
<span id="countdownText">s 后返回主页</span>
</div>
</div>
</div>
<!-- 10s后重定向 -->
<script>
var countdownElement = document.getElementById("countdown");
var countdownValue = parseInt(countdownElement.innerText);
var countdownInterval = setInterval(function () {
countdownValue--;
countdownElement.innerText = countdownValue;
if (countdownValue <= 0) {
clearInterval(countdownInterval);
window.location.href = "/";
}
}, 1000);
</script>
<!-- 跟随暗色 -->
<script>
var prefersDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (prefersDarkMode) {
// Apply the inverted color style
document.body.style.backgroundColor = "black";
document.body.style.color = "white";
}
</script>
</body>
</html>