mirror of
https://git.j0bot.ch/admin_j0bot/ploxion-nolan.git
synced 2026-11-29 06:55:09 +00:00
synchro du labo (0bf0da65) : app.blade.php, README.md
This commit is contained in:
parent
fee61fabdd
commit
1648de26b3
22
README.md
22
README.md
@ -1,3 +1,21 @@
|
|||||||
# ploxion-nolan
|
# ⏳ Christopher Nolan
|
||||||
|
|
||||||
PLOXION · Le cinéaste du temps : les 12 films (+ The Odyssey 2026), chaque structure temporelle visualisée — Memento à rebours, Inception imbriqué, Tenet inversé. Frise budgets/durées, quiz des structures, « ▶ trouver un stream » → Stremio. · fournit: cinema, nolan, savoir, temps
|
Le cinéaste du temps : les 12 films (+ The Odyssey 2026), chaque structure temporelle visualisée — Memento à rebours, Inception imbriqué, Tenet inversé. Frise budgets/durées, quiz des structures, « ▶ trouver un stream » → Stremio.
|
||||||
|
|
||||||
|
| | |
|
||||||
|
| --- | --- |
|
||||||
|
| id | `nolan` |
|
||||||
|
| fournit | `cinema` `nolan` `savoir` `temps` |
|
||||||
|
| bions qu'il nomme | `jOSApps` `jOSMobile` `jOSPorts` |
|
||||||
|
| fichiers | `app.blade.php` |
|
||||||
|
| dans le labo | `resources/views/ploxions/nolan/` (dépôt `my_website2`) |
|
||||||
|
|
||||||
|
## Contribuer
|
||||||
|
|
||||||
|
- **Dans le xer** : https://labo.j0bot.ch/px/atelier?ploxion=nolan — prends-le, modifie-le, vois-le tourner, « ⧗ envoyer le tsoin ».
|
||||||
|
- **Dans VS Code** : `xb prendre nolan` (ou l'extension xerboxion › ⇩ Prendre), puis ⧗ Envoyer.
|
||||||
|
- Le chemin complet : https://labo.j0bot.ch/px/contribuer
|
||||||
|
|
||||||
|
Ce dépôt est un **miroir** du labo (synchronisé par `bin/ploxions-forge.mjs`, depuis le commit `0bf0da65`) : une modif se propose par un tsoin ou une branche du labo, pas directement ici.
|
||||||
|
|
||||||
|
© 2026 chill-tekk · ne pas nuire
|
||||||
|
|||||||
484
app.blade.php
Normal file
484
app.blade.php
Normal file
@ -0,0 +1,484 @@
|
|||||||
|
{{-- ============================================================================================
|
||||||
|
PL0XION nolan ⏳ — Christopher Nolan, le cinéaste du temps.
|
||||||
|
Directive RS-7 (16.08) : « je veux que tu me fasses un nouveau ploxion, le ploxion
|
||||||
|
christopher nolan, c'est juste un ploxion christopher nolan. »
|
||||||
|
|
||||||
|
Le clin d'œil maison : Nolan filme le temps non-linéaire — le xerboxion l'ENREGISTRE
|
||||||
|
(les tsoins : le vécu rejouable, remontable, réversible). Memento à l'envers, littéralement.
|
||||||
|
|
||||||
|
3 vues : 🎞 grille (cartes typographiques, zéro image externe) · ⏳ frise (années vs
|
||||||
|
budgets en échelle log OU durées) · 🧩 quiz (reconnaître un film à sa structure, XP local).
|
||||||
|
Fiche par film : synopsis sans spoiler + LA structure temporelle en diagramme SVG inline
|
||||||
|
(docs/dev/13-diagrammes.md : une idée par diagramme, un seul accent, mobile 390px).
|
||||||
|
|
||||||
|
Ponts : « ▶ trouver un stream » → stremio (même mécanisme que le stub video/app.blade.php :
|
||||||
|
jOSMobile/jOS.openPloxion + port bus IN ploxion.stremio.open {id:tt…} — cf.
|
||||||
|
stremio/app.blade.php:418 ; en standalone : /px/stremio#stremio=tt…) · carte tsoin → /px/blocs?bloc=tsoin.
|
||||||
|
|
||||||
|
DONNÉES VÉRIFIÉES le 16.08.2026 contre en.wikipedia.org (infobox de chaque film :
|
||||||
|
Following 70min/6000$ · Memento 113/5-9M · Insomnia 118/46M · Batman Begins 140/150M ·
|
||||||
|
The Prestige 130/40M · The Dark Knight 152/185M · Inception 148/160M · TDK Rises 164/230-300M ·
|
||||||
|
Interstellar 169/165M · Dunkirk 106/100-150M · Tenet 150/205M · Oppenheimer 180/100M ·
|
||||||
|
The Odyssey : sortie 17.07.2026, ~250M, tournage terminé — en.wikipedia.org/wiki/The_Odyssey_(2026_film))
|
||||||
|
et ids imdb vérifiés via l'API suggestion imdb (tt0154506, tt0209144, tt0278504, tt0372784,
|
||||||
|
tt0482571, tt0468569, tt1375666, tt1345836, tt0816692, tt5013056, tt6723592, tt15398776, tt33764258).
|
||||||
|
|
||||||
|
CONTRAT : window.jOSApps['nolan'] = { manifest, mount(container, ctx) -> { unmount }, describe }.
|
||||||
|
============================================================================================ --}}
|
||||||
|
<style>
|
||||||
|
/* contrat racine : l'hôte fournit un cadre positionné+dimensionné ; on le remplit, on scrolle dedans.
|
||||||
|
(position:absolute reste un containing block pour .veil, comme l'ancien position:relative) */
|
||||||
|
.px-nolan{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;
|
||||||
|
background:var(--xr-bg,#0a0d16);color:var(--xr-fg,#e8ecf8);
|
||||||
|
font-family:var(--xr-font-ui,ui-sans-serif,system-ui)}
|
||||||
|
.px-nolan .hd{display:flex;align-items:center;gap:8px;padding:10px 13px;border-bottom:1px solid var(--xr-line,#1b2540);flex-wrap:wrap}
|
||||||
|
.px-nolan .hd b{font-weight:800;letter-spacing:.02em}
|
||||||
|
.px-nolan .hd .sub{font-size:.68rem;color:var(--xr-muted,#7f93c8)}
|
||||||
|
.px-nolan .tabs{margin-left:auto;display:flex;gap:5px}
|
||||||
|
.px-nolan .tab{border:1px solid var(--xr-line,#1b2540);background:transparent;color:var(--xr-muted,#7f93c8);
|
||||||
|
border-radius:9px;padding:5px 10px;font-size:.74rem;cursor:pointer;font-family:inherit}
|
||||||
|
.px-nolan .tab.on{border-color:var(--xr-accent,#3fe0d0);color:var(--xr-fg,#e8ecf8)}
|
||||||
|
.px-nolan .body{flex:1;min-height:0;overflow:auto;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0));-webkit-overflow-scrolling:touch}
|
||||||
|
|
||||||
|
/* ---- grille : cartes typographiques (affiches sans image) ---- */
|
||||||
|
.px-nolan .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px}
|
||||||
|
.px-nolan .aff{position:relative;border:1px solid var(--xr-line,#1b2540);border-radius:11px;overflow:hidden;
|
||||||
|
background:linear-gradient(160deg,rgba(255,255,255,.04),rgba(0,0,0,.12)),var(--xr-card,#111a30);
|
||||||
|
cursor:pointer;padding:12px 11px 10px;min-height:132px;display:flex;flex-direction:column;transition:transform .12s ease,border-color .12s ease}
|
||||||
|
.px-nolan .aff:hover{transform:translateY(-2px);border-color:var(--fa,#3fe0d0)}
|
||||||
|
.px-nolan .aff::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:var(--fa,#3fe0d0);opacity:.85}
|
||||||
|
.px-nolan .aff .yy{font-size:.66rem;letter-spacing:.28em;color:var(--fa,#3fe0d0);font-weight:700}
|
||||||
|
.px-nolan .aff .tt{font-family:Georgia,'Times New Roman',serif;font-size:1.02rem;line-height:1.16;margin:6px 0 auto;font-weight:700}
|
||||||
|
.px-nolan .aff .st{font-size:.64rem;color:var(--xr-muted,#7f93c8);margin-top:9px}
|
||||||
|
.px-nolan .aff .rt{font-size:.64rem;color:var(--xr-muted,#7f93c8);margin-top:2px}
|
||||||
|
.px-nolan .aff.soon{border-style:dashed}
|
||||||
|
.px-nolan .aff.soon .tt{color:var(--xr-muted,#7f93c8)}
|
||||||
|
|
||||||
|
/* ---- carte « pourquoi ce ploxion existe » ---- */
|
||||||
|
.px-nolan .why{margin-top:12px;border:1px dashed var(--xr-line,#1b2540);border-radius:11px;padding:11px 13px;font-size:.78rem;
|
||||||
|
color:var(--xr-muted,#7f93c8);line-height:1.5}
|
||||||
|
.px-nolan .why b{color:var(--xr-fg,#e8ecf8)}
|
||||||
|
.px-nolan .why a{color:var(--xr-accent,#3fe0d0);text-decoration:none}
|
||||||
|
|
||||||
|
/* ---- frise ---- */
|
||||||
|
.px-nolan .fr-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
|
||||||
|
.px-nolan .fr-head .lbl{font-size:.74rem;color:var(--xr-muted,#7f93c8)}
|
||||||
|
.px-nolan .seg{display:flex;border:1px solid var(--xr-line,#1b2540);border-radius:9px;overflow:hidden}
|
||||||
|
.px-nolan .seg button{border:0;background:transparent;color:var(--xr-muted,#7f93c8);padding:5px 10px;font-size:.72rem;cursor:pointer;font-family:inherit}
|
||||||
|
.px-nolan .seg button.on{background:var(--xr-accent,#3fe0d0);color:#06121c;font-weight:700}
|
||||||
|
.px-nolan .frow{display:grid;grid-template-columns:44px 1fr;gap:8px;align-items:center;padding:4px 0;cursor:pointer}
|
||||||
|
.px-nolan .frow .yy{font-size:.7rem;color:var(--xr-muted,#7f93c8);text-align:right;font-variant-numeric:tabular-nums}
|
||||||
|
.px-nolan .frow:hover .yy{color:var(--xr-fg,#e8ecf8)}
|
||||||
|
.px-nolan .fbar{position:relative;height:20px;border-radius:5px;background:rgba(255,255,255,.04)}
|
||||||
|
.px-nolan .fbar i{position:absolute;inset:0 auto 0 0;border-radius:5px;background:var(--fa,#3fe0d0);opacity:.68;transition:width .5s ease}
|
||||||
|
.px-nolan .fbar span{position:absolute;inset:0;display:flex;align-items:center;padding:0 7px;font-size:.66rem;white-space:nowrap;overflow:hidden;color:var(--xr-fg,#e8ecf8)}
|
||||||
|
.px-nolan .fr-note{margin-top:10px;font-size:.7rem;color:var(--xr-muted,#7f93c8)}
|
||||||
|
|
||||||
|
/* ---- fiche (overlay) ---- */
|
||||||
|
.px-nolan .veil{position:absolute;inset:0;background:rgba(4,7,14,.72);display:flex;align-items:flex-end;justify-content:center;z-index:5}
|
||||||
|
.px-nolan .fiche{width:100%;max-width:640px;max-height:96%;overflow:auto;background:var(--xr-card,#111a30);
|
||||||
|
border:1px solid var(--xr-line,#1b2540);border-radius:15px 15px 0 0;padding:15px 16px 18px;border-bottom:0}
|
||||||
|
@media (min-width:700px){ .px-nolan .veil{align-items:center;padding:16px} .px-nolan .fiche{border-radius:15px;border-bottom:1px solid var(--xr-line,#1b2540)} }
|
||||||
|
.px-nolan .fiche .top{display:flex;align-items:baseline;gap:9px}
|
||||||
|
.px-nolan .fiche h2{font-family:Georgia,'Times New Roman',serif;font-size:1.28rem;margin:0}
|
||||||
|
.px-nolan .fiche .x{margin-left:auto;border:0;background:transparent;color:var(--xr-muted,#7f93c8);font-size:1.1rem;cursor:pointer;padding:2px 6px}
|
||||||
|
.px-nolan .fiche .meta{font-size:.72rem;color:var(--xr-muted,#7f93c8);margin:4px 0 9px}
|
||||||
|
.px-nolan .fiche .meta code{font-family:ui-monospace,monospace;font-size:.68rem;opacity:.8}
|
||||||
|
.px-nolan .fiche .syn{font-size:.85rem;line-height:1.5;margin:0 0 9px}
|
||||||
|
.px-nolan .chips{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:11px}
|
||||||
|
.px-nolan .chip{font-size:.64rem;border:1px solid var(--xr-line,#1b2540);border-radius:99px;padding:2px 8px;color:var(--xr-muted,#7f93c8)}
|
||||||
|
.px-nolan .dbox{border:1px solid var(--xr-line,#1b2540);border-radius:11px;padding:10px;background:rgba(255,255,255,.02)}
|
||||||
|
.px-nolan .dbox .dt{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--fa,#3fe0d0);margin-bottom:2px}
|
||||||
|
.px-nolan .dbox .dn{font-size:.72rem;color:var(--xr-muted,#7f93c8);margin-bottom:8px;line-height:1.45}
|
||||||
|
.px-nolan .acts{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
|
||||||
|
.px-nolan .btn{border:0;border-radius:10px;padding:10px 14px;font-size:.82rem;font-weight:700;cursor:pointer;font-family:inherit}
|
||||||
|
.px-nolan .btn.go{background:var(--fa,#3fe0d0);color:#06121c}
|
||||||
|
.px-nolan .btn.gh{background:transparent;border:1px solid var(--xr-line,#1b2540);color:var(--xr-muted,#7f93c8)}
|
||||||
|
|
||||||
|
/* ---- diagrammes (13-diagrammes.md : muted par défaut, UN accent, texte 9px) ---- */
|
||||||
|
.px-nolan svg.dgm{display:block;width:100%;height:auto}
|
||||||
|
.px-nolan .dgm .mline{stroke:var(--xr-muted,#7f93c8);stroke-opacity:.55;fill:none;stroke-width:1.6;stroke-linecap:round}
|
||||||
|
.px-nolan .dgm .aline{stroke:var(--fa,#3fe0d0);fill:none;stroke-width:2;stroke-linecap:round}
|
||||||
|
.px-nolan .dgm .mtxt{fill:var(--xr-muted,#7f93c8);font-size:9px;font-family:inherit}
|
||||||
|
.px-nolan .dgm .atxt{fill:var(--fa,#3fe0d0);font-size:9px;font-weight:700;font-family:inherit}
|
||||||
|
.px-nolan .dgm .adot{fill:var(--fa,#3fe0d0)}
|
||||||
|
.px-nolan .dgm .mbox{stroke:var(--xr-muted,#7f93c8);stroke-opacity:.4;fill:rgba(255,255,255,.02);rx:8}
|
||||||
|
.px-nolan .dgm .abox{stroke:var(--fa,#3fe0d0);fill:rgba(255,255,255,.03);rx:8}
|
||||||
|
.px-nolan .dgm .draw{stroke-dasharray:620;stroke-dashoffset:620;animation:nolanDraw 1.5s .15s ease forwards}
|
||||||
|
@keyframes nolanDraw{to{stroke-dashoffset:0}}
|
||||||
|
@media (prefers-reduced-motion:reduce){ .px-nolan .dgm .draw{animation:none;stroke-dashoffset:0} .px-nolan .aff{transition:none} }
|
||||||
|
|
||||||
|
/* ---- quiz ---- */
|
||||||
|
.px-nolan .qz{max-width:560px;margin:0 auto}
|
||||||
|
.px-nolan .qz .qhd{display:flex;align-items:baseline;gap:8px;margin-bottom:10px}
|
||||||
|
.px-nolan .qz .qhd b{font-size:.92rem}
|
||||||
|
.px-nolan .qz .xp{margin-left:auto;font-size:.72rem;color:var(--xr-accent,#3fe0d0);font-variant-numeric:tabular-nums}
|
||||||
|
.px-nolan .qz .qd{border:1px solid var(--xr-line,#1b2540);border-radius:11px;padding:12px;background:rgba(255,255,255,.02);margin-bottom:11px}
|
||||||
|
.px-nolan .qz .opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
||||||
|
@media (max-width:430px){ .px-nolan .qz .opts{grid-template-columns:1fr} }
|
||||||
|
.px-nolan .qz .opt{border:1px solid var(--xr-line,#1b2540);background:var(--xr-card,#111a30);color:var(--xr-fg,#e8ecf8);
|
||||||
|
border-radius:10px;padding:11px 10px;font-size:.8rem;cursor:pointer;font-family:Georgia,serif;text-align:center}
|
||||||
|
.px-nolan .qz .opt:disabled{opacity:.9;cursor:default}
|
||||||
|
.px-nolan .qz .opt.ok{border-color:#39d98a;color:#39d98a}
|
||||||
|
.px-nolan .qz .opt.ko{border-color:#e0566a;color:#e0566a}
|
||||||
|
.px-nolan .qz .verdict{min-height:22px;font-size:.76rem;margin:10px 2px;color:var(--xr-muted,#7f93c8)}
|
||||||
|
.px-nolan .qz .next{width:100%}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
var ID = 'nolan';
|
||||||
|
|
||||||
|
/* ===================== LES FILMS (vérifiés wikipedia + imdb, cf. entête) ===================== */
|
||||||
|
/* b = budget en M$ (valeur pour la barre log ; bTxt = affichage honnête des fourchettes) */
|
||||||
|
var FILMS = [
|
||||||
|
{ k:'following', t:'Following', y:1998, run:70, b:0.006, bTxt:'6 000 $', tt:'tt0154506',
|
||||||
|
hue:'#9aa5b1', sName:'trois époques entremêlées', sNote:'Trois moments de la même vie, découpés et intercalés — l\'ordre du récit n\'est pas l\'ordre du vécu.',
|
||||||
|
syn:'Un écrivain désœuvré suit des inconnus dans Londres pour nourrir ses histoires — jusqu\'à ce que l\'un d\'eux le remarque.',
|
||||||
|
th:['obsession','identité','manipulation'] },
|
||||||
|
{ k:'memento', t:'Memento', y:2000, run:113, b:9, bTxt:'5–9 M$', tt:'tt0209144',
|
||||||
|
hue:'#c8a878', sName:'à rebours', sNote:'Deux fils : la couleur remonte le temps scène par scène, le noir & blanc avance — ils convergent au même instant.',
|
||||||
|
syn:'Incapable de fabriquer de nouveaux souvenirs, Leonard traque l\'agresseur de sa femme à coups de polaroïds et de tatouages.',
|
||||||
|
th:['mémoire','identité','vengeance'] },
|
||||||
|
{ k:'insomnia', t:'Insomnia', y:2002, run:118, b:46, bTxt:'46 M$', tt:'tt0278504',
|
||||||
|
hue:'#a8c8e8', sName:'le jour permanent', sNote:'Récit linéaire — mais en Alaska l\'été, le soleil ne se couche jamais : le temps perd ses repères sans se plier.',
|
||||||
|
syn:'Un inspecteur de Los Angeles enquête sur un meurtre en Alaska, sous un soleil qui ne se couche jamais.',
|
||||||
|
th:['culpabilité','insomnie','vérité'] },
|
||||||
|
{ k:'batman-begins',t:'Batman Begins', y:2005, run:140, b:150, bTxt:'150 M$', tt:'tt0372784',
|
||||||
|
hue:'#a67c52', sName:'flashbacks fondateurs', sNote:'La ligne avance, mais le premier acte boucle sans cesse vers l\'enfance — l\'origine se construit par retours.',
|
||||||
|
syn:'Bruce Wayne affronte sa peur et se forge un symbole pour rendre espoir à Gotham.',
|
||||||
|
th:['peur','symbole','origine'] },
|
||||||
|
{ k:'prestige', t:'The Prestige', y:2006, run:130, b:40, bTxt:'40 M$', tt:'tt0482571',
|
||||||
|
hue:'#d4af37', sName:'journaux imbriqués', sNote:'Poupées russes : un magicien lit le journal de l\'autre, qui raconte sa lecture du journal du premier.',
|
||||||
|
syn:'Dans le Londres victorien, deux magiciens rivaux se consument dans l\'obsession du tour parfait.',
|
||||||
|
th:['obsession','sacrifice','duplicité'] },
|
||||||
|
{ k:'dark-knight', t:'The Dark Knight', y:2008, run:152, b:185, bTxt:'185 M$', tt:'tt0468569',
|
||||||
|
hue:'#5b8bd0', sName:'l\'escalade', sNote:'Une ligne droite dont les battements se resserrent — le chaos accélère le temps jusqu\'à l\'étouffement.',
|
||||||
|
syn:'Batman face au Joker, un agent du chaos qui met Gotham — et toutes ses règles — à l\'épreuve.',
|
||||||
|
th:['chaos','éthique','escalade'] },
|
||||||
|
{ k:'inception', t:'Inception', y:2010, run:148, b:160, bTxt:'160 M$', tt:'tt1375666',
|
||||||
|
hue:'#8fa8c8', sName:'rêves imbriqués, temps dilaté', sNote:'Chaque niveau de rêve étire le temps du niveau au-dessus : quelques secondes en surface, des décennies au fond.',
|
||||||
|
syn:'Un voleur d\'idées doit, pour rentrer chez lui, réussir l\'inverse : implanter une idée au plus profond d\'un rêve.',
|
||||||
|
th:['rêve','deuil','réalité'] },
|
||||||
|
{ k:'tdkr', t:'The Dark Knight Rises', y:2012, run:164, b:250, bTxt:'230–300 M$', tt:'tt1345836',
|
||||||
|
hue:'#d07850', sName:'l\'ellipse de 8 ans', sNote:'La ligne se brise sur huit années de silence — le récit reprend de l\'autre côté du vide.',
|
||||||
|
syn:'Huit ans après, un Bruce Wayne brisé doit se relever pour affronter Bane.',
|
||||||
|
th:['chute','renaissance','légende'] },
|
||||||
|
{ k:'interstellar', t:'Interstellar', y:2014, run:169, b:165, bTxt:'165 M$', tt:'tt0816692',
|
||||||
|
hue:'#e8c880', sName:'la dilatation gravitationnelle', sNote:'Deux lignes divergent depuis le même adieu : une heure près du trou noir, sept ans sur Terre.',
|
||||||
|
syn:'La Terre se meurt ; un pilote quitte sa fille pour chercher un monde habitable au-delà d\'un trou de ver.',
|
||||||
|
th:['amour','gravité','temps'] },
|
||||||
|
{ k:'dunkirk', t:'Dunkirk', y:2017, run:106, b:100, bTxt:'100–150 M$', tt:'tt5013056',
|
||||||
|
hue:'#88a89a', sName:'trois échelles de temps', sNote:'Une semaine sur la jetée, un jour sur la mer, une heure dans les airs — trois durées montées ensemble, qui se rejoignent.',
|
||||||
|
syn:'L\'évacuation de Dunkerque vécue depuis la jetée, la mer et le ciel.',
|
||||||
|
th:['survie','temps','collectif'] },
|
||||||
|
{ k:'tenet', t:'Tenet', y:2020, run:150, b:205, bTxt:'205 M$', tt:'tt6723592',
|
||||||
|
hue:'#c05a6a', sName:'le flux inversé', sNote:'Un flux remonte le temps et croise le flux normal — le même événement vécu dans les deux sens.',
|
||||||
|
syn:'Un agent apprend à manier l\'inversion du temps pour empêcher une guerre venue du futur.',
|
||||||
|
th:['entropie','palindrome','foi'] },
|
||||||
|
{ k:'oppenheimer', t:'Oppenheimer', y:2023, run:180, b:100, bTxt:'100 M$', tt:'tt15398776',
|
||||||
|
hue:'#e07840', sName:'fission / fusion', sNote:'Deux fils tressés : la couleur (Fission, subjective) et le noir & blanc (Fusion, objective) alternent autour des mêmes faits.',
|
||||||
|
syn:'L\'ascension du père de la bombe atomique — et le procès intérieur qui la suit.',
|
||||||
|
th:['culpabilité','pouvoir','réaction en chaîne'] },
|
||||||
|
{ k:'odyssey', t:'The Odyssey', y:2026, run:0, b:250, bTxt:'~250 M$', tt:'tt33764258', soon:'17.07.2026',
|
||||||
|
hue:'#4a90c8', sName:'à venir', sNote:'Structure inconnue — mais chez Homère, le récit commence au milieu et remonte : Nolan est en terrain connu.',
|
||||||
|
syn:'Après la guerre de Troie, Ulysse affronte des êtres mythiques pour rentrer à Ithaque retrouver Pénélope.',
|
||||||
|
th:['épopée','retour','mythe'] }
|
||||||
|
];
|
||||||
|
|
||||||
|
/* ===================== DIAGRAMMES (une idée, un accent — 13-diagrammes.md) =====================
|
||||||
|
SVG inline viewBox 320×120, classes .mline/.aline (muted/accent), .draw = anim discrète. */
|
||||||
|
function chevR(x,y,c){ return '<path class="'+c+'" d="M'+(x-5)+' '+(y-4)+' L'+x+' '+y+' L'+(x-5)+' '+(y+4)+'"/>'; }
|
||||||
|
function chevL(x,y,c){ return '<path class="'+c+'" d="M'+(x+5)+' '+(y-4)+' L'+x+' '+y+' L'+(x+5)+' '+(y+4)+'"/>'; }
|
||||||
|
var DGM = {
|
||||||
|
memento: function(){ return ''
|
||||||
|
+ '<polyline class="aline draw" points="298,58 236,34 14,34"/>' + chevL(120,34,'aline') + chevL(60,34,'aline')
|
||||||
|
+ '<polyline class="mline" points="14,86 236,86 298,62"/>' + chevR(120,86,'mline') + chevR(180,86,'mline')
|
||||||
|
+ '<circle class="adot" cx="302" cy="60" r="4"/>'
|
||||||
|
+ '<text class="atxt" x="14" y="24">couleur — à rebours</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="102">noir & blanc — vers l\'avant</text>'
|
||||||
|
+ '<text class="mtxt" x="248" y="106">le même instant</text>'; },
|
||||||
|
inception: function(){ return ''
|
||||||
|
+ '<rect class="mbox" x="14" y="12" width="60" height="15" rx="4"/><text class="mtxt" x="80" y="23">le réel — 10 s</text>'
|
||||||
|
+ '<rect class="mbox" x="14" y="34" width="110" height="15" rx="4"/><text class="mtxt" x="130" y="45">rêve 1 — minutes</text>'
|
||||||
|
+ '<rect class="mbox" x="14" y="56" width="180" height="15" rx="4"/><text class="mtxt" x="200" y="67">rêve 2 — heures</text>'
|
||||||
|
+ '<rect class="mbox" x="14" y="78" width="240" height="15" rx="4"/><text class="mtxt" x="260" y="89">rêve 3 — jours</text>'
|
||||||
|
+ '<rect class="abox" x="14" y="100" width="292" height="15" rx="4" stroke-dasharray="5 4" fill="none"/>'
|
||||||
|
+ '<text class="atxt" x="20" y="111">les limbes — des décennies</text>'; },
|
||||||
|
interstellar: function(){ return ''
|
||||||
|
+ '<circle class="adot" cx="22" cy="60" r="4" fill="var(--xr-muted,#7f93c8)"/>'
|
||||||
|
+ '<text class="mtxt" x="10" y="46">l\'adieu</text>'
|
||||||
|
+ '<line class="aline draw" x1="26" y1="58" x2="304" y2="20"/>'
|
||||||
|
+ '<g class="aline" stroke-width="1.4"><line x1="70" y1="46" x2="70" y2="56"/><line x1="110" y1="41" x2="110" y2="51"/><line x1="150" y1="35" x2="150" y2="45"/><line x1="190" y1="30" x2="190" y2="40"/><line x1="230" y1="24" x2="230" y2="34"/><line x1="270" y1="19" x2="270" y2="29"/></g>'
|
||||||
|
+ '<line class="mline" x1="26" y1="62" x2="304" y2="92"/>'
|
||||||
|
+ '<text class="atxt" x="176" y="14">la Terre — 23 ans passent</text>'
|
||||||
|
+ '<text class="mtxt" x="182" y="110">près du trou noir — 1 h = 7 ans</text>'; },
|
||||||
|
dunkirk: function(){ return ''
|
||||||
|
+ '<rect class="mbox" x="14" y="18" width="270" height="16" rx="4"/><text class="mtxt" x="20" y="30">la jetée — une semaine</text>'
|
||||||
|
+ '<rect class="mbox" x="152" y="48" width="132" height="16" rx="4"/><text class="mtxt" x="158" y="60">la mer — un jour</text>'
|
||||||
|
+ '<rect class="mbox" x="230" y="78" width="54" height="16" rx="4"/><text class="mtxt" x="160" y="90">l\'air — 1 h</text>'
|
||||||
|
+ '<line class="aline draw" x1="292" y1="10" x2="292" y2="102"/>'
|
||||||
|
+ '<text class="atxt" x="228" y="114">elles se rejoignent</text>'; },
|
||||||
|
tenet: function(){ return ''
|
||||||
|
+ '<line class="mline" x1="14" y1="30" x2="306" y2="88"/>' + chevR(150,57,'mline') + chevR(280,83,'mline')
|
||||||
|
+ '<line class="aline draw" x1="306" y1="30" x2="14" y2="88"/>' + chevL(160,57,'aline') + chevL(40,83,'aline')
|
||||||
|
+ '<circle class="adot" cx="160" cy="59" r="4" opacity=".9"/>'
|
||||||
|
+ '<text class="mtxt" x="14" y="18">le flux normal</text>'
|
||||||
|
+ '<text class="atxt" x="222" y="18">le flux inversé</text>'
|
||||||
|
+ '<text class="mtxt" x="130" y="112">le tourniquet</text>'; },
|
||||||
|
prestige: function(){ return ''
|
||||||
|
+ '<rect class="mbox" x="10" y="10" width="300" height="100" rx="8"/><text class="mtxt" x="20" y="26">le film — la rivalité</text>'
|
||||||
|
+ '<rect class="mbox" x="34" y="36" width="252" height="64" rx="7"/><text class="mtxt" x="44" y="52">le journal d\'Angier, lu par Borden</text>'
|
||||||
|
+ '<rect class="abox" x="58" y="62" width="204" height="28" rx="6"/><text class="atxt" x="68" y="80">le journal de Borden, lu par Angier</text>'; },
|
||||||
|
following: function(){ return ''
|
||||||
|
+ '<rect class="mbox" x="14" y="52" width="34" height="16" rx="4"/><rect class="abox" x="52" y="52" width="34" height="16" rx="4"/><rect class="mbox" x="90" y="52" width="34" height="16" rx="4" stroke-dasharray="4 3"/>'
|
||||||
|
+ '<rect class="mbox" x="128" y="52" width="34" height="16" rx="4"/><rect class="abox" x="166" y="52" width="34" height="16" rx="4"/><rect class="mbox" x="204" y="52" width="34" height="16" rx="4" stroke-dasharray="4 3"/>'
|
||||||
|
+ '<rect class="abox" x="242" y="52" width="34" height="16" rx="4"/><rect class="mbox" x="280" y="52" width="26" height="16" rx="4"/>'
|
||||||
|
+ '<text class="mtxt" x="14" y="36">l\'ordre du récit…</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="96">…mélange trois époques de la même vie</text>'
|
||||||
|
+ '<text class="atxt" x="216" y="36">3 fils</text>'; },
|
||||||
|
insomnia: function(){ return ''
|
||||||
|
+ '<circle class="adot" cx="160" cy="34" r="10" opacity=".9"/>'
|
||||||
|
+ '<g class="aline" stroke-width="1.4"><line x1="160" y1="16" x2="160" y2="10"/><line x1="146" y1="20" x2="142" y2="16"/><line x1="174" y1="20" x2="178" y2="16"/><line x1="138" y1="34" x2="132" y2="34"/><line x1="182" y1="34" x2="188" y2="34"/></g>'
|
||||||
|
+ '<line class="mline draw" x1="14" y1="78" x2="306" y2="78"/>'
|
||||||
|
+ '<g class="mline" stroke-width="1.2"><line x1="60" y1="73" x2="60" y2="83"/><line x1="110" y1="73" x2="110" y2="83"/><line x1="160" y1="73" x2="160" y2="83"/><line x1="210" y1="73" x2="210" y2="83"/><line x1="260" y1="73" x2="260" y2="83"/></g>'
|
||||||
|
+ '<text class="atxt" x="200" y="30">le soleil ne se couche pas</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="100">six jours — aucune nuit pour couper le temps</text>'; },
|
||||||
|
'batman-begins': function(){ return ''
|
||||||
|
+ '<line class="mline" x1="14" y1="78" x2="306" y2="78"/>' + chevR(300,78,'mline')
|
||||||
|
+ '<path class="aline draw" d="M120 76 C 100 36, 60 36, 44 72" fill="none"/>' + chevR(46,68,'aline')
|
||||||
|
+ '<path class="aline draw" d="M180 76 C 156 28, 96 28, 72 72" fill="none"/>'
|
||||||
|
+ '<text class="atxt" x="86" y="20">les retours vers l\'origine</text>'
|
||||||
|
+ '<text class="mtxt" x="222" y="100">le présent avance</text>'; },
|
||||||
|
'dark-knight': function(){ return ''
|
||||||
|
+ '<line class="mline draw" x1="14" y1="60" x2="298" y2="60"/>'
|
||||||
|
+ '<g class="mline" stroke-width="1.2"><line x1="40" y1="53" x2="40" y2="67"/><line x1="92" y1="53" x2="92" y2="67"/><line x1="138" y1="53" x2="138" y2="67"/><line x1="178" y1="53" x2="178" y2="67"/><line x1="212" y1="53" x2="212" y2="67"/><line x1="240" y1="53" x2="240" y2="67"/><line x1="262" y1="53" x2="262" y2="67"/><line x1="278" y1="53" x2="278" y2="67"/><line x1="290" y1="53" x2="290" y2="67"/></g>'
|
||||||
|
+ chevR(306,60,'aline')
|
||||||
|
+ '<text class="mtxt" x="14" y="40">linéaire — mais les battements se resserrent</text>'
|
||||||
|
+ '<text class="atxt" x="238" y="90">l\'escalade</text>'; },
|
||||||
|
tdkr: function(){ return ''
|
||||||
|
+ '<line class="mline" x1="14" y1="60" x2="118" y2="60"/>'
|
||||||
|
+ '<line class="aline draw" x1="126" y1="60" x2="196" y2="60" stroke-dasharray="4 6"/>'
|
||||||
|
+ '<line class="mline" x1="204" y1="60" x2="306" y2="60"/>' + chevR(300,60,'mline')
|
||||||
|
+ '<text class="atxt" x="136" y="46">8 ans</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="88">la chute</text><text class="mtxt" x="236" y="88">le retour</text>'; },
|
||||||
|
oppenheimer: function(){ return ''
|
||||||
|
+ '<path class="aline draw" d="M14 40 H74 L96 80 H156 L178 40 H238 L260 80 H306" fill="none"/>'
|
||||||
|
+ '<path class="mline" d="M14 80 H74 L96 40 H156 L178 80 H238 L260 40 H306" fill="none"/>'
|
||||||
|
+ '<text class="atxt" x="14" y="24">Fission — couleur, subjectif</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="106">Fusion — noir & blanc, objectif</text>'; },
|
||||||
|
odyssey: function(){ return ''
|
||||||
|
+ '<line class="mline" x1="14" y1="60" x2="250" y2="60" stroke-dasharray="3 7"/>'
|
||||||
|
+ '<text class="atxt" x="266" y="65" font-size="22">?</text>'
|
||||||
|
+ '<text class="mtxt" x="14" y="90">structure inconnue — sortie le 17.07.2026</text>'; }
|
||||||
|
};
|
||||||
|
function dgmSvg(k){ var f=DGM[k]; return '<svg class="dgm" viewBox="0 0 320 120" role="img" aria-label="structure temporelle">'+(f?f():'')+'</svg>'; }
|
||||||
|
|
||||||
|
/* ===================== helpers ===================== */
|
||||||
|
function esc(s) { return window.jOSb.esc(s); }
|
||||||
|
function toast(m){ try{ var T=(window.jOSb&&window.jOSb.toast)||(window.jOS&&window.jOS.toast); if(T)T(m); }catch(e){} }
|
||||||
|
var LSK='px-nolan-quiz';
|
||||||
|
function getQ(){ try{ var d=JSON.parse(localStorage.getItem(LSK)||'{}'); return { xp:+d.xp||0, n:+d.n||0 }; }catch(e){ return { xp:0, n:0 }; } }
|
||||||
|
function setQ(d){ try{ localStorage.setItem(LSK, JSON.stringify(d)); }catch(e){} }
|
||||||
|
|
||||||
|
/* ===================== XUI describe() — état pur pour toute surface ===================== */
|
||||||
|
function describe(){
|
||||||
|
var q=getQ();
|
||||||
|
var items=[
|
||||||
|
{ p:1, kind:'stat', label:'⏳ Nolan', value:'12 films · le cinéaste du temps' },
|
||||||
|
{ p:2, kind:'list', label:'la filmographie', items: FILMS.filter(function(f){return !f.soon;}).map(function(f){ return { label:f.t, value:String(f.y) }; }) },
|
||||||
|
{ p:3, kind:'stat', label:'le prochain', value:'The Odyssey · 17.07.2026' }
|
||||||
|
];
|
||||||
|
if(q.n) items.push({ p:4, kind:'stat', label:'quiz structures', value:q.xp+' XP · '+q.n+' réponses' });
|
||||||
|
return { v:1, id:ID, title:'Christopher Nolan', icon:'⏳', items:items };
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===================== mount ===================== */
|
||||||
|
function mount(container, ctx){
|
||||||
|
var timers=[], docKeys=null;
|
||||||
|
|
||||||
|
container.innerHTML =
|
||||||
|
'<div class="px-nolan">'+
|
||||||
|
'<div class="hd">⏳ <b>Christopher Nolan</b><span class="sub">le cinéaste du temps · 12 films + 1 à venir</span>'+
|
||||||
|
'<div class="tabs">'+
|
||||||
|
'<button class="tab on" data-tab="grille">🎞 films</button>'+
|
||||||
|
'<button class="tab" data-tab="frise">⏳ frise</button>'+
|
||||||
|
'<button class="tab" data-tab="quiz">🧩 quiz</button>'+
|
||||||
|
'</div>'+
|
||||||
|
'</div>'+
|
||||||
|
'<div class="body" data-body></div>'+
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
var root = container.querySelector('.px-nolan');
|
||||||
|
var body = root.querySelector('[data-body]');
|
||||||
|
var tab = 'grille';
|
||||||
|
|
||||||
|
/* ---- pont stremio : le mécanisme EXACT du stub video + port bus IN ploxion.stremio.open ---- */
|
||||||
|
function findStream(f){
|
||||||
|
var tt=f.tt;
|
||||||
|
if(!(window.jOS&&window.jOS.openPloxion)&&!(window.jOSMobile&&window.jOSMobile.open)){
|
||||||
|
// standalone (/px/nolan) : le deep-link partagé que stremio lit au mount (#stremio=<tt>)
|
||||||
|
try{ location.href='/px/stremio#stremio='+encodeURIComponent(tt); }catch(e){}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
if(window.jOSui&&window.jOSui.tier&&window.jOSui.tier()==='mobile'&&window.jOSMobile&&window.jOSMobile.open) window.jOSMobile.open('stremio','Stremio');
|
||||||
|
else if(window.jOS&&window.jOS.openPloxion) window.jOS.openPloxion('stremio');
|
||||||
|
}catch(e){}
|
||||||
|
// stremio se monte tout de suite et écoute ploxion.stremio.open {id: tt…} → Cinemeta → streams
|
||||||
|
timers.push(setTimeout(function(){
|
||||||
|
try{ if(window.jOSPorts&&window.jOSPorts.emit) window.jOSPorts.emit('stremio','open',{ id:tt, src:ID }); }catch(e){}
|
||||||
|
}, 450));
|
||||||
|
toast('🎬 '+f.t+' → Stremio');
|
||||||
|
}
|
||||||
|
function openBlocsTsoin(ev){
|
||||||
|
if(window.jOS&&window.jOS.openPloxion){ ev.preventDefault(); try{ window.jOS.openPloxion('blocs'); }catch(e){} }
|
||||||
|
// sinon : le href /px/blocs?bloc=tsoin fait le travail
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- fiche (overlay) ---- */
|
||||||
|
function closeFiche(){ var v=root.querySelector('.veil'); if(v) v.remove(); }
|
||||||
|
function openFiche(k){
|
||||||
|
closeFiche();
|
||||||
|
var i=-1; FILMS.some(function(f,j){ if(f.k===k){ i=j; return true; } return false; });
|
||||||
|
if(i<0) return;
|
||||||
|
var f=FILMS[i];
|
||||||
|
var veil=document.createElement('div'); veil.className='veil';
|
||||||
|
veil.innerHTML =
|
||||||
|
'<div class="fiche" style="--fa:'+esc(f.hue)+'" role="dialog" aria-label="'+esc(f.t)+'">'+
|
||||||
|
'<div class="top"><h2>'+esc(f.t)+'</h2><button class="x" data-x aria-label="fermer">✕</button></div>'+
|
||||||
|
'<div class="meta">'+esc(String(f.y))+(f.run?' · '+esc(String(f.run))+' min':'')+' · '+esc(f.bTxt)+
|
||||||
|
(f.soon?' · sortie '+esc(f.soon):'')+' · <code>'+esc(f.tt)+'</code></div>'+
|
||||||
|
'<p class="syn">'+esc(f.syn)+'</p>'+
|
||||||
|
'<div class="chips">'+f.th.map(function(t){ return '<span class="chip">'+esc(t)+'</span>'; }).join('')+'</div>'+
|
||||||
|
'<div class="dbox"><div class="dt">'+esc(f.sName)+'</div><div class="dn">'+esc(f.sNote)+'</div>'+dgmSvg(f.k)+'</div>'+
|
||||||
|
'<div class="acts">'+
|
||||||
|
'<button class="btn go" data-stream>▶ trouver un stream</button>'+
|
||||||
|
'<button class="btn gh" data-prev>‹ '+esc(FILMS[(i+FILMS.length-1)%FILMS.length].t)+'</button>'+
|
||||||
|
'<button class="btn gh" data-next>'+esc(FILMS[(i+1)%FILMS.length].t)+' ›</button>'+
|
||||||
|
'</div>'+
|
||||||
|
'</div>';
|
||||||
|
veil.addEventListener('click', function(e){ if(e.target===veil) closeFiche(); });
|
||||||
|
veil.querySelector('[data-x]').onclick = closeFiche;
|
||||||
|
veil.querySelector('[data-stream]').onclick = function(){ findStream(f); };
|
||||||
|
veil.querySelector('[data-prev]').onclick = function(){ openFiche(FILMS[(i+FILMS.length-1)%FILMS.length].k); };
|
||||||
|
veil.querySelector('[data-next]').onclick = function(){ openFiche(FILMS[(i+1)%FILMS.length].k); };
|
||||||
|
root.appendChild(veil);
|
||||||
|
}
|
||||||
|
docKeys = function(e){ if(e.key==='Escape') closeFiche(); };
|
||||||
|
document.addEventListener('keydown', docKeys);
|
||||||
|
|
||||||
|
/* ---- vue grille ---- */
|
||||||
|
function rGrille(){
|
||||||
|
body.innerHTML =
|
||||||
|
'<div class="grid">'+FILMS.map(function(f){
|
||||||
|
return '<div class="aff'+(f.soon?' soon':'')+'" style="--fa:'+esc(f.hue)+'" data-k="'+esc(f.k)+'" role="button" tabindex="0">'+
|
||||||
|
'<div class="yy">'+esc(String(f.y))+'</div>'+
|
||||||
|
'<div class="tt">'+esc(f.t)+'</div>'+
|
||||||
|
'<div class="st">'+esc(f.sName)+'</div>'+
|
||||||
|
'<div class="rt">'+(f.soon?'sortie '+esc(f.soon):esc(String(f.run))+' min')+'</div>'+
|
||||||
|
'</div>';
|
||||||
|
}).join('')+'</div>'+
|
||||||
|
'<div class="why">⏳ <b>Pourquoi ce ploxion existe :</b> Nolan est le cinéaste du temps non-linéaire — il monte le vécu '+
|
||||||
|
'à rebours, l\'imbrique, le dilate. Le xerboxion fait la même chose en machine : il enregistre le vécu en '+
|
||||||
|
'<b>tsoins</b> et le rejoue dans tous les sens — Memento à l\'envers, littéralement → '+
|
||||||
|
'<a href="/px/blocs?bloc=tsoin" data-tsoin>le bloc tsoin</a>.</div>';
|
||||||
|
body.querySelectorAll('.aff').forEach(function(el){
|
||||||
|
el.onclick = function(){ openFiche(el.getAttribute('data-k')); };
|
||||||
|
el.onkeydown = function(e){ if(e.key==='Enter'||e.key===' '){ e.preventDefault(); openFiche(el.getAttribute('data-k')); } };
|
||||||
|
});
|
||||||
|
var a=body.querySelector('[data-tsoin]'); if(a) a.onclick=openBlocsTsoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- vue frise (années vs budgets log OU durées) ---- */
|
||||||
|
var axis='budget';
|
||||||
|
function rFrise(){
|
||||||
|
var maxB=Math.log10(250/0.006), maxR=180;
|
||||||
|
body.innerHTML =
|
||||||
|
'<div class="fr-head"><span class="lbl">1998 → 2026, l\'axe révélateur :</span>'+
|
||||||
|
'<div class="seg"><button data-ax="budget"'+(axis==='budget'?' class="on"':'')+'>💰 budgets</button>'+
|
||||||
|
'<button data-ax="duree"'+(axis==='duree'?' class="on"':'')+'>⏱ durées</button></div></div>'+
|
||||||
|
FILMS.map(function(f){
|
||||||
|
var w = axis==='budget'
|
||||||
|
? Math.max(4, Math.round(100*Math.log10(f.b/0.006)/maxB))
|
||||||
|
: (f.run ? Math.max(4, Math.round(100*f.run/maxR)) : 4);
|
||||||
|
var lab = axis==='budget' ? f.bTxt : (f.run ? f.run+' min' : '?');
|
||||||
|
return '<div class="frow" style="--fa:'+esc(f.hue)+'" data-k="'+esc(f.k)+'">'+
|
||||||
|
'<div class="yy">'+esc(String(f.y))+'</div>'+
|
||||||
|
'<div class="fbar"><i style="width:'+w+'%'+(f.soon?';opacity:.3':'')+'"></i>'+
|
||||||
|
'<span>'+esc(f.t)+' · '+esc(lab)+'</span></div>'+
|
||||||
|
'</div>';
|
||||||
|
}).join('')+
|
||||||
|
'<div class="fr-note">'+(axis==='budget'
|
||||||
|
? 'Échelle logarithmique — de 6 000 $ (Following, tourné les week-ends) à ~250 M$ : ×40 000 en 28 ans, même monteur de temps.'
|
||||||
|
: 'Échelle linéaire — la durée gonfle avec l\'ambition : 70 min en 1998, 180 min en 2023.')+'</div>';
|
||||||
|
body.querySelectorAll('.seg button').forEach(function(b){ b.onclick=function(){ axis=b.getAttribute('data-ax'); rFrise(); }; });
|
||||||
|
body.querySelectorAll('.frow').forEach(function(el){ el.onclick=function(){ openFiche(el.getAttribute('data-k')); }; });
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- vue quiz : quel film a cette structure ? (XP localStorage léger) ---- */
|
||||||
|
var QPOOL=['memento','inception','interstellar','dunkirk','tenet','prestige','following','oppenheimer','dark-knight','tdkr'];
|
||||||
|
var qCur=null, qLast='';
|
||||||
|
function pickQ(){
|
||||||
|
var k; do{ k=QPOOL[Math.floor(Math.random()*QPOOL.length)]; }while(k===qLast&&QPOOL.length>1);
|
||||||
|
qLast=k;
|
||||||
|
var others=FILMS.filter(function(f){ return f.k!==k&&!f.soon; }).map(function(f){ return f.k; });
|
||||||
|
others.sort(function(){ return Math.random()-0.5; });
|
||||||
|
var opts=[k].concat(others.slice(0,3)); opts.sort(function(){ return Math.random()-0.5; });
|
||||||
|
return { k:k, opts:opts };
|
||||||
|
}
|
||||||
|
function rQuiz(){
|
||||||
|
qCur=pickQ();
|
||||||
|
var q=getQ();
|
||||||
|
var film=FILMS.filter(function(f){ return f.k===qCur.k; })[0];
|
||||||
|
body.innerHTML =
|
||||||
|
'<div class="qz">'+
|
||||||
|
'<div class="qhd"><b>🧩 Quel film a cette structure ?</b><span class="xp">⭐ '+q.xp+' XP</span></div>'+
|
||||||
|
'<div class="qd" style="--fa:'+esc(film.hue)+'">'+dgmSvg(qCur.k)+'</div>'+
|
||||||
|
'<div class="opts">'+qCur.opts.map(function(k){
|
||||||
|
var f=FILMS.filter(function(x){ return x.k===k; })[0];
|
||||||
|
return '<button class="opt" data-k="'+esc(k)+'">'+esc(f.t)+'</button>';
|
||||||
|
}).join('')+'</div>'+
|
||||||
|
'<div class="verdict" data-verdict></div>'+
|
||||||
|
'<button class="btn gh next" data-next style="display:none">une autre →</button>'+
|
||||||
|
'</div>';
|
||||||
|
var done=false;
|
||||||
|
body.querySelectorAll('.opt').forEach(function(b){
|
||||||
|
b.onclick=function(){
|
||||||
|
if(done) return; done=true;
|
||||||
|
var ok = b.getAttribute('data-k')===qCur.k;
|
||||||
|
var v=body.querySelector('[data-verdict]');
|
||||||
|
body.querySelectorAll('.opt').forEach(function(x){ x.disabled=true; if(x.getAttribute('data-k')===qCur.k) x.classList.add('ok'); });
|
||||||
|
var d=getQ(); d.n++;
|
||||||
|
if(ok){ d.xp+=10; v.textContent='✔ '+film.t+' ('+film.y+') — '+film.sName+' · +10 XP'; }
|
||||||
|
else { b.classList.add('ko'); v.textContent='✘ C\'était '+film.t+' ('+film.y+') — '+film.sName+'.'; }
|
||||||
|
setQ(d);
|
||||||
|
body.querySelector('.xp').textContent='⭐ '+d.xp+' XP';
|
||||||
|
body.querySelector('[data-next]').style.display='block';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
body.querySelector('[data-next]').onclick=rQuiz;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- tabs ---- */
|
||||||
|
function render(){ closeFiche(); if(tab==='frise') rFrise(); else if(tab==='quiz') rQuiz(); else rGrille(); }
|
||||||
|
root.querySelectorAll('.tab').forEach(function(b){
|
||||||
|
b.onclick=function(){
|
||||||
|
tab=b.getAttribute('data-tab');
|
||||||
|
root.querySelectorAll('.tab').forEach(function(x){ x.classList.toggle('on', x===b); });
|
||||||
|
render();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
render();
|
||||||
|
return { unmount: function(){
|
||||||
|
timers.forEach(function(t){ try{ clearTimeout(t); }catch(e){} });
|
||||||
|
if(docKeys) document.removeEventListener('keydown', docKeys);
|
||||||
|
container.innerHTML='';
|
||||||
|
} };
|
||||||
|
}
|
||||||
|
|
||||||
|
window.jOSApps = window.jOSApps || {};
|
||||||
|
window.jOSApps[ID] = { manifest: { id: ID, name: 'Christopher Nolan', icon: '⏳' }, mount: mount, describe: describe };
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user