11 Commits

Author SHA1 Message Date
Jules Neny
e43ec60ecf merge(v13-p0): iframe AEP skeleton timeout fallback fix loading stuck 2026-05-11 19:53:54 +02:00
Jules Neny
1033099663 fix(v13-p0): iframe AEP skeleton timeout fallback (resolves loading stuck)
Le @load event ne fire pas (ou tardivement) sur l'iframe AEP enfermee
dans un wrapper avec transform scale(0.42) + viewport simulee 1440px.
Resultat : skeleton 'Chargement de la carte AEP...' reste affiche
indefiniment, masquant l'iframe meme si elle se charge.

Fix :
- setTimeout 2.5s dans onMounted qui force revealIframe() inconditionnellement
- onIframeLoad clear le timer si l'event fire dans les temps (cas nominal)
- retrait du z-10 sur le skeleton (defense en profondeur : si bug residuel,
  l'iframe sera quand meme visible derriere)
- factorisation revealIframe() partagee entre @load et fallback
- cleanup du timer dans onUnmounted

Build SSR : 5 pages, 0 warning, ~4s.
Tests browser manuels a faire par Jules pour confirmer disparition skeleton.
2026-05-11 19:52:57 +02:00
Jules Neny
9bb55bc311 merge(v12-p): preview article 3 zones + colonnes scrollables indep 2026-05-11 18:52:59 +02:00
Jules Neny
7ec0efdeb5 merge(v12-o): Carte O logos Brandfetch overlay (zoom>1.5x) 2026-05-11 18:52:58 +02:00
Jules Neny
12a2d40371 feat(v12-p): preview article 3 zones + colonnes scrollables indep
- PreviewArticle.vue : nouveau composant qui ecoute journal-item-click et s'insere entre Carte O et iframe AEP
- EmbedDynamique.vue : retire le swap article (iframe AEP toujours visible en bas)
- ColCentre.astro : passe en flex-col, preview ouverte = Carte O 33vh + Preview auto + iframe 67vh, overflow-y-auto sur le container
- Bouton 'Retour a la carte' emet preview-close -> grid revient 1/3 + 2/3
- Scroll independant : Journal (gauche), Centre (preview), Insta (droite)
- Drag-resize desactive quand preview ouverte (anti-collision)
2026-05-11 18:52:11 +02:00
Jules Neny
a1d6271b65 feat(v12-o): Carte O logos plateforme via Brandfetch CDN (visible zoom>1.5x)
Champ optionnel domain dans YAML carte-o-source : propage vers JSON et
permet d'afficher un logo plateforme en bas-droite de chaque node (cercle
blanc 18px + image clippee circulaire 14px) quand le zoom depasse 1.5x.

V1.2-O par defaut : substack.com sur les 15 thematiques essais. Centre +
projet TMIP gardent leur fill brut (encre / ocre). Toggle visibilite via
callback zoom (opacity 0/1 sur .logo-overlay).

A flagger : CDN Brandfetch retourne 403 en curl server-side avec le client
ID fourni. A revalider en browser (origin trans-former.fr) — le CDN peut
exiger un Origin header autorise. Si bloque, fallback prevu en V1.3
(proxy local ou logos packages dans /public/logos/).

Files:
- public/data/carte-o-source.yaml : +15 champs domain
- scripts/build-carte-o.js : propagation domain -> JSON
- src/components/vue/CarteO.vue : CarteNode.domain + logoUrl helper
  + logo-overlay (circle + image clip-path) + toggle visibilite zoom
- public/data/carte-o.json : regenere (15/17 nodes ont domain)
2026-05-11 18:48:15 +02:00
Jules Neny
e613fc1ca3 merge(v12-q): iframe AEP forcé desktop transform scale 2026-05-11 18:43:06 +02:00
Jules Neny
d12f77554f merge(v12-n): Carte O fusion noeud central + palette minimaliste 2026-05-11 18:43:06 +02:00
Jules Neny
397484a35e merge(v12-m): header bandeau SiteHeader + titre Trans-Former/Jules Neny 2026-05-11 18:42:50 +02:00
Jules Neny
3ba4628818 feat(v12-m): header bandeau Trans-Former / Jules Neny / baseline palette terre 2026-05-11 18:41:51 +02:00
Jules Neny
7791054ca0 feat(v12-q): iframe AEP forcé desktop via transform scale + viewport 1440px 2026-05-11 18:40:50 +02:00
11 changed files with 480 additions and 217 deletions

View File

@@ -4,6 +4,9 @@
# statut: gestation (draft/en cours) | edite (publie) # statut: gestation (draft/en cours) | edite (publie)
# nature: essai (texte politique) | projet (projet archi) # nature: essai (texte politique) | projet (projet archi)
# niveau: 0 (centre) | 1 (concepts force) | 2 (thematiques/projets) # niveau: 0 (centre) | 1 (concepts force) | 2 (thematiques/projets)
# domain (optionnel) : domaine plateforme source pour logo Brandfetch CDN
# - affiche logo en bas-droite du node si zoom > 1.5x
# - V1.2 par defaut : substack.com pour tous les essais AEP
version: "1.1" version: "1.1"
@@ -23,76 +26,91 @@ thematiques:
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "pratiques-collectives" - id: "pratiques-collectives"
label: "Pratiques collectives" label: "Pratiques collectives"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "art-narration" - id: "art-narration"
label: "Art & narration" label: "Art & narration"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "pouvoir-domination" - id: "pouvoir-domination"
label: "Rapport au pouvoir" label: "Rapport au pouvoir"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "medias-critique" - id: "medias-critique"
label: "Medias & pensee critique" label: "Medias & pensee critique"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "justice-securite" - id: "justice-securite"
label: "Justice & securite" label: "Justice & securite"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "sante-globale" - id: "sante-globale"
label: "Sante globale" label: "Sante globale"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "agriculture" - id: "agriculture"
label: "Agriculture" label: "Agriculture"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "post-croissance" - id: "post-croissance"
label: "Post-croissance" label: "Post-croissance"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "anthropocene" - id: "anthropocene"
label: "Anthropocene & effondrement" label: "Anthropocene & effondrement"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "education" - id: "education"
label: "Education a la transformation" label: "Education a la transformation"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "urbanisme" - id: "urbanisme"
label: "Urbanisme" label: "Urbanisme"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "geopolitique" - id: "geopolitique"
label: "Geopolitique & decolonisation" label: "Geopolitique & decolonisation"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "ia-technologie" - id: "ia-technologie"
label: "IA & technologie" label: "IA & technologie"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
- id: "spiritualite" - id: "spiritualite"
label: "Spiritualite" label: "Spiritualite"
niveau: 2 niveau: 2
nature: essai nature: essai
statut: gestation statut: gestation
domain: "substack.com"
projets: projets:
- id: "tmip" - id: "tmip"

View File

@@ -1,6 +1,6 @@
{ {
"version": "1.1", "version": "1.1",
"generatedAt": "2026-05-11T16:41:21.600Z", "generatedAt": "2026-05-11T16:47:45.459Z",
"nodes": [ "nodes": [
{ {
"id": "contrat-social-medecine-corps-social", "id": "contrat-social-medecine-corps-social",
@@ -20,7 +20,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "pratiques-collectives", "id": "pratiques-collectives",
@@ -30,7 +31,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "art-narration", "id": "art-narration",
@@ -40,7 +42,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "pouvoir-domination", "id": "pouvoir-domination",
@@ -50,7 +53,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "medias-critique", "id": "medias-critique",
@@ -60,7 +64,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "justice-securite", "id": "justice-securite",
@@ -70,7 +75,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "sante-globale", "id": "sante-globale",
@@ -80,7 +86,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "agriculture", "id": "agriculture",
@@ -90,7 +97,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "post-croissance", "id": "post-croissance",
@@ -100,7 +108,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "anthropocene", "id": "anthropocene",
@@ -110,7 +119,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "education", "id": "education",
@@ -120,7 +130,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "urbanisme", "id": "urbanisme",
@@ -130,7 +141,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "geopolitique", "id": "geopolitique",
@@ -140,7 +152,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "ia-technologie", "id": "ia-technologie",
@@ -150,7 +163,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "spiritualite", "id": "spiritualite",
@@ -160,7 +174,8 @@
"statut": "gestation", "statut": "gestation",
"resume": null, "resume": null,
"radius": 12, "radius": 12,
"family": "concept" "family": "concept",
"domain": "substack.com"
}, },
{ {
"id": "tmip", "id": "tmip",

View File

@@ -43,7 +43,7 @@ async function main() {
} }
function addNode(obj) { function addNode(obj) {
nodes.push({ const node = {
id: obj.id, id: obj.id,
label: obj.label, label: obj.label,
niveau: obj.niveau, niveau: obj.niveau,
@@ -52,7 +52,10 @@ async function main() {
resume: obj.resume || null, resume: obj.resume || null,
radius: getRadius(obj.niveau, obj.nature), radius: getRadius(obj.niveau, obj.nature),
family: getFamily(obj.nature), family: getFamily(obj.nature),
}) }
// V1.2-O : propage le champ optionnel domain (logo plateforme via Brandfetch CDN)
if (obj.domain) node.domain = obj.domain
nodes.push(node)
} }
const centreId = data.centre.id const centreId = data.centre.id

View File

@@ -1,13 +1,30 @@
--- ---
// Centre - HAUT : tabs (Carte O mindmap | Chatbot RAG branche PC7). // Centre - HAUT : tabs (Carte O mindmap | Chatbot RAG branche PC7).
// BAS : iframe carte AEP + scroll articles Substack (PC4). // MILIEU : preview article (V1.2-P) - inseree au clic journal-item-click.
// BAS : iframe carte AEP (toujours visible).
import CarteOWrapper from '../vue/CarteOWrapper.vue'; import CarteOWrapper from '../vue/CarteOWrapper.vue';
import ChatbotV2 from '../vue/ChatbotV2.vue'; import ChatbotV2 from '../vue/ChatbotV2.vue';
import EmbedDynamique from '../vue/EmbedDynamique.vue'; import EmbedDynamique from '../vue/EmbedDynamique.vue';
import PreviewArticle from '../vue/PreviewArticle.vue';
--- ---
<div id="col-centre-grid" class="h-full grid gap-2 p-2" style="grid-template-rows: 1fr 2fr;"> <!--
<!-- HAUT 50% : tabs Carte O / Chatbot --> V1.2-P : Col centre = flex column container.
<section id="col-centre-haut" class="border border-neutral-200 rounded flex flex-col overflow-hidden bg-white" style="min-height: 0;"> - Default : Carte O (1/3) + iframe AEP (2/3), pas de scroll vertical (h-full).
- Preview ouverte : Carte O (33vh fixe) + Preview (auto) + iframe AEP (67vh fixe), overflow-y-auto.
Flex-basis dynamique pilote via JS.
-->
<div
id="col-centre-grid"
class="flex flex-col gap-2 p-2"
data-preview-open="false"
style="height: 100%; overflow-y: hidden;"
>
<!-- HAUT (default flex-1 base 33%) : tabs Carte O / Chatbot -->
<section
id="col-centre-haut"
class="border border-neutral-200 rounded flex flex-col overflow-hidden bg-white"
style="min-height: 0; flex: 1 1 33%;"
>
<nav role="tablist" aria-label="Vues centrales" class="flex border-b border-neutral-200 px-1 pt-1"> <nav role="tablist" aria-label="Vues centrales" class="flex border-b border-neutral-200 px-1 pt-1">
<button <button
type="button" type="button"
@@ -58,7 +75,7 @@ import EmbedDynamique from '../vue/EmbedDynamique.vue';
<!-- Drag handle desktop - redimensionnement vertical md+ --> <!-- Drag handle desktop - redimensionnement vertical md+ -->
<div <div
id="col-centre-drag-handle" id="col-centre-drag-handle"
class="hidden md:flex items-center justify-center h-2 cursor-row-resize hover:bg-neutral-200 transition-colors w-full -mt-1 -mb-1" class="hidden md:flex items-center justify-center h-2 cursor-row-resize hover:bg-neutral-200 transition-colors w-full -mt-1 -mb-1 shrink-0"
aria-hidden="true" aria-hidden="true"
> >
<span class="block w-10 h-0.5 bg-neutral-300 rounded-full"></span> <span class="block w-10 h-0.5 bg-neutral-300 rounded-full"></span>
@@ -69,13 +86,24 @@ import EmbedDynamique from '../vue/EmbedDynamique.vue';
id="col-centre-poignee" id="col-centre-poignee"
type="button" type="button"
aria-label="Replier ou deployer la Carte O" aria-label="Replier ou deployer la Carte O"
class="md:hidden flex items-center justify-center h-6 bg-neutral-100 border-y border-neutral-200 cursor-pointer w-full -mt-2 -mb-2 hover:bg-neutral-200 transition-colors" class="md:hidden flex items-center justify-center h-6 bg-neutral-100 border-y border-neutral-200 cursor-pointer w-full -mt-2 -mb-2 hover:bg-neutral-200 transition-colors shrink-0"
> >
<span class="block w-8 h-0.5 bg-neutral-400 rounded-full"></span> <span class="block w-8 h-0.5 bg-neutral-400 rounded-full"></span>
</button> </button>
<!-- BAS 50% : embed dynamique (carte AEP default, article journal au click) --> <!-- MILIEU (V1.2-P) : preview article inseree entre Carte O et iframe AEP.
<section class="border border-neutral-200 rounded overflow-hidden bg-white" style="min-height: 0;"> Pas de border ici - PreviewArticle.vue gere son propre conteneur.
shrink-0 pour preserver sa taille auto, sinon flex pourrait l'ecraser. -->
<div id="col-centre-preview-slot" class="shrink-0" style="display: contents;">
<PreviewArticle client:visible />
</div>
<!-- BAS (default flex-1 base 67%) : iframe carte AEP toujours visible -->
<section
id="col-centre-bas"
class="border border-neutral-200 rounded overflow-hidden bg-white"
style="min-height: 0; flex: 1 1 67%;"
>
<div class="h-full min-h-[60vh] md:min-h-[400px]"> <div class="h-full min-h-[60vh] md:min-h-[400px]">
<EmbedDynamique client:visible /> <EmbedDynamique client:visible />
</div> </div>
@@ -83,29 +111,32 @@ import EmbedDynamique from '../vue/EmbedDynamique.vue';
</div> </div>
<script> <script>
// Poignee repli zone HAUT (mobile only, D.3) // Poignee repli zone HAUT (mobile only)
const grid = document.getElementById('col-centre-grid'); const grid = document.getElementById('col-centre-grid');
const haut = document.getElementById('col-centre-haut'); const haut = document.getElementById('col-centre-haut');
const bas = document.getElementById('col-centre-bas');
const poignee = document.getElementById('col-centre-poignee'); const poignee = document.getElementById('col-centre-poignee');
// Sauvegarde flex-basis defaults pour restaure apres fermeture preview
let defaultHautFlex = '1 1 33%';
let defaultBasFlex = '1 1 67%';
const applyRepliState = (replie: boolean) => { const applyRepliState = (replie: boolean) => {
if (!grid || !haut) return; if (!grid || !haut) return;
if (grid.dataset.previewOpen === 'true') return; // skip si preview ouverte
if (replie) { if (replie) {
grid.classList.remove('grid-rows-2'); haut.style.flex = '0 0 0%';
grid.style.gridTemplateRows = '0fr 1fr';
haut.style.overflow = 'hidden'; haut.style.overflow = 'hidden';
haut.style.minHeight = '0'; haut.style.minHeight = '0';
poignee?.setAttribute('aria-label', 'Deployer la Carte O'); poignee?.setAttribute('aria-label', 'Deployer la Carte O');
} else { } else {
grid.classList.remove('grid-rows-2'); haut.style.flex = defaultHautFlex;
grid.style.gridTemplateRows = '1fr 2fr';
haut.style.overflow = ''; haut.style.overflow = '';
haut.style.minHeight = ''; haut.style.minHeight = '0';
poignee?.setAttribute('aria-label', 'Replier la Carte O'); poignee?.setAttribute('aria-label', 'Replier la Carte O');
} }
}; };
// Etat initial depuis sessionStorage
const savedRepli = sessionStorage.getItem('tf-haut-replie'); const savedRepli = sessionStorage.getItem('tf-haut-replie');
applyRepliState(savedRepli === 'true'); applyRepliState(savedRepli === 'true');
@@ -116,53 +147,78 @@ import EmbedDynamique from '../vue/EmbedDynamique.vue';
applyRepliState(next); applyRepliState(next);
}); });
// Drag-resize desktop (>=768px) // V1.2-P : preview ouverte = container scrollable, Carte O et iframe AEP figes en vh.
const dragHandle = document.getElementById('col-centre-drag-handle'); const applyPreviewState = (open: boolean) => {
const gridEl = document.getElementById('col-centre-grid'); if (!grid || !haut || !bas) return;
grid.dataset.previewOpen = String(open);
if (open) {
// Memorise les flex actuels avant override (au cas ou l'user a drag-resize)
const curHautFlex = haut.style.flex;
const curBasFlex = bas.style.flex;
if (curHautFlex && !curHautFlex.startsWith('0 0')) defaultHautFlex = curHautFlex;
if (curBasFlex) defaultBasFlex = curBasFlex;
if (dragHandle && gridEl) { // Figer hauteurs : Carte O 33vh, iframe AEP 67vh - on perd le flex
let isDragging = false; haut.style.flex = '0 0 33vh';
let startY = 0; bas.style.flex = '0 0 67vh';
let startTop = 0; // Le container reste a 100% du parent (overflow-hidden de <main>),
// mais on active le scroll interne pour passer Carte O -> Preview -> iframe AEP.
const getGridHeight = () => gridEl.getBoundingClientRect().height; grid.style.height = '100%';
grid.style.minHeight = '';
const getHautPercent = (): number => { grid.style.overflowY = 'auto';
const rows = gridEl.style.gridTemplateRows; } else {
if (rows && rows.includes('fr')) { haut.style.flex = defaultHautFlex;
const parts = rows.split(' '); bas.style.flex = defaultBasFlex;
if (parts.length >= 2) { grid.style.height = '100%';
const top = parseFloat(parts[0]) || 1; grid.style.minHeight = '';
const bot = parseFloat(parts[parts.length - 1]) || 1; grid.style.overflowY = 'hidden';
return (top / (top + bot)) * 100;
} }
}
if (rows && rows.includes('%')) {
const parts = rows.split(' ');
return parseFloat(parts[0]) || 50;
}
return 33.33;
}; };
window.addEventListener('journal-item-click', () => {
applyPreviewState(true);
// Scroll vers la preview apres mount
requestAnimationFrame(() => {
const preview = document.querySelector('.preview-article');
if (preview && grid) {
const previewTop = (preview as HTMLElement).offsetTop;
grid.scrollTo({ top: Math.max(0, previewTop - 8), behavior: 'smooth' });
}
});
});
window.addEventListener('preview-close', () => {
applyPreviewState(false);
});
// Drag-resize desktop (>=768px) - desactive quand preview ouverte
const dragHandle = document.getElementById('col-centre-drag-handle');
if (dragHandle && grid && haut && bas) {
let isDragging = false;
let startY = 0;
let startHautH = 0;
let containerH = 0;
dragHandle.addEventListener('mousedown', (e: MouseEvent) => { dragHandle.addEventListener('mousedown', (e: MouseEvent) => {
if (grid.dataset.previewOpen === 'true') return;
if (sessionStorage.getItem('tf-haut-replie') === 'true') return; if (sessionStorage.getItem('tf-haut-replie') === 'true') return;
isDragging = true; isDragging = true;
startY = e.clientY; startY = e.clientY;
startTop = (getHautPercent() / 100) * getGridHeight(); startHautH = haut.getBoundingClientRect().height;
containerH = grid.getBoundingClientRect().height;
document.body.style.cursor = 'row-resize'; document.body.style.cursor = 'row-resize';
document.body.style.userSelect = 'none'; document.body.style.userSelect = 'none';
e.preventDefault(); e.preventDefault();
}); });
document.addEventListener('mousemove', (e: MouseEvent) => { document.addEventListener('mousemove', (e: MouseEvent) => {
if (!isDragging || !gridEl) return; if (!isDragging) return;
const delta = e.clientY - startY; const delta = e.clientY - startY;
const totalH = getGridHeight(); const newHautH = Math.min(Math.max(startHautH + delta, containerH * 0.2), containerH * 0.8);
const newTop = Math.min(Math.max(startTop + delta, totalH * 0.2), totalH * 0.8); const hautPct = (newHautH / containerH) * 100;
const topPct = (newTop / totalH) * 100; const basPct = 100 - hautPct;
const botPct = 100 - topPct; haut.style.flex = `1 1 ${hautPct.toFixed(1)}%`;
gridEl.style.gridTemplateRows = `${topPct.toFixed(1)}% ${botPct.toFixed(1)}%`; bas.style.flex = `1 1 ${basPct.toFixed(1)}%`;
gridEl.classList.remove('grid-rows-2');
}); });
document.addEventListener('mouseup', () => { document.addEventListener('mouseup', () => {
@@ -170,23 +226,37 @@ import EmbedDynamique from '../vue/EmbedDynamique.vue';
isDragging = false; isDragging = false;
document.body.style.cursor = ''; document.body.style.cursor = '';
document.body.style.userSelect = ''; document.body.style.userSelect = '';
const rows = gridEl.style.gridTemplateRows; const hf = haut.style.flex;
if (rows) sessionStorage.setItem('tf-centre-rows', rows); const bf = bas.style.flex;
if (hf) {
sessionStorage.setItem('tf-centre-haut-flex', hf);
defaultHautFlex = hf;
}
if (bf) {
sessionStorage.setItem('tf-centre-bas-flex', bf);
defaultBasFlex = bf;
}
} }
}); });
// Restaurer position depuis sessionStorage // Restaurer position depuis sessionStorage
const savedRows = sessionStorage.getItem('tf-centre-rows'); const savedHF = sessionStorage.getItem('tf-centre-haut-flex');
if (savedRows && sessionStorage.getItem('tf-haut-replie') !== 'true') { const savedBF = sessionStorage.getItem('tf-centre-bas-flex');
gridEl.style.gridTemplateRows = savedRows; if (savedHF && savedBF && sessionStorage.getItem('tf-haut-replie') !== 'true') {
gridEl.classList.remove('grid-rows-2'); haut.style.flex = savedHF;
bas.style.flex = savedBF;
defaultHautFlex = savedHF;
defaultBasFlex = savedBF;
} }
// Double-click sur drag handle = reset default 1/3 + 2/3 // Double-click sur drag handle = reset default 1/3 + 2/3
dragHandle.addEventListener('dblclick', () => { dragHandle.addEventListener('dblclick', () => {
gridEl.style.gridTemplateRows = '1fr 2fr'; haut.style.flex = '1 1 33%';
gridEl.classList.remove('grid-rows-2'); bas.style.flex = '1 1 67%';
sessionStorage.removeItem('tf-centre-rows'); sessionStorage.removeItem('tf-centre-haut-flex');
sessionStorage.removeItem('tf-centre-bas-flex');
defaultHautFlex = '1 1 33%';
defaultBasFlex = '1 1 67%';
}); });
} }

View File

@@ -6,7 +6,7 @@
<nav <nav
id="mobile-tab-bar" id="mobile-tab-bar"
aria-label="Navigation colonnes" aria-label="Navigation colonnes"
class="fixed top-0 left-0 right-0 z-30 h-11 bg-white border-b border-neutral-200 flex items-stretch justify-around md:hidden" class="fixed top-12 left-0 right-0 z-30 h-11 bg-white border-b border-neutral-200 flex items-stretch justify-around md:hidden"
> >
<button <button
type="button" type="button"

View File

@@ -0,0 +1,52 @@
---
// SiteHeader.astro - V1.2-M : bandeau header pleine largeur identite site
// Palette terre figee : papier #FAFAF7, encre #0F172A, encre douce #475569
// Composition retenue : 2 lignes hierarchique
// ligne 1 : "Trans-Former" wordmark dominant (semibold tracking serre)
// ligne 2 : "Jules Neny" + baseline italique cote a cote (separateur point median)
// Rationale : le wordmark domine sans ecraser ; la baseline reste lisible ;
// composition adaptee a un manifeste (hierarchie typographique forte).
// Hauteur : ~64px desktop / ~48px mobile (compacte)
// Baseline raccourcie mobile : "architecture politique du vivant"
---
<header
class="site-header w-full border-b border-[#E5E7EB] bg-[#FAFAF7] text-[#0F172A] px-4 md:px-6 flex items-center"
role="banner"
>
<a
href="/"
class="flex flex-col md:flex-row md:items-baseline gap-x-3 gap-y-0 no-underline text-[#0F172A] hover:text-[#0F172A]"
aria-label="trans-former.fr - retour accueil"
>
<!-- Ligne 1 : wordmark dominant -->
<span
class="font-semibold tracking-tight text-[#0F172A] text-[17px] md:text-[20px] leading-none"
>
Trans-Former
</span>
<!-- Ligne 2 (desktop : inline ; mobile : sous wordmark) : Jules Neny + baseline -->
<span class="flex items-baseline gap-2 text-[#475569] leading-none">
<span class="text-[11px] md:text-[13px]">Jules Neny</span>
<span class="text-[#94A3B8]" aria-hidden="true">·</span>
<!-- Baseline longue : desktop / Baseline courte : mobile -->
<span class="italic text-[11px] md:text-[13px] hidden sm:inline">
architecture d'ecologie politique
</span>
<span class="italic text-[11px] inline sm:hidden">
architecture politique du vivant
</span>
</span>
</a>
</header>
<style>
.site-header {
height: 48px;
}
@media (min-width: 768px) {
.site-header {
height: 64px;
}
}
</style>

View File

@@ -19,8 +19,15 @@ interface CarteNode {
slug?: string slug?: string
theme?: string theme?: string
path?: string path?: string
domain?: string // V1.2-O : domaine plateforme source (logo Brandfetch CDN)
} }
// V1.2-O : logos plateforme via Brandfetch CDN (visible zoom > 1.5x seulement)
const BRANDFETCH_CLIENT_ID = '4ae58bd85c8140eab0cee72f40656120'
const LOGO_ZOOM_THRESHOLD = 1.5
const logoUrl = (domain: string) =>
`https://cdn.brandfetch.io/${domain}/w/64/h/64?c=${BRANDFETCH_CLIENT_ID}`
interface CarteEdge { interface CarteEdge {
source: string | CarteNode source: string | CarteNode
target: string | CarteNode target: string | CarteNode
@@ -187,6 +194,11 @@ function initSvg() {
.scaleExtent([0.3, 4]) .scaleExtent([0.3, 4])
.on('zoom', (event) => { .on('zoom', (event) => {
gZoom!.attr('transform', event.transform.toString()) gZoom!.attr('transform', event.transform.toString())
// V1.2-O : toggle visibilite logos plateforme selon le niveau de zoom
// (evite la surcharge visuelle au niveau d'ensemble, montre detail au drill-down)
const scale = event.transform.k
gZoom!.selectAll('.logo-overlay')
.style('opacity', scale > LOGO_ZOOM_THRESHOLD ? 1 : 0)
}) })
svgRoot.call(zoomBehavior as any) svgRoot.call(zoomBehavior as any)
@@ -290,6 +302,32 @@ function render() {
} }
}) })
// V1.2-O : Logo plateforme (visible zoom > 1.5x seulement)
// Cercle blanc 14px en bas-droite du node (offset +60% x/+60% y du radius)
// Image clip-path circle pour avatar style. Hidden par defaut (opacity 0).
const nodeGroupsWithLogo = nodeGroups.filter(d => !!d.domain)
const logoOverlay = nodeGroupsWithLogo.append('g')
.attr('class', 'logo-overlay')
.style('opacity', 0)
.attr('pointer-events', 'none')
logoOverlay.append('circle')
.attr('cx', d => getRadius(d) * 0.6)
.attr('cy', d => getRadius(d) * 0.6)
.attr('r', 9)
.attr('fill', '#FFFFFF')
.attr('stroke', '#0F172A')
.attr('stroke-width', 0.5)
logoOverlay.append('image')
.attr('href', d => logoUrl(d.domain!))
.attr('x', d => getRadius(d) * 0.6 - 7)
.attr('y', d => getRadius(d) * 0.6 - 7)
.attr('width', 14)
.attr('height', 14)
.attr('clip-path', d => `circle(7px at ${getRadius(d) * 0.6}px ${getRadius(d) * 0.6}px)`)
// Tooltip <title> // Tooltip <title>
nodeGroups.append('title') nodeGroups.append('title')
.text(d => `${d.label}\n[${d.family}]\n${truncate(d.resume || d.intention || '', 200)}`) .text(d => `${d.label}\n[${d.family}]\n${truncate(d.resume || d.intention || '', 200)}`)

View File

@@ -1,39 +1,31 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue' import { ref, computed, onMounted, onUnmounted } from 'vue'
interface JournalItem {
id: string
platform: 'substack' | 'gitea' | 'github' | 'instagram' | 'castopod' | 'blog' | 'linkedin'
hashtag: string
date: string
titre: string
extrait: string
url: string
thumbnail: string | null
}
const selectedItem = ref<JournalItem | null>(null)
const iframeRef = ref<HTMLIFrameElement | null>(null) const iframeRef = ref<HTMLIFrameElement | null>(null)
const wrapperRef = ref<HTMLDivElement | null>(null)
const skeletonHidden = ref(false) const skeletonHidden = ref(false)
const onJournalItemClick = (e: Event) => { // Force rendu desktop de l'iframe AEP : viewport simulee 1440px + scale dynamique
const ce = e as CustomEvent const VIEWPORT_W = 1440
if (ce.detail?.item) selectedItem.value = ce.detail.item const iframeScale = ref(0.42)
let resizeObs: ResizeObserver | null = null
const updateScale = () => {
if (!wrapperRef.value) return
const w = wrapperRef.value.clientWidth
if (w > 0) iframeScale.value = w / VIEWPORT_W
} }
onMounted(() => { const iframeStyle = computed(() => ({
window.addEventListener('journal-item-click', onJournalItemClick as EventListener) width: VIEWPORT_W + 'px',
}) height: (100 / iframeScale.value) + '%',
onUnmounted(() => { transform: `scale(${iframeScale.value})`,
window.removeEventListener('journal-item-click', onJournalItemClick as EventListener) transformOrigin: '0 0',
}) }))
const reset = () => { let fallbackTimer: ReturnType<typeof setTimeout> | null = null
selectedItem.value = null
skeletonHidden.value = false
}
const onIframeLoad = () => { const revealIframe = () => {
if (iframeRef.value) { if (iframeRef.value) {
iframeRef.value.classList.remove('opacity-0') iframeRef.value.classList.remove('opacity-0')
iframeRef.value.classList.add('opacity-100') iframeRef.value.classList.add('opacity-100')
@@ -41,55 +33,40 @@ const onIframeLoad = () => {
skeletonHidden.value = true skeletonHidden.value = true
} }
const extractInstaShortcode = (url: string): string | null => { onMounted(() => {
const m = url.match(/\/(p|reel)\/([^\/\?#]+)/) if (wrapperRef.value && typeof ResizeObserver !== 'undefined') {
return m ? m[2] : null updateScale()
} resizeObs = new ResizeObserver(updateScale)
resizeObs.observe(wrapperRef.value)
const embedUrl = computed(() => {
if (!selectedItem.value) return null
const item = selectedItem.value
if (item.platform === 'substack') {
return item.url.includes('?') ? item.url + '&embed=1' : item.url + '?embed=1'
} }
if (item.platform === 'instagram') { // Fallback : si @load ne fire pas dans 2.5s (transform/scale peut bloquer l'event),
const sc = extractInstaShortcode(item.url) // on revele quand meme l'iframe pour ne pas laisser le skeleton infini.
return sc ? `https://www.instagram.com/p/${sc}/embed/` : null fallbackTimer = setTimeout(() => {
revealIframe()
}, 2500)
})
onUnmounted(() => {
resizeObs?.disconnect()
resizeObs = null
if (fallbackTimer) {
clearTimeout(fallbackTimer)
fallbackTimer = null
} }
return null
}) })
const platformLabel = (p: string) => { const onIframeLoad = () => {
const labels: Record<string, string> = { if (fallbackTimer) {
substack: 'Substack', clearTimeout(fallbackTimer)
instagram: 'Instagram', fallbackTimer = null
gitea: 'Gitea',
github: 'GitHub',
castopod: 'Podcast',
blog: 'Blog',
linkedin: 'LinkedIn',
}
return labels[p] || p
}
const formatDate = (iso: string) => {
try {
const d = new Date(iso)
return isNaN(d.getTime())
? ''
: `${String(d.getDate()).padStart(2, '0')}/${String(d.getMonth() + 1).padStart(2, '0')}`
} catch {
return ''
} }
revealIframe()
} }
</script> </script>
<template> <template>
<div class="embed-dynamique h-full flex flex-col relative"> <div class="embed-dynamique h-full flex flex-col relative">
<div class="h-full">
<!-- DEFAULT : iframe AEP (aucun item selectionne) --> <div ref="wrapperRef" class="relative h-full bg-neutral-100 overflow-hidden">
<div v-if="!selectedItem" class="h-full">
<div class="relative h-full bg-neutral-100">
<div <div
v-if="!skeletonHidden" v-if="!skeletonHidden"
id="embed-skeleton" id="embed-skeleton"
@@ -100,82 +77,13 @@ const formatDate = (iso: string) => {
<iframe <iframe
src="https://aep.trans-former.fr/agences" src="https://aep.trans-former.fr/agences"
title="Carte AEP" title="Carte AEP"
class="w-full h-full border-0 opacity-0 transition-opacity duration-500" class="absolute top-0 left-0 border-0 opacity-0 transition-opacity duration-500"
:style="iframeStyle"
sandbox="allow-scripts allow-same-origin allow-popups allow-forms" sandbox="allow-scripts allow-same-origin allow-popups allow-forms"
@load="onIframeLoad" @load="onIframeLoad"
ref="iframeRef" ref="iframeRef"
></iframe> ></iframe>
</div> </div>
</div> </div>
<!-- EMBED MODE : teaser + embed live ou carte incitative -->
<div v-else class="h-full flex flex-col overflow-y-auto">
<!-- Header : reset + hashtag -->
<div class="flex items-center justify-between px-4 py-2 border-b border-neutral-200 bg-white sticky top-0 z-10">
<button
class="text-xs text-neutral-500 hover:text-neutral-900 flex items-center gap-1"
@click="reset"
type="button"
>
- Retour a la carte
</button>
<span class="text-xs text-neutral-400" style="font-family: 'Courier New', Courier, monospace;">
{{ selectedItem.hashtag }}
</span>
</div>
<!-- Teaser -->
<div class="px-4 py-3 border-b border-neutral-100 bg-neutral-50">
<p class="text-[11px] text-neutral-500 mb-1">{{ formatDate(selectedItem.date) }} - {{ selectedItem.platform }}</p>
<h3 class="text-sm font-semibold text-neutral-900 leading-snug mb-1">{{ selectedItem.titre }}</h3>
<p v-if="selectedItem.extrait" class="text-xs text-neutral-600 leading-relaxed line-clamp-3">
{{ selectedItem.extrait }}
</p>
<img
v-if="selectedItem.thumbnail"
:src="selectedItem.thumbnail"
:alt="selectedItem.titre"
class="mt-2 w-full max-h-28 object-cover rounded"
loading="lazy"
/>
</div>
<!-- Embed live (Substack ou Instagram) -->
<div v-if="embedUrl" class="flex-1 min-h-[200px] bg-white">
<iframe
:src="embedUrl"
class="w-full h-full border-0 min-h-[300px]"
:title="selectedItem.titre"
loading="lazy"
sandbox="allow-scripts allow-same-origin allow-popups allow-forms allow-top-navigation"
></iframe>
</div>
<!-- Carte incitative (autres plateformes) -->
<div v-else class="flex-1 flex flex-col items-start justify-center px-4 py-6">
<p class="text-xs text-neutral-500 mb-3 italic">Embed non disponible pour cette plateforme.</p>
<a
:href="selectedItem.url"
target="_blank"
rel="noopener noreferrer"
class="inline-block px-4 py-2 bg-neutral-900 text-white text-sm rounded-lg hover:bg-neutral-700 transition-colors"
>
Voir sur {{ platformLabel(selectedItem.platform) }} ->
</a>
</div>
<!-- CTA propagation universel -->
<div class="px-4 py-3 border-t border-neutral-100">
<a
:href="selectedItem.url"
target="_blank"
rel="noopener noreferrer"
class="text-xs text-neutral-500 hover:text-neutral-900 underline"
>
Continuer sur {{ platformLabel(selectedItem.platform) }} - commenter, partager
</a>
</div>
</div>
</div> </div>
</template> </template>

View File

@@ -0,0 +1,152 @@
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue'
interface JournalItem {
id: string
platform: 'substack' | 'gitea' | 'github' | 'instagram' | 'castopod' | 'blog' | 'linkedin'
hashtag: string
date: string
titre: string
extrait: string
url: string
thumbnail: string | null
}
const selectedItem = ref<JournalItem | null>(null)
const onJournalItemClick = (e: Event) => {
const ce = e as CustomEvent
if (ce.detail?.item) selectedItem.value = ce.detail.item
}
const onPreviewCloseExternal = () => {
selectedItem.value = null
}
onMounted(() => {
window.addEventListener('journal-item-click', onJournalItemClick as EventListener)
window.addEventListener('preview-close-request', onPreviewCloseExternal as EventListener)
})
onUnmounted(() => {
window.removeEventListener('journal-item-click', onJournalItemClick as EventListener)
window.removeEventListener('preview-close-request', onPreviewCloseExternal as EventListener)
})
const close = () => {
selectedItem.value = null
window.dispatchEvent(new CustomEvent('preview-close'))
}
const extractInstaShortcode = (url: string): string | null => {
const m = url.match(/\/(p|reel)\/([^\/\?#]+)/)
return m ? m[2] : null
}
const embedUrl = computed(() => {
if (!selectedItem.value) return null
const item = selectedItem.value
if (item.platform === 'substack') {
return item.url.includes('?') ? item.url + '&embed=1' : item.url + '?embed=1'
}
if (item.platform === 'instagram') {
const sc = extractInstaShortcode(item.url)
return sc ? `https://www.instagram.com/p/${sc}/embed/` : null
}
return null
})
const platformLabel = (p: string) => {
const labels: Record<string, string> = {
substack: 'Substack',
instagram: 'Instagram',
gitea: 'Gitea',
github: 'GitHub',
castopod: 'Podcast',
blog: 'Blog',
linkedin: 'LinkedIn',
}
return labels[p] || p
}
const formatDate = (iso: string) => {
try {
const d = new Date(iso)
return isNaN(d.getTime())
? ''
: `${String(d.getDate()).padStart(2, '0')}/${String(d.getMonth() + 1).padStart(2, '0')}`
} catch {
return ''
}
}
</script>
<template>
<div v-if="selectedItem" class="preview-article border border-neutral-200 rounded overflow-hidden bg-white flex flex-col">
<!-- Header : reset + hashtag -->
<div class="flex items-center justify-between px-4 py-2 border-b border-neutral-200 bg-white">
<button
class="text-xs text-neutral-500 hover:text-neutral-900 flex items-center gap-1"
@click="close"
type="button"
>
- Retour a la carte
</button>
<span class="text-xs text-neutral-400" style="font-family: 'Courier New', Courier, monospace;">
{{ selectedItem.hashtag }}
</span>
</div>
<!-- Teaser -->
<div class="px-4 py-3 border-b border-neutral-100 bg-neutral-50">
<p class="text-[11px] text-neutral-500 mb-1">{{ formatDate(selectedItem.date) }} - {{ selectedItem.platform }}</p>
<h3 class="text-sm font-semibold text-neutral-900 leading-snug mb-1">{{ selectedItem.titre }}</h3>
<p v-if="selectedItem.extrait" class="text-xs text-neutral-600 leading-relaxed line-clamp-3">
{{ selectedItem.extrait }}
</p>
<img
v-if="selectedItem.thumbnail"
:src="selectedItem.thumbnail"
:alt="selectedItem.titre"
class="mt-2 w-full max-h-28 object-cover rounded"
loading="lazy"
/>
</div>
<!-- Embed live (Substack ou Instagram) -->
<div v-if="embedUrl" class="bg-white" style="height: 60vh; min-height: 400px;">
<iframe
:src="embedUrl"
class="w-full h-full border-0"
:title="selectedItem.titre"
loading="lazy"
sandbox="allow-scripts allow-same-origin allow-popups allow-forms allow-top-navigation"
></iframe>
</div>
<!-- Carte incitative (autres plateformes) -->
<div v-else class="flex flex-col items-start justify-center px-4 py-6">
<p class="text-xs text-neutral-500 mb-3 italic">Embed non disponible pour cette plateforme.</p>
<a
:href="selectedItem.url"
target="_blank"
rel="noopener noreferrer"
class="inline-block px-4 py-2 bg-neutral-900 text-white text-sm rounded-lg hover:bg-neutral-700 transition-colors"
>
Voir sur {{ platformLabel(selectedItem.platform) }} ->
</a>
</div>
<!-- CTA propagation universel -->
<div class="px-4 py-3 border-t border-neutral-100">
<a
:href="selectedItem.url"
target="_blank"
rel="noopener noreferrer"
class="text-xs text-neutral-500 hover:text-neutral-900 underline"
>
Continuer sur {{ platformLabel(selectedItem.platform) }} - commenter, partager
</a>
</div>
</div>
</template>

View File

@@ -1,6 +1,7 @@
--- ---
import '../styles/global.css'; import '../styles/global.css';
import Footer from '../components/astro/Footer.astro'; import Footer from '../components/astro/Footer.astro';
import SiteHeader from '../components/astro/SiteHeader.astro';
interface Props { interface Props {
title?: string; title?: string;
@@ -28,8 +29,11 @@ const {
<meta name="twitter:title" content={title} /> <meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} /> <meta name="twitter:description" content={description} />
</head> </head>
<body class="m-0 bg-white text-neutral-900 antialiased"> <body class="m-0 bg-white text-neutral-900 antialiased min-h-screen flex flex-col">
<SiteHeader />
<div class="flex-1 flex flex-col min-h-0">
<slot /> <slot />
</div>
<Footer /> <Footer />
</body> </body>
</html> </html>

View File

@@ -15,15 +15,18 @@ import PopupOnboarding from '../components/astro/PopupOnboarding.astro';
<MobileTabBar /> <MobileTabBar />
<PopupOnboarding /> <PopupOnboarding />
<!-- Desktop : grid 3 colonnes --> <!-- Desktop : grid 3 colonnes (header 64px deja consommes par SiteHeader, on prend le reste) -->
<div class="hidden md:grid md:grid-cols-[320px_1fr_320px] h-screen overflow-hidden"> <div
class="hidden md:grid md:grid-cols-[320px_1fr_320px] overflow-hidden"
style="height: calc(100vh - 64px);"
>
<aside class="border-r border-neutral-200 overflow-y-auto"><ColJournal /></aside> <aside class="border-r border-neutral-200 overflow-y-auto"><ColJournal /></aside>
<main class="overflow-hidden"><ColCentre /></main> <main class="overflow-hidden"><ColCentre /></main>
<aside class="border-l border-neutral-200 overflow-y-auto"><ColInsta /></aside> <aside class="border-l border-neutral-200 overflow-y-auto"><ColInsta /></aside>
</div> </div>
<!-- Mobile : SwipeContainer Vue island - decale de 44px pour la tabbar --> <!-- Mobile : SwipeContainer Vue island - header 48px + tabbar 44px = 92px reserves -->
<div class="md:hidden overflow-hidden" style="height: calc(100dvh - 44px); margin-top: 44px;"> <div class="md:hidden overflow-hidden" style="height: calc(100dvh - 48px - 44px); margin-top: 44px;">
<SwipeContainer client:load> <SwipeContainer client:load>
<ColJournal slot="left" /> <ColJournal slot="left" />
<ColCentre slot="center" /> <ColCentre slot="center" />