-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
628 lines (597 loc) · 25 KB
/
Copy pathindex.html
File metadata and controls
628 lines (597 loc) · 25 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
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Lumen Demos</title>
<link rel="icon" type="image/png" href="logo.png" />
<link rel="shortcut icon" type="image/png" href="logo.png" />
<style>
:root{
--bg:#1a1a1a; --panel:#242424; --panel2:#2d2d2d; --text:#e0e0e0; --muted:#a8a8a8; --border:#333333;
--accent:#e50914; --accent-light:#f40612; --accent-dark:#b20710; --accent-soft:#ff6b6b;
--shadow:0 15px 35px rgba(0,0,0,.25);
--glow:0 0 30px rgba(229,9,20,.05);
--card-glow:0 0 20px rgba(229,9,20,.04);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;scroll-behavior:smooth}
body{
margin:0;
background:#1a1a1a;
color:var(--text);
font:16px/1.6 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
overflow-x:hidden;
position:relative
}
body::before{
content:'';position:fixed;inset:0;z-index:0;
background:
radial-gradient(circle at 20% 50%, var(--accent)08 0%, transparent 50%),
radial-gradient(circle at 80% 80%, var(--accent)06 0%, transparent 50%),
radial-gradient(circle at 40% 20%, var(--accent)04 0%, transparent 50%);
animation:bgPulse 15s ease-in-out infinite;
pointer-events:none
}
body>*:not(script){position:relative;z-index:1}
/* Animated Orbs/Planets */
.orb{
position:fixed;border-radius:50%;
filter:blur(60px);opacity:.4;
pointer-events:none;z-index:0
}
.orb1{
width:400px;height:400px;
background:radial-gradient(circle,var(--accent)40,transparent);
top:10%;left:5%;
animation:float1 20s ease-in-out infinite
}
.orb2{
width:300px;height:300px;
background:radial-gradient(circle,var(--accent-light)30,transparent);
top:60%;right:10%;
animation:float2 25s ease-in-out infinite
}
.orb3{
width:250px;height:250px;
background:radial-gradient(circle,var(--accent)25,transparent);
bottom:15%;left:50%;
animation:float3 18s ease-in-out infinite
}
a{color:inherit;text-decoration:none}
@keyframes bgPulse{
0%,100%{opacity:.6;transform:scale(1)}
50%{opacity:1;transform:scale(1.1)}
}
@keyframes float1{
0%,100%{transform:translate(0,0) scale(1)}
33%{transform:translate(50px,-30px) scale(1.1)}
66%{transform:translate(-30px,40px) scale(.9)}
}
@keyframes float2{
0%,100%{transform:translate(0,0) scale(1)}
33%{transform:translate(-40px,50px) scale(1.15)}
66%{transform:translate(60px,-20px) scale(.95)}
}
@keyframes float3{
0%,100%{transform:translate(0,0) scale(1)}
33%{transform:translate(-50px,-40px) scale(1.05)}
66%{transform:translate(40px,30px) scale(.9)}
}
@keyframes float{
0%,100%{transform:translateY(0px)}
50%{transform:translateY(-6px)}
}
@keyframes shimmer{
0%{background-position:200% center}
100%{background-position:-200% center}
}
@keyframes fadeInUp{
from{opacity:0;transform:translateY(15px)}
to{opacity:1;transform:translateY(0)}
}
.topbar{
height:70px;display:flex;align-items:center;gap:16px;padding:0 40px;
border-bottom:1px solid rgba(229,9,20,.06);
background:rgba(26,26,26,.9);backdrop-filter:blur(16px);
position:sticky;top:0;z-index:100
}
.brand{
display:flex;align-items:center;gap:12px;
font-weight:700;font-size:20px;
color:#e0e0e0;letter-spacing:-.2px
}
.brand img{
height:36px;width:auto;
filter:drop-shadow(0 2px 8px rgba(229,9,20,.2))
}
.pill{
border:1px solid rgba(229,9,20,.12);
background:rgba(229,9,20,.05);
border-radius:999px;padding:6px 12px;font-size:13px;
color:#ff8080;font-weight:500;
transition:all .3s ease
}
.pill:hover{
border-color:rgba(229,9,20,.2);
background:rgba(229,9,20,.08);
transform:translateY(-1px)
}
.spacer{margin-left:auto}
.wrap{max-width:1220px;margin:0 auto;padding:56px 40px 72px;animation:fadeInUp .5s ease}
.hero{
background:
radial-gradient(1000px 600px at 50% -5%, rgba(229,9,20,.04), transparent 60%),
radial-gradient(800px 450px at 80% 60%, rgba(229,9,20,.025), transparent 50%),
var(--panel);
border:1px solid rgba(229,9,20,.08);
border-radius:24px;
box-shadow:var(--glow),inset 0 1px 0 0 rgba(255,255,255,.015);
padding:72px 56px;
text-align:center;
position:relative;
overflow:hidden
}
.hero::before{
content:'';position:absolute;top:0;left:0;right:0;height:1px;
background:linear-gradient(90deg,transparent,rgba(229,9,20,.2),transparent);
animation:shimmer 5s linear infinite
}
.heroTitle{
font-size:58px;font-weight:700;letter-spacing:-1.2px;margin:0 0 18px;
line-height:1.1;
background:linear-gradient(135deg,#e0e0e0 0%,#c8c8c8 30%,#ff8080 100%);
background-size:200% auto;
-webkit-background-clip:text;-webkit-text-fill-color:transparent;
background-clip:text;
animation:float 6s ease-in-out infinite
}
.heroText{
margin:0 auto 36px;color:var(--muted);max-width:620px;font-size:17px;
line-height:1.65;font-weight:400
}
.heroText code{
background:rgba(229,9,20,.06);
border:1px solid rgba(229,9,20,.12);
padding:2px 8px;border-radius:6px;font-size:15px;
color:#ff8080;font-weight:500
}
.heroRight{display:flex;gap:14px;align-items:center;justify-content:center;flex-wrap:wrap}
.btn{
border:1px solid rgba(229,9,20,.15);
background:rgba(229,9,20,.06);
color:var(--text);border-radius:11px;padding:13px 26px;cursor:pointer;
font:inherit;font-weight:600;font-size:15px;text-decoration:none;
display:inline-flex;align-items:center;gap:9px;
transition:all .3s ease;
position:relative;overflow:hidden
}
.btn::before{
content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;
background:linear-gradient(90deg,transparent,rgba(255,255,255,.04),transparent);
transition:left .5s ease
}
.btn:hover::before{left:100%}
.btn:hover{
background:rgba(229,9,20,.1);
border-color:rgba(229,9,20,.25);
transform:translateY(-2px);
box-shadow:0 6px 20px rgba(229,9,20,.12)
}
.btn.primary{
background:linear-gradient(135deg,#e50914 0%,#b20710 100%);
color:#fff;border:none;font-weight:600;
box-shadow:0 6px 20px rgba(229,9,20,.25),inset 0 1px 0 0 rgba(255,255,255,.12)
}
.btn.primary:hover{
transform:translateY(-2px);
box-shadow:0 10px 28px rgba(229,9,20,.35),inset 0 1px 0 0 rgba(255,255,255,.18);
background:linear-gradient(135deg,#f40612 0%,#e50914 100%)
}
.grid{
margin-top:56px;
display:grid;
grid-template-columns:repeat(auto-fit,minmax(490px,1fr));
gap:22px
}
.card{
background:var(--panel);
border:1px solid rgba(229,9,20,.08);
border-radius:18px;
padding:26px;
box-shadow:var(--card-glow);
display:flex;flex-direction:column;gap:15px;
cursor:pointer;user-select:none;
transition:all .3s ease;
position:relative;overflow:hidden
}
.card::before{
content:'';position:absolute;top:0;left:0;right:0;height:1px;
background:linear-gradient(90deg,transparent,rgba(229,9,20,.25),transparent);
opacity:0;transition:opacity .3s ease
}
.card:hover{
background:var(--panel2);
border-color:rgba(229,9,20,.15);
transform:translateY(-3px);
box-shadow:0 12px 32px rgba(229,9,20,.1),inset 0 1px 0 0 rgba(255,255,255,.015)
}
.card:hover::before{opacity:1}
.card:focus{outline:none;border-color:rgba(229,9,20,.2)}
.cardHead{display:flex;gap:15px;align-items:center;min-width:0}
.icon{
width:58px;height:58px;border-radius:15px;
border:1px solid rgba(229,9,20,.12);
background:rgba(229,9,20,.05);
display:flex;align-items:center;justify-content:center;flex:0 0 auto;
font-weight:400;font-size:24px;font-family:system-ui;
box-shadow:0 3px 10px rgba(0,0,0,.12);
transition:all .3s ease;
position:relative;overflow:hidden
}
.icon::before{
content:'';position:absolute;inset:0;
background:linear-gradient(135deg,rgba(255,255,255,.05),transparent);
opacity:0;transition:opacity .3s ease
}
.card:hover .icon::before{opacity:1}
.card:hover .icon{
transform:scale(1.04);
box-shadow:0 5px 14px rgba(229,9,20,.12)
}
.titleBlock{min-width:0;flex:1}
.cardTitle{
font-weight:700;margin:0;line-height:1.3;font-size:19px;
letter-spacing:-.25px;color:var(--text)
}
.cardUrl{
margin-top:5px;color:var(--muted);font-size:12px;
white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
font-family:'SF Mono','Monaco','Courier New',monospace;
opacity:.75
}
.desc{
color:var(--muted);margin:0;min-height:46px;
line-height:1.6;font-size:14px;font-weight:400
}
.tags{display:flex;flex-wrap:wrap;gap:7px}
.tag{
border:1px solid rgba(229,9,20,.12);
background:rgba(229,9,20,.05);
border-radius:999px;
padding:5px 12px;font-size:12px;color:#ff8080;
font-weight:500;
transition:all .2s ease
}
.tag:hover{
background:rgba(229,9,20,.08);
border-color:rgba(229,9,20,.2);
transform:translateY(-1px)
}
.tag.accent{
border-color:rgba(229,9,20,.15);color:#ff9090;
background:rgba(229,9,20,.07)
}
.tag.info{
border-color:rgba(96,165,250,.15);color:#93c5fd;
background:rgba(96,165,250,.06)
}
.tag.warn{
border-color:rgba(251,191,36,.15);color:#fcd34d;
background:rgba(251,191,36,.06)
}
.actions{display:flex;gap:11px;justify-content:flex-end;flex-wrap:wrap;margin-top:9px}
.cardBtn{padding:10px 20px;border-radius:10px;font-size:13px}
.toast{
position:fixed;left:22px;right:22px;bottom:22px;z-index:9999;
display:flex;justify-content:center;pointer-events:none
}
.toastCard{
pointer-events:auto;max-width:460px;width:fit-content;
border:1px solid rgba(229,9,20,.15);border-radius:15px;
padding:15px 20px;
background:rgba(36,36,36,.95);
backdrop-filter:blur(16px);
box-shadow:0 12px 32px rgba(229,9,20,.15),inset 0 1px 0 0 rgba(255,255,255,.02);
animation:fadeInUp .3s ease
}
.toastTitle{font-weight:600;margin:0 0 4px;font-size:14px}
.toastMsg{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
@media (max-width: 1200px){
.grid{grid-template-columns:1fr}
.hero{padding:60px 44px}
.heroTitle{font-size:48px}
.wrap{padding:44px 28px 60px}
}
@media (max-width: 768px){
.topbar{padding:0 22px;height:62px}
.brand{font-size:18px}
.brand img{height:32px}
.hero{padding:44px 26px;border-radius:20px}
.heroTitle{font-size:38px;letter-spacing:-.9px}
.heroText{font-size:15px}
.card{padding:20px;border-radius:16px}
.icon{width:52px;height:52px;font-size:19px}
.cardTitle{font-size:18px}
.wrap{padding:28px 18px 44px}
.grid{gap:16px;grid-template-columns:1fr}
}
@media (max-width: 480px){
.topbar{padding:0 16px;height:58px}
.hero{padding:36px 20px}
.heroTitle{font-size:32px}
.heroText{font-size:14px}
.btn{padding:11px 20px;font-size:14px}
}
</style>
</head>
<body>
<!-- Animated Orbs -->
<div class="orb orb1"></div>
<div class="orb orb2"></div>
<div class="orb orb3"></div>
<div class="topbar">
<div class="brand">
<img src="logo.png" alt="Logo" />
Lumen Demos
</div>
</div>
<main class="wrap">
<section class="hero">
<h1 class="heroTitle">Lumen Demos</h1>
<p class="heroText">
Discover and explore interactive demos showcasing <code>Lumen</code> capabilities.
Experience decentralized apps with IPFS content, real-time PubSub, and seamless identity management.
</p>
<div class="heroRight">
<a class="btn primary" href="lumen://pubsub_chat.lumen.lmn">Launch Demo</a>
</div>
</section>
<section class="grid" aria-label="Demo list">
<!-- PubSub Chat -->
<div class="card" role="link" tabindex="0" data-href="lumen://pubsub_chat.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#e50914;border-color:rgba(229,9,20,.15);background:linear-gradient(135deg,rgba(229,9,20,.08),rgba(229,9,20,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">PubSub Chat</h2>
<div class="cardUrl">lumen://pubsub_chat.lumen.lmn</div>
</div>
</div>
<p class="desc">Real-time messaging with cryptographically signed messages (ADR-036), micro proof-of-work, intelligent rate limiting, and per-room blocklist management.</p>
<div class="tags">
<span class="tag accent">PubSub</span>
<span class="tag info">ADR-036</span>
<span class="tag warn">PoW</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://pubsub_chat.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://pubsub_chat.lumen.lmn">Launch</a>
</div>
</div>
<!-- PubSub Live Game -->
<div class="card" role="link" tabindex="0" data-href="lumen://pubsub_livegame.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#60a5fa;border-color:rgba(96,165,250,.15);background:linear-gradient(135deg,rgba(96,165,250,.08),rgba(96,165,250,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">PubSub Live Game</h2>
<div class="cardUrl">lumen://pubsub_livegame.lumen.lmn</div>
</div>
</div>
<p class="desc">Multiplayer real-time agar-style game playground where signed player states are broadcast over PubSub for seamless synchronization.</p>
<div class="tags">
<span class="tag accent">PubSub</span>
<span class="tag info">Realtime</span>
<span class="tag info">ADR-036</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://pubsub_livegame.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://pubsub_livegame.lumen.lmn">Launch</a>
</div>
</div>
<!-- Music Catalog -->
<div class="card" role="link" tabindex="0" data-href="lumen://music_catalog.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#f472b6;border-color:rgba(244,114,182,.15);background:linear-gradient(135deg,rgba(244,114,182,.08),rgba(244,114,182,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">Music Catalog</h2>
<div class="cardUrl">lumen://music_catalog.lumen.lmn</div>
</div>
</div>
<p class="desc">Browse and stream music tracks with album covers directly from IPFS using the lumen:// protocol for decentralized content delivery.</p>
<div class="tags">
<span class="tag">Catalog</span>
<span class="tag info">IPFS</span>
<span class="tag">Media</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://music_catalog.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://music_catalog.lumen.lmn">Launch</a>
</div>
</div>
<!-- Streaming Catalog -->
<div class="card" role="link" tabindex="0" data-href="lumen://streaming_catalog.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#fbbf24;border-color:rgba(251,191,36,.15);background:linear-gradient(135deg,rgba(251,191,36,.08),rgba(251,191,36,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">Streaming Catalog</h2>
<div class="cardUrl">lumen://streaming_catalog.lumen.lmn</div>
</div>
</div>
<p class="desc">Video streaming catalog with CID-based content and cover art, optimized for the Lumen gateway architecture and decentralized delivery.</p>
<div class="tags">
<span class="tag">Catalog</span>
<span class="tag info">Streaming</span>
<span class="tag info">IPFS</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://streaming_catalog.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://streaming_catalog.lumen.lmn">Launch</a>
</div>
</div>
<!-- Centrifuge Event Recap -->
<div class="card" role="link" tabindex="0" data-href="lumen://centrifuge_event_recap.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#67e8f9;border-color:rgba(103,232,249,.16);background:linear-gradient(135deg,rgba(103,232,249,.1),rgba(34,211,238,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v18h18"></path><path d="M7 15l4-4 3 3 5-7"></path></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">Centrifuge Event Recap</h2>
<div class="cardUrl">lumen://centrifuge_event_recap.lumen.lmn</div>
</div>
</div>
<p class="desc">Futurist leaderboard recap for the Lumen x Centrifuge challenge with CSV import, configurable LMN split, bech32 wallet conversion to lmn, and TX hash tracking.</p>
<div class="tags">
<span class="tag accent">Leaderboard</span>
<span class="tag info">CSV</span>
<span class="tag warn">TX Tracking</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://centrifuge_event_recap.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://centrifuge_event_recap.lumen.lmn">Launch</a>
</div>
</div>
<!-- Huge HLS Video -->
<div class="card" role="link" tabindex="0" data-href="lumen://ipfs/bafybeihb6i6kow7ui42fpfehqtmoy5f75zkz352or2mrwk3743rlfu2gr4/master.m3u8">
<div class="cardHead">
<div class="icon" style="color:#fbbf24;border-color:rgba(251,191,36,.15);background:linear-gradient(135deg,rgba(251,191,36,.08),rgba(251,191,36,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">HLS Video Stream</h2>
<div class="cardUrl">lumen://ipfs/bafybeihb6i6kow7ui42fpfehqtmoy5f75zkz352or2mrwk3743rlfu2gr4/...</div>
</div>
</div>
<p class="desc">High-quality HLS video streaming directly from IPFS. Perfect for stress-testing streaming performance and gateway selection algorithms.</p>
<div class="tags">
<span class="tag info">HLS</span>
<span class="tag info">Video</span>
<span class="tag">IPFS</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://ipfs/bafybeihb6i6kow7ui42fpfehqtmoy5f75zkz352or2mrwk3743rlfu2gr4/master.m3u8">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://ipfs/bafybeihb6i6kow7ui42fpfehqtmoy5f75zkz352or2mrwk3743rlfu2gr4/master.m3u8">Launch</a>
</div>
</div>
<!-- Book Library -->
<div class="card" role="link" tabindex="0" data-href="lumen://book_library.lumen.lmn">
<div class="cardHead">
<div class="icon" style="color:#a78bfa;border-color:rgba(167,139,250,.15);background:linear-gradient(135deg,rgba(167,139,250,.08),rgba(167,139,250,.04))">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>
</div>
<div class="titleBlock">
<h2 class="cardTitle">Book Library</h2>
<div class="cardUrl">lumen://book_library.lumen.lmn</div>
</div>
</div>
<p class="desc">Curated digital library with EPUB reader support. Browse and read books from IPFS with a fast, local-first user interface and seamless navigation.</p>
<div class="tags">
<span class="tag">Reader</span>
<span class="tag info">IPFS</span>
<span class="tag">Catalog</span>
</div>
<div class="actions">
<button class="btn cardBtn" type="button" data-copy="lumen://book_library.lumen.lmn">Copy Link</button>
<a class="btn primary cardBtn" href="lumen://book_library.lumen.lmn">Launch</a>
</div>
</div>
</section>
</main>
<div class="toast" id="toast" style="display:none">
<div class="toastCard">
<div class="toastTitle" id="toastTitle"></div>
<p class="toastMsg" id="toastMsg"></p>
</div>
</div>
<script>
(function(){
const toastEl = document.getElementById('toast');
const toastTitleEl = document.getElementById('toastTitle');
const toastMsgEl = document.getElementById('toastMsg');
let toastT = 0;
function showToast(title, msg){
try { clearTimeout(toastT); } catch {}
toastTitleEl.textContent = String(title || '');
toastMsgEl.textContent = String(msg || '');
toastEl.style.display = 'flex';
toastT = setTimeout(() => { toastEl.style.display = 'none'; }, 2200);
}
function openHref(href){
const url = String(href || '').trim();
if (!url) return;
try {
const a = document.createElement('a');
a.href = url;
a.target = '_self';
a.rel = 'noreferrer';
a.style.position = 'fixed';
a.style.left = '-9999px';
a.style.top = '0';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
return;
} catch {}
window.location.href = url;
}
async function copyText(text){
const s = String(text || '').trim();
if (!s) return;
try {
if (navigator.clipboard && navigator.clipboard.writeText) {
await navigator.clipboard.writeText(s);
return;
}
} catch {}
try {
const ta = document.createElement('textarea');
ta.value = s;
ta.style.position = 'fixed';
ta.style.left = '-9999px';
ta.style.top = '0';
document.body.appendChild(ta);
ta.select();
document.execCommand('copy');
document.body.removeChild(ta);
} catch {}
}
document.addEventListener('click', async (e) => {
const t = e.target;
if (!(t instanceof HTMLElement)) return;
const copy = t.closest('[data-copy]');
if (copy) {
e.preventDefault();
e.stopPropagation();
const url = copy.getAttribute('data-copy') || '';
await copyText(url);
showToast('Copied', url);
return;
}
const card = t.closest('[data-href]');
if (card) {
const url = card.getAttribute('data-href') || '';
openHref(url);
}
});
document.addEventListener('keydown', (e) => {
if (e.key !== 'Enter' && e.key !== ' ') return;
const t = e.target;
if (!(t instanceof HTMLElement)) return;
const card = t.closest('[data-href]');
if (!card) return;
e.preventDefault();
openHref(card.getAttribute('data-href') || '');
});
})();
</script>
</body>
</html>