-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapps-deck_v8.html
More file actions
566 lines (530 loc) · 41.1 KB
/
Copy pathapps-deck_v8.html
File metadata and controls
566 lines (530 loc) · 41.1 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
<!DOCTYPE html>
<html lang="en" data-site="deck">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>Apps — Linlin Jia</title>
<meta name="description" content="A full-screen view of Linlin Jia's built works: one app per page, leafed like a book.">
<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=JetBrains+Mono:wght@400;500&family=Patrick+Hand&family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/style.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
<!-- reuse the gallery's controls design (filter-tag / search-box / sort-select / section-controls) + parchment -->
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/parchment-overrides.css">
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%231e3a8a' width='32' height='32' rx='7'/%3E%3Ctext x='50%25' y='74%25' text-anchor='middle' fill='white' font-family='PingFang SC,Microsoft YaHei,sans-serif' font-size='22' font-weight='900'%3E%E6%9E%97%3C/text%3E%3C/svg%3E">
<style>
:root{
--ink: oklch(0.26 0.04 45); --ink-soft: oklch(0.42 0.04 42);
--cinnabar: oklch(0.50 0.18 30); --maroon: oklch(0.45 0.15 30);
--gilt: oklch(0.66 0.12 78); --gilt-deep: oklch(0.58 0.12 72);
--qing: oklch(0.45 0.12 175); --rule: oklch(0.5 0.06 45 / 0.32); --cream: oklch(0.93 0.030 78);
--disp: 'Patrick Hand','LXGW WenKai',cursive; --serif: 'Spectral','LXGW WenKai',Georgia,serif; --mono: 'JetBrains Mono','LXGW WenKai',monospace;
}
*{ box-sizing:border-box; }
html,body{ margin:0 !important; padding:0 !important; height:100%; max-width:none !important; overflow:hidden !important; font-family:var(--serif) !important; color:var(--ink);
-webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{ background:transparent !important; }
/* ---- Font isolation (mobile==desktop). The deck pulls in parchment-overrides.css
for the palette + .filter-tag/.section-controls styling, but that file forces the
SITE's handwriting fonts (Reenie Beanie / Indie Flower) AND em font-sizes/weight/
line-height with !important on bare body / p / li / h2. The standalone deck never
loads those webfonts, so they fall back to platform `cursive` — which renders
differently on phones vs desktop. Re-assert the deck's OWN (loaded) fonts + the
hijacked metrics so the typography is identical on every screen. NOTE: we do NOT
!important .m-title font-size — fitTitles() owns that via an inline style. ---- */
.deck-rotor .m-role{ font-family:var(--mono) !important; font-size:clamp(0.72rem,1vw,0.86rem) !important; font-weight:400 !important; line-height:1.4 !important; }
.deck-rotor .m-title{ font-family:var(--disp) !important; font-weight:400 !important; line-height:0.98 !important; }
.deck-rotor .m-desc{ font-family:var(--serif) !important; font-size:clamp(0.98rem,1.15vw,1.18rem) !important; font-weight:400 !important; line-height:1.5 !important; }
.deck-rotor .m-why{ font-family:var(--serif) !important; font-size:0.95rem !important; font-weight:400 !important; line-height:1.5 !important; }
.deck-rotor .m-tags li{ font-family:var(--mono) !important; font-size:0.72rem !important; font-weight:400 !important; line-height:1.4 !important; }
.deck-rotor .m-acts a{ font-family:var(--disp) !important; font-weight:400 !important; }
.deck-rotor .folio, .deck-folio{ font-family:var(--mono) !important; }
.deck-rotor .plate-tape, .deck-rotor .seal-txt, .deck-rotor .deck-empty, .deck-hint, .deck-rotor .deck-onboard{ font-family:var(--disp) !important; }
.deck-ribbon .brand{ font-family:var(--disp) !important; font-weight:400 !important; }
.deck-ribbon .filter-tag, .deck-ribbon .search-box input, .deck-ribbon .sort-select{ font-family:var(--mono) !important; }
.deck{ width:100vw; height:100vh; height:100dvh; perspective:1600px; }
/* .deck-slide just centres a .deck-canvas; the canvas holds the actual spread and
can be scaled (--fit) to fit short viewports so nothing is ever clipped. */
.deck-slide{ position:relative; width:100%; height:100%; display:flex;
align-items:center; justify-content:center; overflow:hidden; }
/* image + text are two auto-width columns CENTRED as one group (justify-content
:center), so the composition is always centred regardless of image/text size.
Side alternates by index. Never vertical. */
.deck-canvas{ display:grid; grid-template-columns:auto auto;
justify-content:center; align-items:center; gap:clamp(2.2rem,4.5vw,5.5rem);
padding: clamp(1.2rem,2.6vw,3rem) clamp(1.6rem,3.4vw,4.4rem);
transform-origin:center center; transform:scale(var(--fit,1)); }
/* image is the hero: big + crisp. The generous gap keeps the multiply-floated
screenshot text away from the title. */
.deck-slide .plate{ width:clamp(360px,54vw,820px); }
.deck-slide .margin{ width:clamp(240px,28vw,26rem); }
.deck-slide.flip .plate{ order:2; }
.deck-slide.flip .margin{ order:1; }
.deck-slide--specimen .plate{ width:clamp(400px,57vw,900px); }
/* plate (screenshot / diagram): embedded directly into the paper, NO frame /
shadow / card background — the whole page reads as one manuscript. */
.plate{ position:relative; }
.plate-frame{ position:relative; }
.rstack{ position:relative; width:100%; aspect-ratio:16/10; max-height:80vh; cursor:zoom-in; overflow:hidden; }
/* multiply lets the screenshot's white background show the parchment through,
so it reads as printed-on-the-page rather than a pasted white rectangle.
contrast+saturate keep it crisp/vivid so the embed still reads sharp, not muddy. */
.rimg{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; opacity:0; transition:opacity .8s ease; filter:contrast(1.06) saturate(1.07); mix-blend-mode:multiply; }
.rimg.on{ opacity:1; }
.deck-slide--specimen .rstack{ aspect-ratio:3/2; }
.rdots{ position:absolute; left:0; right:0; bottom:-18px; z-index:4; display:flex; justify-content:center; gap:6px; }
.rdots i{ width:7px; height:7px; border-radius:50%; background:var(--gilt-deep); opacity:0.5; cursor:pointer; transition:transform .2s, opacity .2s; }
.rdots i.on{ opacity:1; background:var(--cinnabar); transform:scale(1.3); }
/* in-image rotate arrows for multi-image plates (rotate the images, not the deck) */
.rnav{ position:absolute; top:50%; transform:translateY(-50%); z-index:6; width:34px; height:48px; display:grid; place-items:center;
background:none; border:none; color:var(--maroon); font-size:1.9rem; cursor:pointer; opacity:0; transition:opacity .25s, color .2s;
text-shadow:0 1px 3px oklch(0.95 0.02 80 / 0.8); }
.rnav.prev{ left:-6px; } .rnav.next{ right:-6px; }
.plate[data-multi]:hover .rnav{ opacity:0.85; }
.rnav:hover{ color:var(--cinnabar); opacity:1; }
.plate-zoomcue{ position:absolute; top:8px; right:8px; z-index:4; color:var(--ink-soft); opacity:0; transition:opacity .25s; pointer-events:none; text-shadow:0 1px 2px oklch(0.95 0.02 80 / 0.8); }
.plate:hover .plate-zoomcue{ opacity:0.7; }
.plate-tape{ position:absolute; top:-13px; left:-26px; z-index:3; transform:rotate(-24deg); font-family:var(--disp); font-size:0.82rem;
letter-spacing:0.18em; text-transform:uppercase; color:#5a3a16; padding:0.2em 2.2em; box-shadow:0 3px 7px oklch(0.4 0.05 40 / 0.3);
background:linear-gradient(135deg,oklch(0.86 0.07 86 / 0.95),oklch(0.78 0.09 84 / 0.92)); clip-path:polygon(2% 0,98% 6%,100% 96%,0 100%); }
/* wax seal: responsive size (scales down on small / mobile screens) */
.plate.sealed{ --seal:clamp(40px,5.5vw,72px); --seal-off:clamp(-13px,-1.5vw,-17px); }
.plate.sealed::after{ content:""; position:absolute; right:var(--seal-off); bottom:var(--seal-off); width:var(--seal); height:var(--seal); z-index:4;
background:radial-gradient(circle at 38% 34%,oklch(0.55 0.19 28),oklch(0.40 0.17 28) 70%); border-radius:50%;
box-shadow:0 6px 14px oklch(0.3 0.1 30 / 0.4), inset 0 2px 6px oklch(1 0 0 / 0.18);
clip-path:polygon(50% 0,62% 12%,80% 8%,82% 27%,98% 38%,88% 53%,95% 72%,76% 75%,67% 93%,50% 84%,33% 93%,24% 75%,5% 72%,12% 53%,2% 38%,18% 27%,20% 8%,38% 12%); }
/* seal text overlays the ::after seal exactly (same size + offset) */
.plate.sealed .seal-txt{ position:absolute; right:var(--seal-off); bottom:var(--seal-off); width:var(--seal); height:var(--seal); z-index:5; display:grid; place-items:center;
transform:rotate(-8deg); font-family:var(--disp); font-size:calc(var(--seal)*0.2); letter-spacing:0.04em; color:oklch(0.93 0.04 60 / 0.92); pointer-events:none; }
.margin{ max-width:46ch; }
.m-role{ font-family:var(--mono); font-size:clamp(0.72rem,1vw,0.86rem); letter-spacing:0.14em; text-transform:uppercase; color:var(--ink-soft); margin:0 0 0.5em; }
.m-title{ font-family:var(--disp); font-weight:400; color:var(--ink); font-size:clamp(2.4rem,5.6vw,5rem); line-height:0.98; margin:0 0 0.34em; }
.m-title .hl{ color:var(--cinnabar); }
.deck-slide--specimen .m-title{ font-size:clamp(2rem,4.4vw,3.9rem); }
.m-desc{ font-family:var(--serif); font-size:clamp(0.98rem,1.15vw,1.18rem); line-height:1.5; color:var(--ink); margin:0 0 1em; }
.m-why{ font-family:var(--serif); font-style:italic; font-size:0.95rem; color:var(--ink-soft); margin:0 0 1em; }
.m-tags{ list-style:none; display:flex; flex-wrap:wrap; gap:0.45em; padding:0; margin:0 0 1.1em; }
.m-tags li{ font-family:var(--mono); font-size:0.72rem; letter-spacing:0.04em; color:var(--maroon); border-bottom:1px solid oklch(0.5 0.12 30 / 0.4); padding:0 0.1em 0.1em; }
.m-acts{ display:flex; flex-wrap:wrap; gap:1.1em; align-items:center; }
.m-acts a{ font-family:var(--disp); font-size:1.18rem; color:var(--maroon); text-decoration:none; display:inline-flex; align-items:center; gap:0.35em; }
.m-acts a:hover{ color:var(--cinnabar); }
.m-acts a .pip{ width:7px; height:7px; border-radius:50%; background:var(--qing); display:inline-block; box-shadow:0 0 6px var(--qing); }
.folio{ position:absolute; bottom:clamp(1.2rem,3vh,2.4rem); right:clamp(1.6rem,4vw,4rem); font-family:var(--mono); font-size:0.82rem; letter-spacing:0.18em; color:var(--gilt-deep); }
/* reveal: the text margin is hidden on every NON-active slide (deterministic
via :not(active), no animation-fill bleed) so a 3D side face never shows
readable text overlapping the active page. The image may peek (that IS the
3D turn). Active slide fades its text up. */
.deck-slide .margin{ opacity:0; transform:translateY(10px); transition:opacity .45s ease, transform .55s cubic-bezier(0.16,1,0.3,1); }
.swiper-slide-active .margin{ opacity:1; transform:none; }
/* ===== big left/right page-turn marks: ink on paper, no card button ===== */
.deck-arrow{ position:fixed; top:50%; transform:translateY(-50%); z-index:24;
background:none; border:none; border-radius:0; box-shadow:none; padding:0.2em 0.3em;
color:var(--maroon); font-size:clamp(2.4rem,4.2vw,3.8rem); cursor:pointer;
text-shadow:0 1px 3px oklch(0.94 0.02 80 / 0.85);
opacity:0; transition:opacity .35s, transform .35s, color .2s; }
.deck-arrow--prev{ left:clamp(0.4rem,1.6vw,1.6rem); }
.deck-arrow--next{ right:clamp(0.4rem,1.6vw,1.6rem); }
.deck-arrow:hover{ color:var(--cinnabar); transform:translateY(-50%) scale(1.14); }
body.controls-on .deck-arrow{ opacity:1; }
body.single .deck-arrow, body.single .deck-folio{ display:none; } /* nothing to leaf to */
/* first-load teaching nudge: arrows appear + pulse left-right so users know it leafs */
body.intro .deck-arrow{ opacity:1; }
body.intro .deck-arrow--prev{ animation:nudgeL 1.1s ease-in-out 2; }
body.intro .deck-arrow--next{ animation:nudgeR 1.1s ease-in-out 2; }
@keyframes nudgeL{ 0%,100%{ transform:translateY(-50%) translateX(0); } 50%{ transform:translateY(-50%) translateX(-10px); } }
@keyframes nudgeR{ 0%,100%{ transform:translateY(-50%) translateX(0); } 50%{ transform:translateY(-50%) translateX(10px); } }
.deck-onboard{ position:fixed; left:50%; bottom:clamp(3rem,8vh,6rem); transform:translateX(-50%); z-index:25;
font-family:var(--disp); font-size:1.05rem; color:var(--ink); background:oklch(0.95 0.025 84 / 0.9); border:1px solid var(--rule);
border-radius:9px 5px 10px 6px; padding:0.4em 1.1em; box-shadow:0 6px 16px oklch(0.3 0.04 50 / 0.18); opacity:0; pointer-events:none; }
body.intro .deck-onboard{ animation:onb 4.5s ease forwards; }
@keyframes onb{ 0%{ opacity:0; transform:translateX(-50%) translateY(8px); } 12%,75%{ opacity:1; transform:translateX(-50%) translateY(0); } 100%{ opacity:0; } }
/* ===== top ribbon (reuses gallery .section-controls / .filter-tag / .search-box / .sort-select) ===== */
.deck-ribbon{ position:fixed; top:0; left:0; right:0; z-index:30; display:flex; align-items:center; gap:1em; flex-wrap:wrap;
padding:0.55em clamp(1rem,3vw,2.4rem); background:linear-gradient(180deg,oklch(0.92 0.03 80 / 0.97),oklch(0.92 0.03 80 / 0));
transform:translateY(-105%); transition:transform .42s cubic-bezier(0.16,1,0.3,1); }
body.controls-on .deck-ribbon, .deck-ribbon:hover, .deck-ribbon:focus-within{ transform:translateY(0); }
.deck-ribbon .brand{ font-family:var(--disp); font-size:1.2rem; color:var(--ink); text-decoration:none; display:flex; align-items:center; gap:0.4em; }
.deck-ribbon .brand .mk{ width:26px; height:26px; border-radius:7px; background:linear-gradient(150deg,#1e3a8a,#2b4db8); color:#fff; display:grid; place-items:center; font-family:sans-serif; font-weight:900; font-size:0.78rem; }
.deck-ribbon .section-controls{ margin:0 !important; flex:1; }
.deck-tools{ display:flex; align-items:center; gap:0.9em; }
.deck-tools button, .deck-tools a{ background:transparent; border:none; color:var(--ink-soft); cursor:pointer; font-size:1rem; display:inline-flex; align-items:center; text-decoration:none; }
.deck-tools button:hover, .deck-tools a:hover{ color:var(--maroon); }
/* mode switcher (Deck active here) — mirrors the gallery's .mode pill so the
Deck/Cards/Detailed trio highlights the current mode on every view. */
.mode{ display:inline-flex; border:1px solid oklch(0.45 0.15 30 / 0.32); border-radius:999px; overflow:hidden; }
.mode a, .mode span{ font-family:var(--mono); font-size:0.72rem; padding:0.36em 0.85em; background:none; cursor:pointer; display:inline-flex; align-items:center; gap:0.3em; text-decoration:none; white-space:nowrap; }
#deckMode a:not(.on), #deckMode span:not(.on){ color:var(--ink-soft) !important; } /* ID beats parchment's global maroon link rule */
#deckMode span.on, #deckMode a.on{ background:var(--maroon) !important; color:#fdf3e3 !important; cursor:default; }
.mode a:hover:not(.on){ background:oklch(0.45 0.15 30 / 0.12); }
/* autoplay progress bar (very bottom) */
.deck-prog{ position:fixed; left:0; bottom:0; height:3px; width:0; z-index:21; background:linear-gradient(90deg,var(--gilt),var(--cinnabar)); transition:width .15s linear; opacity:0.85; }
/* page indicator: ink tally-strokes rising from a gilt rule, like marks down a
manuscript's page edge. Active = a tall cinnabar stroke. */
.deck-folio{ position:fixed; left:0; right:0; bottom:12px; z-index:20; display:flex; align-items:flex-end; justify-content:center; gap:6px; opacity:0; transition:opacity .4s; pointer-events:none; }
body.controls-on .deck-folio{ opacity:1; pointer-events:auto; }
.deck-folio::before{ content:""; position:absolute; left:50%; bottom:3px; transform:translateX(-50%); width:min(58vw,400px); height:1px;
background:linear-gradient(90deg,transparent,var(--gilt) 14%,var(--gilt) 86%,transparent); opacity:0.7; }
.deck-folio .tick{ position:relative; width:2px; height:10px; border:none; border-radius:1.5px 1.5px 0 0; background:var(--gilt-deep); opacity:0.5; cursor:pointer; padding:0; transition:height .25s cubic-bezier(0.16,1,0.3,1), background .25s, opacity .25s; }
.deck-folio .tick:hover{ opacity:0.85; height:14px; }
.deck-folio .tick.on{ height:19px; background:var(--cinnabar); opacity:1; }
.deck-empty{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; font-family:var(--disp); font-size:1.6rem; color:var(--ink-soft); z-index:5; }
.deck-empty.on{ display:flex; }
/* lightbox */
.deck-lb{ position:fixed; inset:0; z-index:60; display:none; align-items:center; justify-content:center; background:oklch(0.2 0.03 40 / 0.86); padding:3vw; }
.deck-lb.on{ display:flex; }
.deck-lb img{ max-width:92vw; max-height:92vh; border-radius:4px; box-shadow:0 30px 70px oklch(0 0 0 / 0.5); background:#fff; }
.deck-lb button{ position:absolute; background:none; border:none; color:oklch(0.95 0.02 85); cursor:pointer; }
.deck-lb .x{ top:3vw; right:4vw; font-size:2rem; }
.deck-lb .nav{ top:50%; transform:translateY(-50%); font-size:3rem; padding:0 1.4vw; opacity:0.75; }
.deck-lb .nav:hover{ opacity:1; } .deck-lb .prev{ left:1vw; } .deck-lb .next{ right:1vw; }
/* visually-hidden live region */
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
/* focus visibility */
.deck-arrow:focus-visible, .deck-folio .tick:focus-visible, .deck-tools button:focus-visible, .rstack:focus-visible{ outline:2px solid var(--cinnabar); outline-offset:3px; }
/* mobile: force landscape by rotating the deck; custom touch handler restores swipe */
.deck-hint{ position:fixed; inset:0; z-index:40; display:none; flex-direction:column; align-items:center; justify-content:center; gap:1em; background:var(--cream); color:var(--ink); text-align:center; font-family:var(--disp); transition:opacity .45s ease, visibility .45s ease; }
.deck-hint i{ font-size:3rem; color:var(--maroon); animation:tilt 2s ease-in-out infinite; }
.deck-hint p{ font-size:1.3rem; max-width:18ch; }
@keyframes tilt{ 0%,100%{ transform:rotate(0); } 50%{ transform:rotate(90deg); } }
/* mobile ribbon: ONE compact scrollable row, never wrap. It used to wrap to
2-3 rows (brand + tags + search + sort + tools) → a 138px bar that overlapped
the slide. Now the 林 mark + a horizontally-scrolling tag strip + search +
sort + tools all sit on a single ~40px row; only the tags scroll. */
@media (max-width:1024px){
.deck-ribbon{ flex-wrap:nowrap !important; gap:0.55em;
background:linear-gradient(180deg, oklch(0.93 0.03 80 / 0.98) 72%, oklch(0.93 0.03 80 / 0)); }
.deck-ribbon .brand{ flex:0 0 auto; font-size:0; gap:0; } /* keep the 林 mark, drop the name text */
.deck-ribbon .section-controls{ flex-direction:row !important; flex-wrap:nowrap !important; align-items:center; min-width:0; gap:0.5em; }
.deck-ribbon .filter-tags{ flex:1 1 auto; flex-wrap:nowrap !important; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; min-width:0; }
.deck-ribbon .filter-tags::-webkit-scrollbar{ display:none; }
.deck-ribbon .filter-tag{ flex:0 0 auto !important; white-space:nowrap; }
.deck-ribbon .search-box{ flex:0 0 auto; }
.deck-ribbon .search-box input{ width:7em; }
.deck-ribbon .sort-select{ flex:0 0 auto; }
.deck-tools{ flex:0 0 auto; gap:0.7em; }
}
/* rotated portrait → landscape. dvh/dvw so the rotated frame fits the VISIBLE
viewport (browser chrome included), and content tightened for the short frame. */
@media (orientation:portrait) and (max-width:820px){
.deck-rotor{ position:fixed; top:50%; left:50%; width:100dvh; height:100dvw; transform-origin:center center; transform:translate(-50%,-50%) rotate(90deg); }
.deck, .deck .deck-slide{ width:100dvh; height:100dvw; }
.deck-canvas{ padding:0.5rem 1.5rem; gap:1.4rem; }
.m-title{ font-size:clamp(1.5rem,3.2dvh,2.6rem) !important; line-height:1.0; margin-bottom:0.18em; }
.deck-rotor .m-role{ font-size:0.64rem !important; margin-bottom:0.28em; }
.deck-rotor .m-desc{ font-size:clamp(0.76rem,1.7dvh,0.95rem) !important; line-height:1.3 !important; margin-bottom:0.4em; }
.deck-rotor .m-why{ font-size:0.78rem !important; line-height:1.3 !important; margin-bottom:0.4em; }
.m-tags{ margin-bottom:0.4em; } .deck-rotor .m-tags li{ font-size:0.62rem !important; }
.m-acts{ gap:0.8em; } .m-acts a{ font-size:0.95rem; }
.deck-arrow{ font-size:1.6rem; }
.deck-ribbon{ padding:0.3em 0.7em; gap:0.5em; }
.folio{ font-size:0.64rem; bottom:0.6rem; right:1rem; }
.deck-hint{ display:flex; } .deck-hint.dismissed{ opacity:0; visibility:hidden; pointer-events:none; }
}
/* real landscape on a short phone viewport (browser landscape, not fullscreen) */
@media (orientation:landscape) and (max-height:520px){
.deck-canvas{ padding:0.5rem 1.8rem; gap:1.5rem; }
.m-title{ font-size:clamp(1.6rem,6vw,2.8rem) !important; line-height:1.0; margin-bottom:0.18em; }
.m-role{ margin-bottom:0.28em; }
.deck-rotor .m-desc{ font-size:0.84rem !important; line-height:1.3 !important; margin-bottom:0.4em; }
.deck-rotor .m-why{ line-height:1.3 !important; margin-bottom:0.4em; }
.m-tags{ margin-bottom:0.4em; } .deck-rotor .m-tags li{ font-size:0.62rem !important; } .m-acts a{ font-size:0.95rem; }
.deck-ribbon{ padding:0.3em 0.8em; gap:0.5em; }
.deck-arrow{ font-size:1.7rem; }
}
@media (prefers-reduced-motion:reduce){
.swiper-slide-active .margin{ opacity:1; transform:none; }
.deck-hint i, body.intro .deck-arrow{ animation:none; }
.rstack .rimg{ transition:none; }
}
</style>
<link rel="stylesheet" href="css/polish.css">
</head>
<body data-theme="academic">
<!-- everything lives inside .deck-rotor so it ALL rotates to landscape on mobile -->
<div class="deck-rotor">
<div class="swiper deck" id="deck"><div class="swiper-wrapper" id="deckWrap"></div></div>
<button class="deck-arrow deck-arrow--prev" id="arrowPrev" aria-label="Previous app"><i class="fas fa-chevron-left" aria-hidden="true"></i></button>
<button class="deck-arrow deck-arrow--next" id="arrowNext" aria-label="Next app"><i class="fas fa-chevron-right" aria-hidden="true"></i></button>
<div class="deck-onboard" id="onboard">Swipe, or use the arrows to leaf through</div>
<div class="deck-prog" id="deckProg"></div>
<div class="deck-folio" id="deckFolio" role="group" aria-label="App index"></div>
<header class="deck-ribbon" id="ribbon">
<a class="brand" href="index_en.html"><span class="mk">林</span> Linlin Jia</a>
<div class="section-controls">
<div class="filter-tags" id="deckTags" role="group" aria-label="Filter by tag"></div>
<div class="search-box"><i class="fas fa-search" aria-hidden="true"></i><input type="text" id="deckSearch" placeholder="Search apps..." aria-label="Search apps"></div>
<select class="sort-select" id="deckSort" aria-label="Sort apps">
<option value="featured" selected>Featured</option>
<option value="newest">Newest</option>
<option value="oldest">Oldest</option>
</select>
</div>
<div class="deck-tools">
<button id="btnAuto" title="Play / pause auto-leaf" aria-label="Play or pause autoplay"><i class="fas fa-pause" aria-hidden="true"></i></button>
<button id="btnFull" title="Fullscreen" aria-label="Toggle fullscreen"><i class="fas fa-expand" aria-hidden="true"></i></button>
</div>
<div class="mode" id="deckMode" role="group" aria-label="View mode">
<span class="on" title="Deck — you are here"><i class="fas fa-clone" aria-hidden="true"></i> Deck</span>
<a href="apps-gallery.html?view=cards"><i class="fas fa-table-cells-large" aria-hidden="true"></i> Cards</a>
<a href="apps-gallery.html?view=detailed"><i class="fas fa-list" aria-hidden="true"></i> Detailed</a>
</div>
</header>
<div class="deck-empty" id="deckEmpty">No apps match that filter.</div>
<div class="sr-only" aria-live="polite" id="deckLive"></div>
<div class="deck-lb" id="deckLb">
<button class="x" id="deckLbX" aria-label="Close">×</button>
<button class="nav prev" id="deckLbPrev" aria-label="Previous image">‹</button>
<img id="deckLbImg" src="" alt="">
<button class="nav next" id="deckLbNext" aria-label="Next image">›</button>
</div>
</div>
<!-- portrait-only "turn your phone" hint: stays UPRIGHT outside the rotor -->
<div class="deck-hint" id="deckHint"><i class="fas fa-mobile-screen-button" aria-hidden="true"></i><p>Turn your phone to view.</p></div>
<script src="js/projects-data.js"></script>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<script>
(function(){
'use strict';
var ROMAN=[[10,'x'],[9,'ix'],[5,'v'],[4,'iv'],[1,'i']];
function roman(n){ var s=''; ROMAN.forEach(function(p){ while(n>=p[0]){ s+=p[1]; n-=p[0]; } }); return s; }
var ALL=(window.PROJECTS||[]).filter(function(p){ return p.show && p.show.gallery; });
var reduce=window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var isTouch=window.matchMedia('(pointer: coarse)').matches;
var rotorTimers=[]; // declared before Swiper init (its init callback calls setupRotators)
function variantOf(p){ var im=(p.images&&p.images[0]&&p.images[0].src)||''; return /\.svg(\?|$)/.test(im)?'specimen':'plate'; }
function titleHTML(p){ var t=p.titleShort||p.id; return '<span class="hl">'+t.charAt(0)+'</span>'+t.slice(1); }
function actsHTML(p){
return (p.links||[]).map(function(l){ var demo=/demo|open|site/i.test(l.label);
return '<a href="'+l.href+'" target="_blank" rel="noopener noreferrer">'+(demo?'<span class="pip"></span> ':'<i class="'+l.icon+'"></i> ')+l.label+'</a>';
}).join('');
}
function slideHTML(p, idx, total){
var v=variantOf(p), flip=idx%2===1, sealed=!!p.why, imgs=p.images||[], multi=imgs.length>1;
var stack=imgs.map(function(im,k){ return '<img class="rimg'+(k===0?' on':'')+'" src="'+im.src+'" alt="'+(im.alt||'')+'" loading="'+(idx<2?'eager':'lazy')+'" decoding="async">'; }).join('');
var dots = multi ? '<div class="rdots"></div>' : '';
var rnav = multi ? '<button class="rnav prev" type="button" aria-label="Previous image">‹</button><button class="rnav next" type="button" aria-label="Next image">›</button>' : '';
var tags=(p.tagLabels||[]).slice(0,4).map(function(t){ return '<li>'+t+'</li>'; }).join('');
var plate='<div class="plate'+(sealed?' sealed':'')+'"'+(multi?' data-multi="1"':'')+' data-swiper-parallax="'+(v==='specimen'?'-90':'-130')+'">'+
(p.featured?'<span class="plate-tape">Featured</span>':'')+
'<div class="plate-frame">'+
'<div class="rstack" tabindex="0" role="button" aria-label="Enlarge image">'+stack+'</div>'+ rnav + dots +
'<span class="plate-zoomcue"><i class="fas fa-magnifying-glass-plus"></i></span>'+
'</div>'+ (sealed?'<span class="seal-txt">NDA</span>':'') + '</div>';
var margin='<div class="margin">'+
'<p class="m-role" data-swiper-parallax="-50">'+(p.badgeText||'')+' · '+(p.date||'')+'</p>'+
'<h2 class="m-title" data-swiper-parallax="-30">'+titleHTML(p)+'</h2>'+
'<p class="m-desc" data-swiper-parallax="-20">'+(p.blurb||'')+'</p>'+
(sealed?'<p class="m-why" data-swiper-parallax="-20">'+p.why+'</p>':'')+
'<ul class="m-tags" data-swiper-parallax="-16">'+tags+'</ul>'+
'<div class="m-acts" data-swiper-parallax="-12">'+actsHTML(p)+'</div>'+
'</div>';
var inner = flip?(margin+plate):(plate+margin);
return '<div class="swiper-slide deck-slide deck-slide--'+v+(flip?' flip':'')+'" data-hash="'+p.id+'" role="group" aria-roledescription="slide" aria-label="'+(p.titleShort||p.id)+', app '+(idx+1)+' of '+total+'">'+
'<div class="deck-canvas">'+inner+'</div>'+
'<span class="folio" data-swiper-parallax="-200">'+roman(idx+1)+' / '+roman(total)+'</span></div>';
}
var state={ tag:'all', q:'', sort:'featured' };
function ordered(list){
var a=list.slice();
a.sort(function(x,y){ return state.sort==='newest'?(y.year-x.year):state.sort==='oldest'?(x.year-y.year):((y.priority||0)-(x.priority||0)); });
return a;
}
function filtered(){
return ordered(ALL.filter(function(p){
var tagHit=state.tag==='all'||(p.tags||[]).indexOf(state.tag)>=0;
var qHit=!state.q||[p.titleFull,p.titleShort,p.blurb,(p.tagLabels||[]).join(' ')].join(' ').toLowerCase().indexOf(state.q)>=0;
return tagHit&&qHit;
}));
}
var current=[];
function buildSlides(){
current=filtered(); var total=current.length;
document.getElementById('deckWrap').innerHTML=current.map(function(p,i){ return slideHTML(p,i,total); }).join('');
document.getElementById('deckEmpty').classList.toggle('on', total===0);
document.body.classList.toggle('single', total<=1);
buildFolio(total);
return current;
}
function buildFolio(total){
var f=document.getElementById('deckFolio'); var h='';
for(var i=0;i<total;i++){ h+='<button class="tick" data-i="'+i+'" aria-label="Go to app '+(i+1)+'"></button>'; }
f.innerHTML=h;
}
function buildTags(){
var set={}; ALL.forEach(function(p){ (p.tags||[]).forEach(function(t){ set[t]=1; }); });
var order=['all','llm','agents','graph','vision','software','spatio-temporal','industry','academia','fun'].filter(function(t){ return t==='all'||set[t]; });
document.getElementById('deckTags').innerHTML=order.map(function(t){ return '<button class="filter-tag'+(t==='all'?' active':'')+'" data-tag="'+t+'">'+(t==='all'?'All':t)+'</button>'; }).join('');
}
buildTags(); buildSlides();
// ===== Swiper with switchable transition effect (page-turn options) =====
var fx='cube', swiper;
function makeConfig(effect){
var cfg={ speed:760, grabCursor:true, loop:true, loopAdditionalSlides:2,
keyboard:{ enabled:true }, mousewheel:{ forceToAxis:true, thresholdDelta:24 },
a11y:{ enabled:true },
autoplay:(reduce||isTouch)?false:{ delay:6000, disableOnInteraction:false },
pagination:{ el:'#deckFolio', clickable:true, bulletClass:'tick', bulletActiveClass:'on',
renderBullet:function(i,cls){ return '<button class="'+cls+'" data-i="'+i+'" aria-label="Go to app '+(i+1)+'"></button>'; } },
on:{
init:function(){ announce(this); setupRotators(); relayout(); },
slideChange:function(){ announce(this); },
slideChangeTransitionStart:function(){ setupRotators(); fitSlide(); },
autoplayTimeLeft:function(s,time,progress){ document.getElementById('deckProg').style.width=((1-progress)*100).toFixed(1)+'%'; },
autoplayStop:function(){ document.getElementById('deckProg').style.width='0%'; }
} };
// Always a 3D cube turn: a creative rotateY where the adjacent faces sit
// edge-on (rotate ±90°) at rest, so NOTHING peeks / overlaps the active page;
// they turn in to the front as you swipe (from inside the screen). Loop-clean.
cfg.effect='creative';
cfg.creativeEffect={ limitProgress:1,
prev:{ shadow:false, translate:['-100%',0,0], rotate:[0,-90,0] },
next:{ shadow:false, translate:['100%',0,0], rotate:[0,90,0] } };
return cfg;
}
function buildSwiper(effect, startIndex){
fx=effect;
if(swiper){ try{ swiper.destroy(true,true); }catch(e){} }
swiper=new Swiper('#deck', makeConfig(effect));
window.__deck=swiper;
if(startIndex){ swiper.slideTo(startIndex,0); }
if(typeof applyRotMode==='function') applyRotMode();
}
buildSwiper(fx, 0);
function announce(s){
s=s||swiper; if(!s) return; var i=s.realIndex||s.activeIndex||0; var p=current[i];
if(p) document.getElementById('deckLive').textContent='App '+(i+1)+' of '+current.length+': '+(p.titleShort||p.id);
}
// Shrink only titles whose single unbreakable word (e.g. "PLANALYSER") would
// overflow its column and lap onto the image. Multi-word titles wrap and are
// left at full size, so short names stay big and striking.
function fitTitles(){
document.querySelectorAll('.m-title').forEach(function(el){
el.style.fontSize='';
var size=parseFloat(getComputedStyle(el).fontSize), guard=0;
while(el.scrollWidth>el.clientWidth+1 && size>15 && guard<80){
size-=1.5; el.style.fontSize=size+'px'; guard++;
}
});
}
// Scale the whole spread down to fit short viewports (phone landscape / rotated
// portrait / browser fullscreen) so the image AND every line of text stay visible
// — nothing is clipped by the slide's overflow:hidden. Desktop fits, so --fit=1.
function fitSlide(){
document.querySelectorAll('.deck-slide').forEach(function(ds){
var c=ds.querySelector('.deck-canvas'); if(!c) return;
c.style.setProperty('--fit','1');
var availH=ds.clientHeight, availW=ds.clientWidth;
var ch=c.offsetHeight, cw=c.offsetWidth;
if(!ch||!cw||!availH||!availW) return;
var f=Math.min(1, availH/ch, availW/cw);
if(f<0.999) c.style.setProperty('--fit',(f*0.985).toFixed(3));
});
}
function relayout(){ fitTitles(); fitSlide(); }
if(window.requestAnimationFrame) requestAnimationFrame(relayout);
if(document.fonts && document.fonts.ready) document.fonts.ready.then(relayout);
var fitT; window.addEventListener('resize',function(){ clearTimeout(fitT); fitT=setTimeout(relayout,150); });
// ===== in-plate multi-image rotators (auto + dots + hover arrows + click-zoom) =====
function setupRotators(){
rotorTimers.forEach(clearInterval); rotorTimers=[];
document.querySelectorAll('.swiper-slide:not(.swiper-slide-duplicate) .plate[data-multi]').forEach(function(plate){
var imgs=[].slice.call(plate.querySelectorAll('.rimg')); if(imgs.length<2) return;
if(!plate.__go){
var dotsWrap=plate.querySelector('.rdots'); var st={ i:0 };
var go=function(n){ st.i=(n+imgs.length)%imgs.length; imgs.forEach(function(im,k){ im.classList.toggle('on',k===st.i); });
[].forEach.call(dotsWrap.children,function(d,k){ d.classList.toggle('on',k===st.i); }); plate.dataset.cur=st.i; };
imgs.forEach(function(_,k){ var d=document.createElement('i'); d.addEventListener('click',function(e){ e.stopPropagation(); go(k); }); dotsWrap.appendChild(d); });
var pv=plate.querySelector('.rnav.prev'), nx=plate.querySelector('.rnav.next');
if(pv) pv.addEventListener('click',function(e){ e.stopPropagation(); e.preventDefault(); go(st.i-1); });
if(nx) nx.addEventListener('click',function(e){ e.stopPropagation(); e.preventDefault(); go(st.i+1); });
plate.addEventListener('mouseenter',function(){ plate.__hover=true; });
plate.addEventListener('mouseleave',function(){ plate.__hover=false; });
go(0); plate.__go=go; plate.__st=st;
}
if(!reduce){ var g=plate.__go, s=plate.__st;
var t=setInterval(function(){ if(!plate.__hover) g(s.i+1); },3800); rotorTimers.push(t); }
});
}
// ===== lightbox (click any plate image) =====
var lb=document.getElementById('deckLb'), lbImg=document.getElementById('deckLbImg'), lbList=[], lbI=0;
function lbShow(){ lbImg.src=lbList[lbI]; var multi=lbList.length>1; document.getElementById('deckLbPrev').style.display=multi?'':'none'; document.getElementById('deckLbNext').style.display=multi?'':'none'; }
function lbOpen(plate){ var im=[].slice.call(plate.querySelectorAll('.rimg')).map(function(x){ return x.getAttribute('src'); }); lbList=im; lbI=parseInt(plate.dataset.cur||'0',10)||0; lbShow(); lb.classList.add('on'); if(swiper.autoplay&&swiper.autoplay.running){ swiper.autoplay.stop(); autoIcon(); } }
function lbClose(){ lb.classList.remove('on'); lbImg.src=''; }
function lbGo(n){ if(!lbList.length) return; lbI=(n+lbList.length)%lbList.length; lbShow(); }
document.getElementById('deckWrap').addEventListener('click', function(e){ var st=e.target.closest('.rstack'); if(st) lbOpen(st.closest('.plate')); });
document.getElementById('deckWrap').addEventListener('keydown', function(e){ if((e.key==='Enter'||e.key===' ')&&e.target.classList.contains('rstack')){ e.preventDefault(); lbOpen(e.target.closest('.plate')); } });
document.getElementById('deckLbX').addEventListener('click', lbClose);
document.getElementById('deckLbPrev').addEventListener('click', function(e){ e.stopPropagation(); lbGo(lbI-1); });
document.getElementById('deckLbNext').addEventListener('click', function(e){ e.stopPropagation(); lbGo(lbI+1); });
lb.addEventListener('click', function(e){ if(e.target===lb) lbClose(); });
document.addEventListener('keydown', function(e){ // capture: beat Swiper keyboard while the lightbox is open
if(!lb.classList.contains('on')) return;
if(e.key==='Escape'){ lbClose(); }
else if(e.key==='ArrowLeft'){ e.stopImmediatePropagation(); lbGo(lbI-1); }
else if(e.key==='ArrowRight'){ e.stopImmediatePropagation(); lbGo(lbI+1); }
}, true);
// ===== navigation: big arrows =====
document.getElementById('arrowPrev').addEventListener('click', function(){ swiper.slidePrev(); this.blur(); });
document.getElementById('arrowNext').addEventListener('click', function(){ swiper.slideNext(); this.blur(); });
// ===== controls: tags / search / sort =====
function refresh(){ buildSlides(); swiper.update(); swiper.slideTo(0,0);
if(swiper.pagination){ swiper.pagination.render(); swiper.pagination.update(); }
setupRotators(); announce(swiper); if(!(reduce||isTouch)&&swiper.autoplay) swiper.autoplay.start(); }
document.getElementById('deckTags').addEventListener('click', function(e){ var b=e.target.closest('[data-tag]'); if(!b) return;
[].forEach.call(this.querySelectorAll('.filter-tag'),function(x){ x.classList.toggle('active',x===b); }); state.tag=b.dataset.tag; refresh(); });
document.getElementById('deckSearch').addEventListener('input', function(){ state.q=(this.value||'').trim().toLowerCase(); refresh(); });
document.getElementById('deckSort').addEventListener('change', function(){ state.sort=this.value; refresh(); });
// ===== autoplay toggle + fullscreen =====
var autoBtn=document.getElementById('btnAuto');
function autoIcon(){ autoBtn.innerHTML='<i class="fas fa-'+((swiper.autoplay&&swiper.autoplay.running)?'pause':'play')+'"></i>'; }
autoBtn.addEventListener('click', function(){ if(!swiper.autoplay) return; if(swiper.autoplay.running){ swiper.autoplay.stop(); } else { swiper.autoplay.start(); } autoIcon(); });
if(reduce||isTouch){ autoBtn.innerHTML='<i class="fas fa-play"></i>'; }
document.getElementById('btnFull').addEventListener('click', function(){
var el=document.documentElement;
if(!document.fullscreenElement){ (el.requestFullscreen||el.webkitRequestFullscreen).call(el).then(function(){ if(screen.orientation&&screen.orientation.lock) screen.orientation.lock('landscape').catch(function(){}); }).catch(function(){}); }
else { document.exitFullscreen(); }
});
// ===== reveal controls on mouse-move; keyboard shortcuts =====
var idleT;
function showControls(){ document.body.classList.add('controls-on'); clearTimeout(idleT); idleT=setTimeout(function(){ document.body.classList.remove('controls-on'); },2600); }
window.addEventListener('mousemove', showControls);
window.addEventListener('keydown', function(e){
showControls();
if(e.key==='/'){ e.preventDefault(); document.getElementById('deckSearch').focus(); }
else if(e.key==='f'||e.key==='F'){ document.getElementById('btnFull').click(); }
else if(e.key===' '&&e.target===document.body){ e.preventDefault(); autoBtn.click(); }
});
document.getElementById('ribbon').addEventListener('mouseenter', function(){ clearTimeout(idleT); });
// ===== first-load teaching hint (every open) =====
document.body.classList.add('intro');
setTimeout(function(){ document.body.classList.remove('intro'); }, 4800);
// ===== mobile: custom swipe for the rotated deck =====
var rotor=document.querySelector('.deck-rotor');
var mqRot=window.matchMedia('(orientation: portrait) and (max-width: 820px)');
function applyRotMode(){
if(!mqRot||!swiper) return; // mqRot is defined after the first buildSwiper; guard the early call
swiper.allowTouchMove=!mqRot.matches; // Swiper's own touch only when NOT rotated
}
applyRotMode(); (mqRot.addEventListener?mqRot.addEventListener('change',applyRotMode):mqRot.addListener(applyRotMode));
var tsx=null, tsy=null;
rotor.addEventListener('touchstart', function(e){ if(!mqRot.matches||!e.touches[0]) return; tsx=e.touches[0].clientX; tsy=e.touches[0].clientY; }, {passive:true});
rotor.addEventListener('touchend', function(e){ if(!mqRot.matches||tsy==null) return; var t=e.changedTouches[0]; if(!t) return;
var dx=t.clientX-tsx, dy=t.clientY-tsy; tsx=tsy=null;
if(Math.abs(dy)>Math.abs(dx)&&Math.abs(dy)>40){ if(dy<0) swiper.slideNext(); else swiper.slidePrev(); } }, {passive:true});
var deckHintEl = document.getElementById('deckHint');
var hintDone = false;
function dismissHint(){ hintDone = true; if(deckHintEl) deckHintEl.classList.add('dismissed'); }
if(deckHintEl) deckHintEl.addEventListener('click', dismissHint);
// Auto-reveal the deck after the rotate hint has shown briefly — no manual tap needed.
setTimeout(dismissHint, 3000);
window.addEventListener('orientationchange', function(){ setTimeout(function(){ if(!hintDone && deckHintEl) deckHintEl.classList.toggle('dismissed', !mqRot.matches); applyRotMode(); relayout(); }, 300); });
// fullscreen toggling (and its landscape-lock) changes the usable viewport — refit.
document.addEventListener('fullscreenchange', function(){ setTimeout(relayout, 250); });
document.addEventListener('webkitfullscreenchange', function(){ setTimeout(relayout, 250); });
})();
</script>
</body>
</html>