Repository navigation
Expand file tree
/
Copy pathplayer.html
More file actions
189 lines (185 loc) · 5.14 KB
/
Copy pathplayer.html
File metadata and controls
189 lines (185 loc) · 5.14 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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="icon.svg" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no"
/>
<meta name="theme-color" content="#f5f5f7" />
<title>MusicStorm · 网页版在线音乐播放器</title>
<script>
(function () {
var KEY = "musicstorm-theme";
function systemDark() {
return window.matchMedia("(prefers-color-scheme: dark)").matches;
}
function apply() {
var stored = null;
try {
stored = window.localStorage.getItem(KEY);
} catch (e) {
/* 存储不可用时回退系统 */
}
var resolved =
stored === "light" || stored === "dark"
? stored
: systemDark()
? "dark"
: "light";
var root = document.documentElement;
root.classList.toggle("dark", resolved === "dark");
root.dataset.theme = resolved;
}
apply();
// system 模式下跟随系统明暗切换
var media = window.matchMedia("(prefers-color-scheme: dark)");
function onSystemChange() {
var stored = null;
try {
stored = window.localStorage.getItem(KEY);
} catch (e) {
/* ignore */
}
if (stored !== "light" && stored !== "dark") {
apply();
}
}
if (media.addEventListener) {
media.addEventListener("change", onSystemChange);
} else if (media.addListener) {
media.addListener(onSystemChange);
}
})();
</script>
<style>
#boot-loading {
position: fixed;
inset: 0;
z-index: 9999;
display: grid;
place-items: center;
overflow: hidden;
background: radial-gradient(
130% 130% at 50% 26%,
#fafafa 0%,
#f2f2f4 55%,
#ecedef 100%
);
font-family:
-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui,
sans-serif;
-webkit-user-select: none;
user-select: none;
}
#boot-loading .hero {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
max-width: min(86vw, 560px);
padding: 0 24px;
animation: boot-hero-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#boot-loading .logo {
width: 88px;
height: 88px;
margin-bottom: 30px;
border-radius: 22px;
object-fit: cover;
box-shadow:
0 18px 40px rgba(0, 0, 0, 0.14),
0 2px 6px rgba(0, 0, 0, 0.06);
}
#boot-loading h1 {
margin: 0;
font-size: clamp(34px, 6vw, 46px);
font-weight: 700;
line-height: 1.04;
letter-spacing: -0.04em;
color: #1d1d1f;
}
#boot-loading p {
margin: 14px 0 0;
font-size: 15px;
letter-spacing: -0.01em;
color: rgba(60, 60, 67, 0.62);
}
#boot-loading .progress {
margin-top: 40px;
width: 168px;
height: 3px;
border-radius: 999px;
background: rgba(0, 0, 0, 0.08);
overflow: hidden;
}
#boot-loading .progress > i {
display: block;
height: 100%;
width: 42%;
border-radius: inherit;
background: #1d1d1f;
animation: boot-slide 1.15s ease-in-out infinite;
}
html[data-theme="dark"] #boot-loading {
background: radial-gradient(
130% 130% at 50% 26%,
#1e1e20 0%,
#19191b 55%,
#151517 100%
);
}
html[data-theme="dark"] #boot-loading h1 {
color: #f5f5f7;
}
html[data-theme="dark"] #boot-loading p {
color: rgba(235, 235, 245, 0.58);
}
html[data-theme="dark"] #boot-loading .progress {
background: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] #boot-loading .progress > i {
background: #f5f5f7;
}
@keyframes boot-hero-in {
from {
opacity: 0;
transform: translateY(10px) scale(0.985);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes boot-slide {
0% {
transform: translateX(-120%);
}
100% {
transform: translateX(280%);
}
}
@media (prefers-reduced-motion: reduce) {
#boot-loading .hero {
animation: none;
}
#boot-loading .progress > i {
animation-duration: 3.5s;
}
}
</style>
</head>
<body>
<div id="boot-loading">
<div class="hero">
<img class="logo" src="icon.png" alt="MusicStorm" draggable="false" />
<h1>MusicStorm</h1>
<p>正在加载网页版…</p>
<div class="progress" aria-hidden="true"><i></i></div>
</div>
</div>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>