-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathindex.html
More file actions
532 lines (468 loc) · 15.3 KB
/
index.html
File metadata and controls
532 lines (468 loc) · 15.3 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
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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html>
<html lang="zh-CN" class="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="./assets/favicon.ico" type="image/x-icon" />
<title>AdBlock Acceleration - 规则索引</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet">
<!-- Tailwind CSS (CDN for simplicity) -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
heading: ['Space Grotesk', 'sans-serif'],
body: ['DM Sans', 'sans-serif'],
},
colors: {
primary: '#3B82F6',
secondary: '#1E293B',
'cta': '#2563EB',
background: '#0F172A',
surface: '#1E293B',
border: '#334155',
},
animation: {
'fade-in': 'fadeIn 0.3s ease-out',
'slide-up': 'slideUp 0.3s ease-out',
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
},
keyframes: {
fadeIn: {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
slideUp: {
'0%': { transform: 'translateY(10px)', opacity: '0' },
'100%': { transform: 'translateY(0)', opacity: '1' },
},
},
},
},
}
</script>
<style>
/* Custom styles for glassmorphism and animations */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'DM Sans', sans-serif;
min-height: 100vh;
overflow-x: hidden;
background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
color: #1E293B;
}
.dark body {
background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
color: #F1F5F9;
}
/* Animated background gradient */
body::before {
content: '';
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
animation: pulse-slow 8s ease-in-out infinite;
pointer-events: none;
z-index: 0;
}
.dark body::before {
background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
}
/* Glassmorphism effect */
.glass {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(226, 232, 240, 0.8);
}
.dark .glass {
background: rgba(30, 41, 59, 0.6);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-card {
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(226, 232, 240, 0.6);
transition: all 0.2s ease-out;
}
.dark .glass-card {
background: rgba(30, 41, 59, 0.4);
border: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-card:hover {
background: rgba(255, 255, 255, 0.9);
border-color: rgba(59, 130, 246, 0.4);
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}
.dark .glass-card:hover {
background: rgba(30, 41, 59, 0.6);
border-color: rgba(59, 130, 246, 0.3);
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: rgba(226, 232, 240, 0.5);
}
.dark ::-webkit-scrollbar-track {
background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
background: rgba(59, 130, 246, 0.4);
border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
background: rgba(59, 130, 246, 0.3);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(59, 130, 246, 0.6);
}
.dark ::-webkit-scrollbar-thumb:hover {
background: rgba(59, 130, 246, 0.5);
}
/* Table styles */
.table-container {
overflow-x: auto;
border-radius: 12px;
}
table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
}
thead tr {
background: rgba(59, 130, 246, 0.08);
}
thead th {
padding: 16px;
text-align: left;
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
font-size: 0.875rem;
color: #2563EB;
text-transform: uppercase;
letter-spacing: 0.05em;
border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}
.dark thead th {
color: #60A5FA;
border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}
tbody tr {
transition: all 0.2s ease-out;
border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}
.dark tbody tr {
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
tbody tr:hover {
background: rgba(59, 130, 246, 0.08);
}
.dark tbody tr:hover {
background: rgba(59, 130, 246, 0.05);
}
tbody td {
padding: 16px;
font-size: 0.875rem;
color: #475569;
}
.dark tbody td {
color: #E2E8F0;
}
/* Input and select styles */
input[type="search"],
select {
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(226, 232, 240, 0.8);
color: #1E293B;
padding: 10px 16px;
border-radius: 8px;
font-family: 'DM Sans', sans-serif;
font-size: 0.875rem;
transition: all 0.2s ease-out;
outline: none;
}
.dark input[type="search"],
.dark select {
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(59, 130, 246, 0.2);
color: #F1F5F9;
}
input[type="search"]:focus,
select:focus {
border-color: rgba(59, 130, 246, 0.6);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
input[type="search"]::placeholder {
color: #94A3B8;
}
.dark input[type="search"]::placeholder {
color: #64748B;
}
/* Button styles */
.btn-primary {
background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
border: 1px solid rgba(59, 130, 246, 0.3);
color: white;
padding: 10px 20px;
border-radius: 8px;
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s ease-out;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
filter: brightness(1.1);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(226, 232, 240, 0.8);
color: #1E293B;
padding: 10px 20px;
border-radius: 8px;
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s ease-out;
}
.dark .btn-secondary {
background: rgba(30, 41, 59, 0.6);
border: 1px solid rgba(59, 130, 246, 0.2);
color: #F1F5F9;
}
.btn-secondary:hover {
background: rgba(59, 130, 246, 0.1);
border-color: rgba(59, 130, 246, 0.4);
}
.dark .btn-secondary:hover {
background: rgba(59, 130, 246, 0.1);
border-color: rgba(59, 130, 246, 0.4);
}
/* Toast notification */
.toast {
position: fixed;
bottom: 24px;
right: 24px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(59, 130, 246, 0.3);
color: #1E293B;
padding: 16px 24px;
border-radius: 12px;
font-family: 'DM Sans', sans-serif;
font-size: 0.875rem;
font-weight: 500;
box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
transform: translateY(100px);
opacity: 0;
transition: all 0.3s ease-out;
z-index: 1000;
}
.dark .toast {
background: rgba(30, 41, 59, 0.9);
color: #F1F5F9;
}
.toast.show {
transform: translateY(0);
opacity: 1;
}
/* Link styles */
a {
color: #2563EB;
text-decoration: none;
transition: color 0.2s ease-out;
}
.dark a {
color: #60A5FA;
}
a:hover {
color: #3B82F6;
}
.dark a:hover {
color: #93C5FD;
}
/* Badge */
.badge {
display: inline-flex;
align-items: center;
padding: 4px 12px;
background: rgba(59, 130, 246, 0.1);
border: 1px solid rgba(59, 130, 246, 0.3);
color: #2563EB;
border-radius: 6px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.dark .badge {
border: 1px solid rgba(59, 130, 246, 0.2);
color: #60A5FA;
}
/* Responsive */
@media (max-width: 768px) {
.controls {
flex-direction: column;
gap: 12px;
}
thead th,
tbody td {
padding: 12px 8px;
font-size: 0.8125rem;
}
}
/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
</style>
</head>
<body class="animate-fade-in">
<!-- Header -->
<header class="sticky top-0 z-50 glass border-b border-white/5">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
<div class="flex flex-col gap-4 animate-slide-up">
<!-- Title -->
<h1 class="font-heading text-2xl sm:text-3xl font-bold">
<span class="text-slate-900 dark:text-white">AdBlock Acceleration</span>
<span class="text-blue-600 dark:text-blue-400">规则索引</span>
</h1>
<!-- Controls -->
<div class="controls flex flex-wrap items-center gap-3">
<!-- Search -->
<div class="flex-1 min-w-[200px]">
<input
id="search"
type="search"
placeholder="搜索规则… (支持拼音/英文)"
class="w-full"
aria-label="搜索规则"
/>
</div>
<!-- Mirror Select -->
<div class="flex items-center gap-2">
<label class="text-sm text-slate-400 whitespace-nowrap">镜像:</label>
<select id="mirror" aria-label="选择镜像">
<option value="ghucs">GHUCS</option>
<option value="jsdelivr">jsDelivr</option>
<option value="cosr">cosr</option>
<option value="gitmirror">gitmirror</option>
</select>
</div>
<!-- Theme Select -->
<div class="flex items-center gap-2">
<label class="text-sm text-slate-400 whitespace-nowrap">主题:</label>
<select id="theme" aria-label="选择主题">
<option value="light">浅色</option>
<option value="dark" selected>深色</option>
<option value="system">跟随系统</option>
</select>
</div>
<!-- Actions -->
<div class="flex items-center gap-2 ml-auto">
<a
href="https://github.com/Silentely/AdBlock-Acceleration"
target="_blank"
rel="noopener noreferrer"
class="btn-secondary"
aria-label="在新窗口打开 GitHub 仓库"
>
<svg class="w-5 h-5 inline-block mr-1" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
</svg>
GitHub
</a>
<button class="btn-primary" id="copyAll" aria-label="复制当前可见规则链接">
<svg class="w-5 h-5 inline-block mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"/>
</svg>
复制链接
</button>
</div>
</div>
<!-- Updated Badge -->
<div class="flex items-center gap-2">
<span class="badge" id="updated">loading…</span>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 relative z-10">
<div class="glass-card rounded-xl overflow-hidden animate-slide-up" style="animation-delay: 0.1s;">
<div class="table-container">
<table id="rules" role="table">
<colgroup>
<col style="width:20%">
<col style="width:20%">
<col style="width:20%">
<col style="width:20%">
<col style="width:20%">
</colgroup>
<thead>
<tr>
<th>规则名称</th>
<th class="text-right">大小/更新时间</th>
<th>原始地址</th>
<th>加速地址(随上方镜像切换)</th>
<th>操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<!-- Note -->
<p class="mt-6 text-sm text-slate-400 animate-slide-up" style="animation-delay: 0.2s;">
<strong class="text-slate-300">说明:</strong>上方"镜像"决定"复制"按钮输出的链接前缀。大小/时间来自仓库根目录的 manifest.json。
</p>
</main>
<!-- Toast Notification -->
<div id="toast" class="toast" role="alert" aria-live="polite">
<div class="flex items-center gap-2">
<svg class="w-5 h-5 text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
</svg>
已复制到剪贴板
</div>
</div>
<!-- Script -->
<script src="./assets/script.js"></script>
</body>
</html>