-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
407 lines (356 loc) · 11.1 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JsDelivr中国镜像站</title>
<meta name="description" content='由梦泽搭建的jsDelivr反代镜像站,样式来自tailwindcss可以使用Vercel搭建绑定自己的域名。有搜索npm包等多种功能https://jsdelivrcn.dev.tc/'>
<meta name="keywords" content="jsDelivr,林梦泽,反代镜像站">
<meta name="anthor" content="梦泽,[email protected]">
<style>
:root {
--primary: #2A5C82;
--secondary: #5BA4E6;
--accent: #0d6efd;
--light: #F8F9FA;
--header-height: 70px;
--shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--border-radius: 6px;
--transition: 0.3s ease;
}
body.dark-mode {
--primary: #1e1e1e;
--secondary: #444;
--accent: #0d6efd;
--light: #121212;
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
line-height: 1.6;
background: var(--light);
color: #333;
transition: background var(--transition), color var(--transition);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* 顶部导航 */
header {
background: rgba(42, 92, 130, 0.9);
color: white;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: var(--header-height);
z-index: 1000;
box-shadow: var(--shadow);
transition: background var(--transition);
}
body.dark-mode header {
background: rgba(30, 30, 30, 0.9);
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-logo {
font-size: 1.6rem;
font-weight: bold;
}
.nav-links {
display: flex;
gap: 1.5rem;
}
.nav-links a {
color: white;
text-decoration: none;
font-size: 1rem;
transition: color var(--transition);
}
.nav-links a:hover {
color: var(--secondary);
}
body.dark-mode .nav-links a:hover {
color: var(--accent);
}
.hamburger {
display: none;
flex-direction: column;
justify-content: space-between;
width: 25px;
height: 18px;
cursor: pointer;
transition: transform var(--transition);
}
.hamburger span {
display: block;
height: 3px;
background: white;
border-radius: var(--border-radius);
transition: all var(--transition);
}
.mobile-menu {
display: none;
flex-direction: column;
gap: 1rem;
background: rgba(42, 92, 130, 0.95);
padding: 1rem;
text-align: center;
transition: max-height var(--transition) ease;
overflow: hidden;
}
.mobile-menu a {
color: white;
text-decoration: none;
font-size: 1.2rem;
}
.mobile-menu.active {
display: flex;
}
body.dark-mode .mobile-menu {
background: rgba(30, 30, 30, 0.95);
}
.hero {
height: calc(100vh - var(--header-height));
padding-top: var(--header-height);
background: linear-gradient(rgba(42, 92, 130, 0.8), rgba(42, 92, 130, 0.8)),
url('https://picsum.photos/1920/1080') center/cover no-repeat;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: white;
transition: background var(--transition);
}
body.dark-mode .hero {
background: linear-gradient(rgba(30, 30, 30, 0.8), rgba(30, 30, 30, 0.8)),
url('https://picsum.photos/1920/1080') center/cover no-repeat;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1rem;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero p {
font-size: 1.2rem;
margin-bottom: 1.5rem;
line-height: 1.5;
text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.btn {
background: white;
color: var(--accent);
padding: 0.8rem 1.5rem;
border: none;
border-radius: var(--border-radius);
cursor: pointer;
font-weight: bold;
text-decoration: none;
transition: background var(--transition), transform var(--transition);
}
.btn:hover {
background: #f0f0f0;
transform: translateY(-2px);
}
.container {
max-width: 1200px;
margin: 2rem auto;
padding: 0 1rem;
}
#about, #contact {
margin-bottom: 2rem;
transition: background var(--transition), color var(--transition);
}
body.dark-mode #about,
body.dark-mode #contact {
color: #ddd;
}
#about h2, #contact h2 {
color: var(--accent);
margin-bottom: 1rem;
text-align: center;
}
#about p {
margin-bottom: 1rem;
}
code{
background: #CFCFCF;
border-radius: 3px;
padding: 1px;
font-family: Consolas, monospace;
}
pre {
background: #CFCFCF;
padding: 1rem;
border-radius: 4px;
overflow-x: auto;
font-family: Consolas, monospace;
margin: 1rem 0;
transition: background var(--transition), color var(--transition);
}
body.dark-mode code{
background: #333;
border-radius: 3px;
padding: 1px;
font-family: Consolas, monospace;
}
body.dark-mode pre {
background: #333;
color: #eee;
}
form button {
background: var(--accent);
color: white;
padding: 0.8rem 1.5rem;
border: none;
border-radius: var(--border-radius);
cursor: pointer;
font-size: 1rem;
transition: background var(--transition);
}
form button:hover {
background: #0056b3;
}
footer {
background: #333;
color: white;
text-align: center;
padding: 1rem;
font-size: 0.9rem;
}
body.dark-mode footer {
background: #222;
}
.dark-mode-toggle {
background: none;
border: 1px solid white;
border-radius: var(--border-radius);
color: white;
padding: 0.3rem 0.6rem;
cursor: pointer;
font-size: 0.9rem;
transition: background var(--transition), transform var(--transition);
}
.dark-mode-toggle:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.hamburger {
display: flex;
}
.hero h1 {
font-size: 2rem;
}
.hero p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<header>
<div class="nav-container">
<div class="nav-logo">JsDelivr中国镜像站</div>
<nav class="nav-links">
<a href="https://yzeblog.dev.tc">站长博客</a>
<a href="https://linexic.top">LineXic博客</a>
<a href="https://jsdelivr.dev.tc/en">English</a>
<a href="https://blogecho.zeimg.top">BlogEcho</a>
<a href="mailto:[email protected]">联系站长</a>
<button class="dark-mode-toggle" id="darkModeToggle">暗色模式</button>
</nav>
<div class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div class="mobile-menu" id="mobileMenu">
<a href="https://yzeblog.dev.tc">站长博客</a>
<a href="https://linexic.top">LineXic博客</a>
<a href="https://jsdelivr.dev.tc/en">English</a>
<a href="https://blogecho.zeimg.top">BlogEcho</a>
<a href="mailto:[email protected]">联系站长</a>
<!-- 移动端也添加切换按钮 -->
<button class="dark-mode-toggle" id="darkModeToggleMobile">暗色模式</button>
</div>
</header>
<section class="hero">
<div>
<h1>JsDelivr China Mirror Site</h1>
<p>
中国大陆地区优化的 jsDelivr CDN 加速服务<br>
由 <a href="https://yzeblog.dev.tc" style="color: white; text-decoration: underline;">@梦泽</a> 和
<a href="https://linexic.top" style="color: white; text-decoration: underline;">@LineXic</a> 提供
</p>
<a href="#contact" class="btn">立即使用</a>
</div>
</section>
<div class="container">
<section id="about">
<h1>如何使用本镜像站?</h1>
<p>若您需要使用加速服务,只需将 jsDelivr 链接中的 <code>cdn.jsdelivr.net</code> 替换为 <code>jsdelivrcn.dev.tc</code>即可。比如:</p>
<p><pre>https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js</pre></p>
<p>替换后变为:</p>
<p><pre>https://jsdelivrcn.dev.tc/npm/[email protected]/dist/jquery.min.js</pre></p>
<p>若想访问项目文件夹,请使用如下格式:</p>
<p><pre>https://jsdelivrcn.dev.tc/npm/包名@版本/</pre></p>
<p>示例:</p>
<p><pre>https://jsdelivrcn.dev.tc/npm/[email protected]/</pre></p>
<hr>
<br>
<p>为了确保服务的稳定性与合规性,使用本镜像站时请遵守以下规定:</p>
<ul class="list-disc pl-6">
<li><b>不得 </b> 加速或传播违反中国大陆法律法规的内容,包括但不限于色情、暴力、政治敏感信息等。</li>
<li>镜像站提供 <b>稳定加速服务</b>,但不对长期可用性做保证。</li>
<li>如需清除缓存,请参考 <a href="https://www.jsdelivr.com" class="text-blue-500 hover:underline">jsDelivr 官方指南</a>。</li>
</ul>
<p>项目开源地址:<a href="https://github.com/YShenZe/vercel-jsdelivr-mirror" target="_blank" style="color: var(--accent); text-decoration: underline;">GitHub 仓库</a></p>
</section>
</div>
<footer>
<p>© 2024 梦泽的 jsDelivr 镜像站 · 基于开源项目运行</p>
</footer>
<script>
const hamburger = document.getElementById('hamburger');
const mobileMenu = document.getElementById('mobileMenu');
hamburger.addEventListener('click', () => {
mobileMenu.classList.toggle('active');
hamburger.classList.toggle('open');
});
const darkModeToggle = document.getElementById('darkModeToggle');
const darkModeToggleMobile = document.getElementById('darkModeToggleMobile');
if (localStorage.getItem('darkMode') === 'enabled') {
document.body.classList.add('dark-mode');
darkModeToggle.textContent = '亮色模式';
darkModeToggleMobile.textContent = '亮色模式';
}
function toggleDarkMode() {
document.body.classList.toggle('dark-mode');
const isDark = document.body.classList.contains('dark-mode');
darkModeToggle.textContent = isDark ? '亮色模式' : '暗色模式';
darkModeToggleMobile.textContent = isDark ? '亮色模式' : '暗色模式';
localStorage.setItem('darkMode', isDark ? 'enabled' : 'disabled');
}
darkModeToggle.addEventListener('click', toggleDarkMode);
darkModeToggleMobile.addEventListener('click', () => {
mobileMenu.classList.remove('active');
toggleDarkMode();
});
</script>
<script defer src="https://u.linexic.top/script.js" data-website-id="a65d7910-4945-4632-ad13-b5f65c378919"></script>
</body>
</html>