-
Notifications
You must be signed in to change notification settings - Fork 169
/
index.html
77 lines (69 loc) · 1.89 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="description"
content="Github Stars Repositories Manager, A must-have repository management tool for developers">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base target="_blank" />
<title>Gitstars</title>
<style>
html,
body {
height: 100%;
overflow: hidden;
}
#app {
height: 100%;
display: flex;
color: #333;
}
.loader {
position: fixed;
top: 50%;
left: 50%;
width: 48px;
height: 48px;
margin-top: -48px;
margin-left: -24px;
border: 5px solid;
border-color: #948aec transparent;
border-radius: 50%;
display: inline-block;
box-sizing: border-box;
animation: rotation 1s linear infinite;
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div id="app">
<span class="loader"></span>
<div style="display: none"
class="app-error fixed left-1/2 top-1/2 inline-block -translate-x-1/2 -translate-y-full bg-white">
<div class="mb-8 text-7xl font-bold text-[#948aec]">Sorry...</div>
<div class="mb-2 text-[#76d0a3]">出现一些异常,请刷新页面。</div>
<div class="text-gray-400">"<span class="error-content"></span>"</div>
</div>
</div>
<script>
function onAppError(err) {
document.querySelector('.app-error').style.display = 'block';
var errorContent = err.message + '.';
if (err.response?.statusText) {
errorContent += ` ${err.response.statusText}`;
}
document.querySelector('.error-content').textContent = errorContent;
}
</script>
<script type="module" src="/src/main.js"></script>
</body>
</html>