abersbail commited on
Commit
83eaff2
·
verified ·
1 Parent(s): 1243745

Deploy anime HTML codes database

Browse files
Files changed (2) hide show
  1. README.md +13 -5
  2. index.html +774 -16
README.md CHANGED
@@ -1,10 +1,18 @@
1
  ---
2
- title: Anime Html Codes Database
3
- emoji:
4
- colorFrom: blue
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
 
 
 
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: Anime HTML Codes Database
3
+ colorFrom: pink
4
+ colorTo: indigo
 
5
  sdk: static
6
  pinned: false
7
+ license: mit
8
+ short_description: 20 anime HTML snippets with live preview.
9
+ tags:
10
+ - static
11
+ - html
12
+ - anime
13
+ - code-snippets
14
  ---
15
 
16
+ # Anime HTML Codes Database
17
+
18
+ A static HTML app with 20 anime-style HTML/CSS snippets. It includes search, type filtering, live preview, copy code, and download HTML actions.
index.html CHANGED
@@ -1,19 +1,777 @@
1
  <!doctype html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Anime HTML Codes Database</title>
7
+ <style>
8
+ :root {
9
+ --bg: #f6f5f2;
10
+ --panel: #ffffff;
11
+ --ink: #171923;
12
+ --muted: #667085;
13
+ --line: #ddd6cc;
14
+ --accent: #d9480f;
15
+ --accent-dark: #b53808;
16
+ --blue: #2454a6;
17
+ --green: #147d64;
18
+ --shadow: 0 18px 46px rgba(31, 26, 20, 0.12);
19
+ }
20
+
21
+ * {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ body {
26
+ margin: 0;
27
+ min-height: 100vh;
28
+ background: var(--bg);
29
+ color: var(--ink);
30
+ font-family: Arial, Helvetica, sans-serif;
31
+ }
32
+
33
+ button,
34
+ input,
35
+ select,
36
+ textarea {
37
+ font: inherit;
38
+ }
39
+
40
+ main {
41
+ width: min(1180px, calc(100% - 32px));
42
+ margin: 0 auto;
43
+ padding: 28px 0;
44
+ }
45
+
46
+ header {
47
+ display: grid;
48
+ grid-template-columns: 1fr auto;
49
+ gap: 20px;
50
+ align-items: end;
51
+ margin-bottom: 18px;
52
+ }
53
+
54
+ h1 {
55
+ margin: 0 0 8px;
56
+ font-size: clamp(28px, 5vw, 48px);
57
+ line-height: 1;
58
+ }
59
+
60
+ p {
61
+ margin: 0;
62
+ color: var(--muted);
63
+ line-height: 1.5;
64
+ }
65
+
66
+ .counts {
67
+ display: flex;
68
+ gap: 10px;
69
+ flex-wrap: wrap;
70
+ justify-content: flex-end;
71
+ }
72
+
73
+ .count {
74
+ min-width: 104px;
75
+ padding: 11px 13px;
76
+ background: var(--panel);
77
+ border: 1px solid var(--line);
78
+ border-radius: 8px;
79
+ box-shadow: var(--shadow);
80
+ }
81
+
82
+ .count strong,
83
+ .count span {
84
+ display: block;
85
+ }
86
+
87
+ .count strong {
88
+ font-size: 22px;
89
+ line-height: 1;
90
+ }
91
+
92
+ .count span {
93
+ margin-top: 5px;
94
+ color: var(--muted);
95
+ font-size: 12px;
96
+ text-transform: uppercase;
97
+ }
98
+
99
+ .workspace {
100
+ display: grid;
101
+ grid-template-columns: minmax(300px, 420px) 1fr;
102
+ gap: 16px;
103
+ align-items: start;
104
+ }
105
+
106
+ .panel {
107
+ background: var(--panel);
108
+ border: 1px solid var(--line);
109
+ border-radius: 8px;
110
+ box-shadow: var(--shadow);
111
+ overflow: hidden;
112
+ }
113
+
114
+ .tools {
115
+ display: grid;
116
+ grid-template-columns: 1fr 150px;
117
+ gap: 10px;
118
+ padding: 14px;
119
+ border-bottom: 1px solid var(--line);
120
+ background: #fffcf7;
121
+ }
122
+
123
+ input,
124
+ select {
125
+ width: 100%;
126
+ height: 42px;
127
+ border: 1px solid var(--line);
128
+ border-radius: 6px;
129
+ padding: 0 12px;
130
+ color: var(--ink);
131
+ background: #fff;
132
+ }
133
+
134
+ .list {
135
+ max-height: 660px;
136
+ overflow: auto;
137
+ }
138
+
139
+ .item {
140
+ display: grid;
141
+ grid-template-columns: 1fr auto;
142
+ gap: 10px;
143
+ width: 100%;
144
+ padding: 14px;
145
+ border: 0;
146
+ border-bottom: 1px solid var(--line);
147
+ background: #fff;
148
+ color: var(--ink);
149
+ text-align: left;
150
+ cursor: pointer;
151
+ }
152
+
153
+ .item:hover,
154
+ .item.active {
155
+ background: #fff4ec;
156
+ }
157
+
158
+ .item strong {
159
+ display: block;
160
+ margin-bottom: 5px;
161
+ font-size: 15px;
162
+ }
163
+
164
+ .item small {
165
+ color: var(--muted);
166
+ line-height: 1.4;
167
+ }
168
+
169
+ .tag {
170
+ align-self: start;
171
+ min-width: 82px;
172
+ border-radius: 999px;
173
+ padding: 5px 8px;
174
+ color: #fff;
175
+ background: var(--blue);
176
+ font-size: 12px;
177
+ font-weight: 700;
178
+ text-align: center;
179
+ text-transform: capitalize;
180
+ }
181
+
182
+ .detail-head {
183
+ display: flex;
184
+ justify-content: space-between;
185
+ gap: 12px;
186
+ align-items: start;
187
+ padding: 18px;
188
+ border-bottom: 1px solid var(--line);
189
+ }
190
+
191
+ h2 {
192
+ margin: 0 0 8px;
193
+ font-size: 25px;
194
+ line-height: 1.15;
195
+ }
196
+
197
+ .actions {
198
+ display: flex;
199
+ gap: 8px;
200
+ flex-wrap: wrap;
201
+ justify-content: flex-end;
202
+ }
203
+
204
+ button.action {
205
+ height: 40px;
206
+ border: 0;
207
+ border-radius: 6px;
208
+ padding: 0 13px;
209
+ color: #fff;
210
+ background: var(--accent);
211
+ cursor: pointer;
212
+ font-weight: 700;
213
+ white-space: nowrap;
214
+ }
215
+
216
+ button.action:hover {
217
+ background: var(--accent-dark);
218
+ }
219
+
220
+ button.action.secondary {
221
+ background: var(--green);
222
+ }
223
+
224
+ .preview {
225
+ min-height: 220px;
226
+ padding: 18px;
227
+ border-bottom: 1px solid var(--line);
228
+ background:
229
+ linear-gradient(90deg, rgba(36, 84, 166, 0.07) 1px, transparent 1px),
230
+ linear-gradient(rgba(36, 84, 166, 0.07) 1px, transparent 1px),
231
+ #fbfaf8;
232
+ background-size: 24px 24px;
233
+ }
234
+
235
+ iframe {
236
+ display: block;
237
+ width: 100%;
238
+ min-height: 230px;
239
+ border: 1px solid var(--line);
240
+ border-radius: 8px;
241
+ background: #fff;
242
+ }
243
+
244
+ .code-wrap {
245
+ padding: 0;
246
+ }
247
+
248
+ pre {
249
+ margin: 0;
250
+ max-height: 420px;
251
+ overflow: auto;
252
+ padding: 18px;
253
+ background: #15171f;
254
+ color: #f8f8f2;
255
+ font-size: 13px;
256
+ line-height: 1.55;
257
+ white-space: pre-wrap;
258
+ }
259
+
260
+ .empty {
261
+ padding: 26px 14px;
262
+ color: var(--muted);
263
+ text-align: center;
264
+ }
265
+
266
+ @media (max-width: 900px) {
267
+ header,
268
+ .workspace,
269
+ .tools {
270
+ grid-template-columns: 1fr;
271
+ }
272
+
273
+ .counts,
274
+ .actions {
275
+ justify-content: flex-start;
276
+ }
277
+
278
+ .list {
279
+ max-height: 360px;
280
+ }
281
+ }
282
+ </style>
283
+ </head>
284
+ <body>
285
+ <main>
286
+ <header>
287
+ <div>
288
+ <h1>Anime HTML Codes Database</h1>
289
+ <p>Twenty simple anime-style HTML snippets with live preview and copy-ready code.</p>
290
+ </div>
291
+ <div class="counts">
292
+ <div class="count">
293
+ <strong id="totalCount">20</strong>
294
+ <span>Total</span>
295
+ </div>
296
+ <div class="count">
297
+ <strong id="shownCount">20</strong>
298
+ <span>Shown</span>
299
+ </div>
300
+ </div>
301
+ </header>
302
+
303
+ <section class="workspace">
304
+ <aside class="panel">
305
+ <div class="tools">
306
+ <input id="searchInput" type="search" placeholder="Search anime codes">
307
+ <select id="typeFilter" aria-label="Filter by type">
308
+ <option value="all">All types</option>
309
+ <option value="card">Card</option>
310
+ <option value="button">Button</option>
311
+ <option value="banner">Banner</option>
312
+ <option value="loader">Loader</option>
313
+ <option value="badge">Badge</option>
314
+ </select>
315
+ </div>
316
+ <div class="list" id="codeList"></div>
317
+ <div class="empty" id="emptyState" hidden>No anime codes found.</div>
318
+ </aside>
319
+
320
+ <section class="panel" aria-label="Selected code">
321
+ <div class="detail-head">
322
+ <div>
323
+ <h2 id="detailTitle">Select a code</h2>
324
+ <p id="detailDescription">Pick a snippet from the list.</p>
325
+ </div>
326
+ <div class="actions">
327
+ <button class="action secondary" id="downloadButton" type="button">Download HTML</button>
328
+ <button class="action" id="copyButton" type="button">Copy Code</button>
329
+ </div>
330
+ </div>
331
+ <div class="preview">
332
+ <iframe id="previewFrame" title="Anime code preview"></iframe>
333
+ </div>
334
+ <div class="code-wrap">
335
+ <pre><code id="codeOutput"></code></pre>
336
+ </div>
337
+ </section>
338
+ </section>
339
+ </main>
340
+
341
+ <script>
342
+ const snippets = [
343
+ {
344
+ id: 1,
345
+ type: "card",
346
+ title: "Hero Character Card",
347
+ description: "A profile card for an anime hero.",
348
+ code: `<!doctype html>
349
  <html>
350
+ <head>
351
+ <style>
352
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f7f2ea;font-family:Arial}
353
+ .card{width:280px;border:4px solid #161616;border-radius:18px;background:#fff;box-shadow:10px 10px 0 #161616;overflow:hidden}
354
+ .top{height:130px;background:linear-gradient(135deg,#ff7a45,#ffd166);display:grid;place-items:center}
355
+ .face{width:88px;height:88px;border-radius:50%;background:#ffe8c7;border:4px solid #161616;position:relative}
356
+ .face:before,.face:after{content:"";position:absolute;top:34px;width:10px;height:10px;background:#161616;border-radius:50%}
357
+ .face:before{left:24px}.face:after{right:24px}
358
+ .body{padding:18px}.name{font-size:24px;font-weight:900}.role{color:#d9480f;font-weight:700;margin-top:6px}
359
+ </style>
360
+ </head>
361
+ <body><div class="card"><div class="top"><div class="face"></div></div><div class="body"><div class="name">Aki Storm</div><div class="role">Fire Squad Captain</div></div></div></body>
362
+ </html>`
363
+ },
364
+ {
365
+ id: 2,
366
+ type: "button",
367
+ title: "Power Up Button",
368
+ description: "A bold call-to-action button with anime energy.",
369
+ code: `<!doctype html>
370
+ <html>
371
+ <head>
372
+ <style>
373
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#10131c;font-family:Arial}
374
+ button{font-size:22px;font-weight:900;letter-spacing:0;border:3px solid #fff;border-radius:10px;padding:18px 34px;color:#10131c;background:#ffd166;box-shadow:0 0 0 5px #ef476f,0 0 30px #ffd166;cursor:pointer;transform:skew(-8deg)}
375
+ button:hover{background:#06d6a0;box-shadow:0 0 0 5px #118ab2,0 0 38px #06d6a0}
376
+ </style>
377
+ </head>
378
+ <body><button>POWER UP</button></body>
379
+ </html>`
380
+ },
381
+ {
382
+ id: 3,
383
+ type: "banner",
384
+ title: "Opening Title Banner",
385
+ description: "A simple anime opening title block.",
386
+ code: `<!doctype html>
387
+ <html>
388
+ <head>
389
+ <style>
390
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#eaf2ff;font-family:Arial}
391
+ .banner{width:min(760px,90vw);padding:38px 28px;border:4px solid #111;background:#fff;box-shadow:12px 12px 0 #2454a6;text-align:center}
392
+ .eyebrow{color:#d9480f;font-weight:900;text-transform:uppercase}
393
+ h1{font-size:54px;line-height:1;margin:10px 0}.line{height:8px;background:#111;margin:18px auto;width:80%}
394
+ p{margin:0;color:#475467;font-weight:700}
395
+ </style>
396
+ </head>
397
+ <body><section class="banner"><div class="eyebrow">Episode 01</div><h1>Skyline Academy</h1><div class="line"></div><p>The first bell rings at sunrise.</p></section></body>
398
+ </html>`
399
+ },
400
+ {
401
+ id: 4,
402
+ type: "loader",
403
+ title: "Spinning Star Loader",
404
+ description: "A small loading animation for anime pages.",
405
+ code: `<!doctype html>
406
+ <html>
407
+ <head>
408
+ <style>
409
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#fff8e6}
410
+ .star{width:90px;height:90px;background:#ffbe0b;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);animation:spin 1s linear infinite;filter:drop-shadow(0 0 18px #fb5607)}
411
+ @keyframes spin{to{transform:rotate(360deg)}}
412
+ </style>
413
+ </head>
414
+ <body><div class="star"></div></body>
415
+ </html>`
416
+ },
417
+ {
418
+ id: 5,
419
+ type: "badge",
420
+ title: "Senpai Badge",
421
+ description: "A small rank badge for profile cards.",
422
+ code: `<!doctype html>
423
+ <html>
424
+ <head>
425
+ <style>
426
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f1f5f9;font-family:Arial}
427
+ .badge{display:inline-grid;place-items:center;width:170px;height:62px;border:3px solid #111;border-radius:999px;background:#ffcad4;color:#111;box-shadow:7px 7px 0 #111;font-size:22px;font-weight:900}
428
+ </style>
429
+ </head>
430
+ <body><div class="badge">SENPAI</div></body>
431
+ </html>`
432
+ },
433
+ {
434
+ id: 6,
435
+ type: "card",
436
+ title: "Manga Panel Card",
437
+ description: "A black and white manga-style panel.",
438
+ code: `<!doctype html>
439
+ <html>
440
+ <head>
441
+ <style>
442
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#ddd;font-family:Arial}
443
+ .panel{width:310px;padding:22px;border:5px solid #111;background:repeating-linear-gradient(-35deg,#fff 0 8px,#f2f2f2 8px 16px);box-shadow:12px 12px 0 #111}
444
+ .bubble{padding:18px;border:3px solid #111;border-radius:50%;background:#fff;text-align:center;font-size:24px;font-weight:900}
445
+ .caption{margin-top:18px;background:#111;color:#fff;padding:10px;font-weight:700}
446
+ </style>
447
+ </head>
448
+ <body><div class="panel"><div class="bubble">I will win!</div><div class="caption">Chapter 12: Final Round</div></div></body>
449
+ </html>`
450
+ },
451
+ {
452
+ id: 7,
453
+ type: "button",
454
+ title: "Episode Play Button",
455
+ description: "A compact anime episode play button.",
456
+ code: `<!doctype html>
457
+ <html>
458
+ <head>
459
+ <style>
460
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#eff6ff;font-family:Arial}
461
+ .play{display:flex;align-items:center;gap:12px;border:3px solid #1d2939;border-radius:8px;background:#fff;padding:14px 18px;box-shadow:7px 7px 0 #2454a6;font-weight:900}
462
+ .icon{width:0;height:0;border-top:12px solid transparent;border-bottom:12px solid transparent;border-left:18px solid #d9480f}
463
+ </style>
464
+ </head>
465
+ <body><button class="play"><span class="icon"></span><span>Watch Episode</span></button></body>
466
+ </html>`
467
+ },
468
+ {
469
+ id: 8,
470
+ type: "banner",
471
+ title: "School Club Banner",
472
+ description: "A clean banner for an anime school club.",
473
+ code: `<!doctype html>
474
+ <html>
475
+ <head>
476
+ <style>
477
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#fff7ed;font-family:Arial}
478
+ .club{width:min(700px,90vw);border:3px solid #111;border-radius:8px;overflow:hidden;background:#fff}
479
+ .top{background:#2454a6;color:#fff;padding:14px 20px;font-weight:900}
480
+ .main{padding:28px 20px}.main h1{margin:0;font-size:42px}.main p{color:#667085;font-weight:700}
481
+ </style>
482
+ </head>
483
+ <body><section class="club"><div class="top">After School Club</div><div class="main"><h1>Art Room Heroes</h1><p>Meet every Friday before sunset.</p></div></section></body>
484
+ </html>`
485
+ },
486
+ {
487
+ id: 9,
488
+ type: "loader",
489
+ title: "Energy Ring Loader",
490
+ description: "A glowing ring animation.",
491
+ code: `<!doctype html>
492
+ <html>
493
+ <head>
494
+ <style>
495
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#111827}
496
+ .ring{width:95px;height:95px;border-radius:50%;border:8px solid #334155;border-top-color:#06d6a0;border-right-color:#ffd166;animation:turn .8s linear infinite;box-shadow:0 0 26px #06d6a0}
497
+ @keyframes turn{to{transform:rotate(360deg)}}
498
+ </style>
499
+ </head>
500
+ <body><div class="ring"></div></body>
501
+ </html>`
502
+ },
503
+ {
504
+ id: 10,
505
+ type: "badge",
506
+ title: "Episode Badge",
507
+ description: "A label for episode numbers.",
508
+ code: `<!doctype html>
509
+ <html>
510
+ <head>
511
+ <style>
512
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f8fafc;font-family:Arial}
513
+ .episode{border:3px solid #111;background:#fff;padding:12px 18px;box-shadow:6px 6px 0 #ef476f;font-size:20px;font-weight:900}
514
+ .episode span{color:#ef476f}
515
+ </style>
516
+ </head>
517
+ <body><div class="episode">EP <span>07</span> FINAL MATCH</div></body>
518
+ </html>`
519
+ },
520
+ {
521
+ id: 11,
522
+ type: "card",
523
+ title: "Villain Notice Card",
524
+ description: "A sharp warning card for a villain profile.",
525
+ code: `<!doctype html>
526
+ <html>
527
+ <head>
528
+ <style>
529
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#1f2937;font-family:Arial}
530
+ .card{width:310px;border:3px solid #f8fafc;background:#111827;color:#fff;padding:24px;box-shadow:10px 10px 0 #ef4444}
531
+ .label{color:#fca5a5;font-weight:900;text-transform:uppercase}.name{font-size:34px;font-weight:900;margin:12px 0}.note{color:#cbd5e1}
532
+ </style>
533
+ </head>
534
+ <body><div class="card"><div class="label">Wanted</div><div class="name">Noctis Rei</div><div class="note">Shadow technique specialist.</div></div></body>
535
+ </html>`
536
+ },
537
+ {
538
+ id: 12,
539
+ type: "button",
540
+ title: "Manga Next Button",
541
+ description: "A next chapter button with hard edges.",
542
+ code: `<!doctype html>
543
+ <html>
544
+ <head>
545
+ <style>
546
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#fff;font-family:Arial}
547
+ .next{border:4px solid #000;background:#000;color:#fff;padding:16px 28px;font-size:22px;font-weight:900;box-shadow:8px 8px 0 #ffd166;cursor:pointer}
548
+ .next:hover{box-shadow:8px 8px 0 #06d6a0}
549
+ </style>
550
+ </head>
551
+ <body><button class="next">NEXT CHAPTER</button></body>
552
+ </html>`
553
+ },
554
+ {
555
+ id: 13,
556
+ type: "banner",
557
+ title: "Tournament Banner",
558
+ description: "A tournament matchup headline.",
559
+ code: `<!doctype html>
560
+ <html>
561
+ <head>
562
+ <style>
563
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f0fdf4;font-family:Arial}
564
+ .match{width:min(720px,92vw);border:4px solid #111;background:#fff;padding:28px;text-align:center;box-shadow:12px 12px 0 #16a34a}
565
+ .small{font-weight:900;color:#16a34a}.names{font-size:38px;font-weight:900;margin:12px 0}.vs{color:#d9480f}
566
+ </style>
567
+ </head>
568
+ <body><section class="match"><div class="small">Grand Tournament</div><div class="names">KAI <span class="vs">VS</span> RIN</div><p>Final arena opens tonight.</p></section></body>
569
+ </html>`
570
+ },
571
+ {
572
+ id: 14,
573
+ type: "loader",
574
+ title: "Dot Dash Loader",
575
+ description: "Three quick dots for loading scenes.",
576
+ code: `<!doctype html>
577
+ <html>
578
+ <head>
579
+ <style>
580
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#fff1f2}
581
+ .dots{display:flex;gap:12px}.dots span{width:22px;height:22px;border-radius:50%;background:#e11d48;animation:bounce .6s infinite alternate}.dots span:nth-child(2){animation-delay:.15s}.dots span:nth-child(3){animation-delay:.3s}
582
+ @keyframes bounce{to{transform:translateY(-22px);background:#f59e0b}}
583
+ </style>
584
+ </head>
585
+ <body><div class="dots"><span></span><span></span><span></span></div></body>
586
+ </html>`
587
+ },
588
+ {
589
+ id: 15,
590
+ type: "badge",
591
+ title: "Clan Badge",
592
+ description: "A circular clan mark.",
593
+ code: `<!doctype html>
594
+ <html>
595
+ <head>
596
+ <style>
597
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#ecfeff;font-family:Arial}
598
+ .clan{width:140px;height:140px;border:5px solid #111;border-radius:50%;background:radial-gradient(circle,#fff 0 34%,#22d3ee 35% 58%,#111 59% 62%,#fff 63%);display:grid;place-items:center;font-weight:900;box-shadow:8px 8px 0 #111}
599
+ </style>
600
+ </head>
601
+ <body><div class="clan">CLAN</div></body>
602
+ </html>`
603
+ },
604
+ {
605
+ id: 16,
606
+ type: "card",
607
+ title: "Quest Card",
608
+ description: "A mission card for an anime adventure.",
609
+ code: `<!doctype html>
610
+ <html>
611
+ <head>
612
+ <style>
613
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#fafaf9;font-family:Arial}
614
+ .quest{width:320px;border:3px solid #292524;border-radius:8px;background:#fff7ed;padding:20px;box-shadow:9px 9px 0 #292524}
615
+ .rank{display:inline-block;background:#d9480f;color:#fff;padding:6px 10px;border-radius:4px;font-weight:900}.title{font-size:28px;font-weight:900;margin:14px 0}.reward{color:#147d64;font-weight:900}
616
+ </style>
617
+ </head>
618
+ <body><div class="quest"><span class="rank">S RANK</span><div class="title">Find the Sky Stone</div><div class="reward">Reward: 5000 coins</div></div></body>
619
+ </html>`
620
+ },
621
+ {
622
+ id: 17,
623
+ type: "button",
624
+ title: "Transform Button",
625
+ description: "A transformation button with glow.",
626
+ code: `<!doctype html>
627
+ <html>
628
+ <head>
629
+ <style>
630
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#140f1f;font-family:Arial}
631
+ button{border:2px solid #f5d0fe;border-radius:999px;padding:16px 30px;background:#7e22ce;color:#fff;font-size:21px;font-weight:900;box-shadow:0 0 22px #c084fc;cursor:pointer}
632
+ button:hover{background:#a21caf;box-shadow:0 0 34px #f0abfc}
633
+ </style>
634
+ </head>
635
+ <body><button>TRANSFORM</button></body>
636
+ </html>`
637
+ },
638
+ {
639
+ id: 18,
640
+ type: "banner",
641
+ title: "Subtitle Strip",
642
+ description: "A simple subtitle strip for anime scenes.",
643
+ code: `<!doctype html>
644
+ <html>
645
+ <head>
646
+ <style>
647
+ body{margin:0;min-height:100vh;display:grid;place-items:end center;background:#1e293b;font-family:Arial;padding:30px}
648
+ .subtitle{max-width:760px;background:rgba(0,0,0,.82);color:#fff;border:2px solid #fff;border-radius:6px;padding:14px 20px;font-size:24px;font-weight:800;text-align:center}
649
+ </style>
650
+ </head>
651
+ <body><div class="subtitle">I promised we would see the sunrise together.</div></body>
652
+ </html>`
653
+ },
654
+ {
655
+ id: 19,
656
+ type: "loader",
657
+ title: "Slash Loader",
658
+ description: "Animated sword-slash bars.",
659
+ code: `<!doctype html>
660
+ <html>
661
+ <head>
662
+ <style>
663
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f8fafc}
664
+ .slash{display:flex;gap:8px;transform:skew(-20deg)}.slash span{width:14px;height:80px;background:#111;animation:flash .8s infinite alternate}.slash span:nth-child(2){animation-delay:.15s}.slash span:nth-child(3){animation-delay:.3s}
665
+ @keyframes flash{to{height:35px;background:#ef4444}}
666
+ </style>
667
+ </head>
668
+ <body><div class="slash"><span></span><span></span><span></span></div></body>
669
+ </html>`
670
+ },
671
+ {
672
+ id: 20,
673
+ type: "badge",
674
+ title: "New Season Badge",
675
+ description: "A pill badge for a new season announcement.",
676
+ code: `<!doctype html>
677
+ <html>
678
+ <head>
679
+ <style>
680
+ body{margin:0;min-height:100vh;display:grid;place-items:center;background:#eef2ff;font-family:Arial}
681
+ .season{border:3px solid #312e81;border-radius:999px;background:#fff;color:#312e81;padding:14px 22px;font-weight:900;font-size:22px;box-shadow:0 0 0 8px #c7d2fe}
682
+ </style>
683
+ </head>
684
+ <body><div class="season">NEW SEASON</div></body>
685
+ </html>`
686
+ }
687
+ ];
688
+
689
+ const list = document.getElementById("codeList");
690
+ const emptyState = document.getElementById("emptyState");
691
+ const searchInput = document.getElementById("searchInput");
692
+ const typeFilter = document.getElementById("typeFilter");
693
+ const shownCount = document.getElementById("shownCount");
694
+ const detailTitle = document.getElementById("detailTitle");
695
+ const detailDescription = document.getElementById("detailDescription");
696
+ const codeOutput = document.getElementById("codeOutput");
697
+ const previewFrame = document.getElementById("previewFrame");
698
+ const copyButton = document.getElementById("copyButton");
699
+ const downloadButton = document.getElementById("downloadButton");
700
+
701
+ let selected = snippets[0];
702
+
703
+ function filterSnippets() {
704
+ const query = searchInput.value.trim().toLowerCase();
705
+ const type = typeFilter.value;
706
+ return snippets.filter((snippet) => {
707
+ const text = `${snippet.title} ${snippet.description} ${snippet.type}`.toLowerCase();
708
+ return (type === "all" || snippet.type === type) && text.includes(query);
709
+ });
710
+ }
711
+
712
+ function renderList() {
713
+ const visible = filterSnippets();
714
+ list.innerHTML = "";
715
+ shownCount.textContent = String(visible.length);
716
+ emptyState.hidden = visible.length > 0;
717
+
718
+ for (const snippet of visible) {
719
+ const button = document.createElement("button");
720
+ button.className = `item${snippet.id === selected.id ? " active" : ""}`;
721
+ button.type = "button";
722
+ button.innerHTML = `
723
+ <span>
724
+ <strong>${escapeHtml(snippet.id + ". " + snippet.title)}</strong>
725
+ <small>${escapeHtml(snippet.description)}</small>
726
+ </span>
727
+ <span class="tag">${escapeHtml(snippet.type)}</span>
728
+ `;
729
+ button.addEventListener("click", () => {
730
+ selected = snippet;
731
+ renderDetail();
732
+ renderList();
733
+ });
734
+ list.appendChild(button);
735
+ }
736
+ }
737
+
738
+ function renderDetail() {
739
+ detailTitle.textContent = selected.title;
740
+ detailDescription.textContent = `${selected.type.toUpperCase()} #${selected.id}: ${selected.description}`;
741
+ codeOutput.textContent = selected.code;
742
+ previewFrame.srcdoc = selected.code;
743
+ }
744
+
745
+ function escapeHtml(value) {
746
+ return String(value)
747
+ .replaceAll("&", "&amp;")
748
+ .replaceAll("<", "&lt;")
749
+ .replaceAll(">", "&gt;")
750
+ .replaceAll('"', "&quot;")
751
+ .replaceAll("'", "&#039;");
752
+ }
753
+
754
+ copyButton.addEventListener("click", async () => {
755
+ await navigator.clipboard.writeText(selected.code);
756
+ copyButton.textContent = "Copied";
757
+ setTimeout(() => {
758
+ copyButton.textContent = "Copy Code";
759
+ }, 1200);
760
+ });
761
+
762
+ downloadButton.addEventListener("click", () => {
763
+ const blob = new Blob([selected.code], { type: "text/html" });
764
+ const link = document.createElement("a");
765
+ link.href = URL.createObjectURL(blob);
766
+ link.download = `${selected.title.toLowerCase().replaceAll(" ", "-")}.html`;
767
+ link.click();
768
+ URL.revokeObjectURL(link.href);
769
+ });
770
+
771
+ searchInput.addEventListener("input", renderList);
772
+ typeFilter.addEventListener("change", renderList);
773
+ renderDetail();
774
+ renderList();
775
+ </script>
776
+ </body>
777
  </html>