Compare commits
1 Commits
feat/v12-n
...
feat/v12-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ba4628818 |
@@ -8,14 +8,26 @@
|
|||||||
version: "1.1"
|
version: "1.1"
|
||||||
|
|
||||||
centre:
|
centre:
|
||||||
id: "contrat-social-medecine-corps-social"
|
id: "nouveau-contrat-social"
|
||||||
label: "Contrat social + Medecine du corps social"
|
label: "Nouveau Contrat Social"
|
||||||
niveau: 0
|
niveau: 0
|
||||||
nature: essai
|
nature: essai
|
||||||
statut: gestation
|
statut: gestation
|
||||||
resume: "Manifeste central AEP : inventer un nouveau contrat social et diagnostiquer/soigner les pathologies du corps social."
|
resume: "Assemblage de tout ce que j'ecris qui s'entrechoque - inventer un nouveau contrat social."
|
||||||
|
|
||||||
concepts_force: []
|
concepts_force:
|
||||||
|
- id: "ncs-politique"
|
||||||
|
label: "Nouveau contrat social"
|
||||||
|
niveau: 1
|
||||||
|
nature: essai
|
||||||
|
statut: gestation
|
||||||
|
resume: "L'ecriture politique d'un futur habitable - essai central AEP."
|
||||||
|
- id: "medecine-corps-social"
|
||||||
|
label: "Medecine du corps social"
|
||||||
|
niveau: 1
|
||||||
|
nature: essai
|
||||||
|
statut: gestation
|
||||||
|
resume: "Diagnostiquer et soigner les pathologies du corps social - concept AEP mdcs."
|
||||||
|
|
||||||
thematiques:
|
thematiques:
|
||||||
- id: "systemique"
|
- id: "systemique"
|
||||||
|
|||||||
@@ -1,15 +1,35 @@
|
|||||||
{
|
{
|
||||||
"version": "1.1",
|
"version": "1.1",
|
||||||
"generatedAt": "2026-05-11T16:41:21.600Z",
|
"generatedAt": "2026-05-11T13:04:29.806Z",
|
||||||
"nodes": [
|
"nodes": [
|
||||||
{
|
{
|
||||||
"id": "contrat-social-medecine-corps-social",
|
"id": "nouveau-contrat-social",
|
||||||
"label": "Contrat social + Medecine du corps social",
|
"label": "Nouveau Contrat Social",
|
||||||
"niveau": 0,
|
"niveau": 0,
|
||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": "Manifeste central AEP : inventer un nouveau contrat social et diagnostiquer/soigner les pathologies du corps social.",
|
"resume": "Assemblage de tout ce que j'ecris qui s'entrechoque - inventer un nouveau contrat social.",
|
||||||
"radius": 30,
|
"radius": 28,
|
||||||
|
"family": "concept"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ncs-politique",
|
||||||
|
"label": "Nouveau contrat social",
|
||||||
|
"niveau": 1,
|
||||||
|
"nature": "essai",
|
||||||
|
"statut": "gestation",
|
||||||
|
"resume": "L'ecriture politique d'un futur habitable - essai central AEP.",
|
||||||
|
"radius": 18,
|
||||||
|
"family": "concept"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "medecine-corps-social",
|
||||||
|
"label": "Medecine du corps social",
|
||||||
|
"niveau": 1,
|
||||||
|
"nature": "essai",
|
||||||
|
"statut": "gestation",
|
||||||
|
"resume": "Diagnostiquer et soigner les pathologies du corps social - concept AEP mdcs.",
|
||||||
|
"radius": 18,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -19,7 +39,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -29,7 +49,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -39,7 +59,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -49,7 +69,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -59,7 +79,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -69,7 +89,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -79,7 +99,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -89,7 +109,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -99,7 +119,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -109,7 +129,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -119,7 +139,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -129,7 +149,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -139,7 +159,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -149,7 +169,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -159,7 +179,7 @@
|
|||||||
"nature": "essai",
|
"nature": "essai",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": null,
|
"resume": null,
|
||||||
"radius": 12,
|
"radius": 10,
|
||||||
"family": "concept"
|
"family": "concept"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -169,69 +189,77 @@
|
|||||||
"nature": "projet",
|
"nature": "projet",
|
||||||
"statut": "gestation",
|
"statut": "gestation",
|
||||||
"resume": "Transport, mobilite, industrie, politique - projet archi. Exemple de projet archi relie aux thematiques AEP.",
|
"resume": "Transport, mobilite, industrie, politique - projet archi. Exemple de projet archi relie aux thematiques AEP.",
|
||||||
"radius": 18,
|
"radius": 14,
|
||||||
"family": "ressource"
|
"family": "ressource"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"edges": [
|
"edges": [
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
|
"target": "ncs-politique"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "nouveau-contrat-social",
|
||||||
|
"target": "medecine-corps-social"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "ncs-politique",
|
||||||
"target": "systemique"
|
"target": "systemique"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "ncs-politique",
|
||||||
"target": "pratiques-collectives"
|
"target": "pratiques-collectives"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "medecine-corps-social",
|
||||||
"target": "art-narration"
|
"target": "art-narration"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "ncs-politique",
|
||||||
"target": "pouvoir-domination"
|
"target": "pouvoir-domination"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
"target": "medias-critique"
|
"target": "medias-critique"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
"target": "justice-securite"
|
"target": "justice-securite"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "medecine-corps-social",
|
||||||
"target": "sante-globale"
|
"target": "sante-globale"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
"target": "agriculture"
|
"target": "agriculture"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "ncs-politique",
|
||||||
"target": "post-croissance"
|
"target": "post-croissance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "medecine-corps-social",
|
||||||
"target": "anthropocene"
|
"target": "anthropocene"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "ncs-politique",
|
||||||
"target": "education"
|
"target": "education"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
"target": "urbanisme"
|
"target": "urbanisme"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "nouveau-contrat-social",
|
||||||
"target": "geopolitique"
|
"target": "geopolitique"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "medecine-corps-social",
|
||||||
"target": "ia-technologie"
|
"target": "ia-technologie"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "contrat-social-medecine-corps-social",
|
"source": "medecine-corps-social",
|
||||||
"target": "spiritualite"
|
"target": "spiritualite"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ const REPO_ROOT = path.resolve(__dirname, '..')
|
|||||||
const SOURCE = path.join(REPO_ROOT, 'public/data/carte-o-source.yaml')
|
const SOURCE = path.join(REPO_ROOT, 'public/data/carte-o-source.yaml')
|
||||||
const OUTPUT = path.join(REPO_ROOT, 'public/data/carte-o.json')
|
const OUTPUT = path.join(REPO_ROOT, 'public/data/carte-o.json')
|
||||||
|
|
||||||
// radius par niveau + nature (V1.2-N palette minimaliste)
|
// radius par niveau + nature
|
||||||
function getRadius(niveau, nature) {
|
function getRadius(niveau, nature) {
|
||||||
if (niveau === 0) return 30
|
if (niveau === 0) return 28
|
||||||
if (nature === 'projet') return 18
|
if (niveau === 1) return 18
|
||||||
if (niveau === 1) return 16
|
if (niveau === 2 && nature === 'projet') return 14
|
||||||
return 12
|
return 10
|
||||||
}
|
}
|
||||||
|
|
||||||
// compat backward : nature -> family
|
// compat backward : nature -> family
|
||||||
@@ -24,8 +24,30 @@ function getFamily(nature) {
|
|||||||
return nature === 'projet' ? 'ressource' : 'concept'
|
return nature === 'projet' ? 'ressource' : 'concept'
|
||||||
}
|
}
|
||||||
|
|
||||||
// V1.2-N : noeud central fusionne -> toutes les thematiques sont rattachees au centre
|
// thematiques rattachees directement au centre (ni ncs-politique ni medecine-corps-social)
|
||||||
// (les anciens groupes NCS_THEMATIQUES / MDCS_THEMATIQUES sont supprimes avec leurs sous-noeuds)
|
const CENTRE_THEMATIQUES = new Set([
|
||||||
|
'medias-critique',
|
||||||
|
'justice-securite',
|
||||||
|
'agriculture',
|
||||||
|
'urbanisme',
|
||||||
|
'geopolitique',
|
||||||
|
])
|
||||||
|
|
||||||
|
const NCS_THEMATIQUES = new Set([
|
||||||
|
'systemique',
|
||||||
|
'pratiques-collectives',
|
||||||
|
'pouvoir-domination',
|
||||||
|
'post-croissance',
|
||||||
|
'education',
|
||||||
|
])
|
||||||
|
|
||||||
|
const MDCS_THEMATIQUES = new Set([
|
||||||
|
'art-narration',
|
||||||
|
'sante-globale',
|
||||||
|
'spiritualite',
|
||||||
|
'ia-technologie',
|
||||||
|
'anthropocene',
|
||||||
|
])
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const raw = await fs.readFile(SOURCE, 'utf-8')
|
const raw = await fs.readFile(SOURCE, 'utf-8')
|
||||||
@@ -58,17 +80,21 @@ async function main() {
|
|||||||
const centreId = data.centre.id
|
const centreId = data.centre.id
|
||||||
addNode(data.centre)
|
addNode(data.centre)
|
||||||
|
|
||||||
// concepts_force vide en V1.2-N (fusionne dans le centre)
|
for (const cf of data.concepts_force) {
|
||||||
for (const cf of (data.concepts_force || [])) {
|
|
||||||
addNode(cf)
|
addNode(cf)
|
||||||
addEdge(centreId, cf.id)
|
addEdge(centreId, cf.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// toutes les thematiques rattachees directement au noeud central
|
|
||||||
for (const th of data.thematiques) {
|
for (const th of data.thematiques) {
|
||||||
addNode(th)
|
addNode(th)
|
||||||
|
if (NCS_THEMATIQUES.has(th.id)) {
|
||||||
|
addEdge('ncs-politique', th.id)
|
||||||
|
} else if (MDCS_THEMATIQUES.has(th.id)) {
|
||||||
|
addEdge('medecine-corps-social', th.id)
|
||||||
|
} else if (CENTRE_THEMATIQUES.has(th.id)) {
|
||||||
addEdge(centreId, th.id)
|
addEdge(centreId, th.id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const proj of data.projets) {
|
for (const proj of data.projets) {
|
||||||
addNode(proj)
|
addNode(proj)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
52
src/components/astro/SiteHeader.astro
Normal file
52
src/components/astro/SiteHeader.astro
Normal 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>
|
||||||
@@ -64,46 +64,32 @@ let zoomBehavior: d3.ZoomBehavior<SVGSVGElement, unknown> | null = null
|
|||||||
const isMobile = computed(() => width.value < 600)
|
const isMobile = computed(() => width.value < 600)
|
||||||
const nodeRadius = computed(() => isMobile.value ? 10 : 14)
|
const nodeRadius = computed(() => isMobile.value ? 10 : 14)
|
||||||
|
|
||||||
// V1.2-N palette : encre / papier / ocre
|
|
||||||
// - central niveau 0 : fill encre #0F172A, label blanc inscrit dans le cercle
|
|
||||||
// - essais (niveaux 1-2) : fill papier #FFFFFF, stroke encre, label encre a droite
|
|
||||||
// - projets : fill ocre #B45309, label blanc inscrit dans le cercle
|
|
||||||
// - statut "edite" : stroke epaissi (l'epaisseur conserve l'info, pas la couleur)
|
|
||||||
function colorFor(d: SimNode): string {
|
function colorFor(d: SimNode): string {
|
||||||
if (d.nature === 'projet') return '#B45309'
|
if (d.nature === 'projet') return '#b45309'
|
||||||
if (d.niveau === 0) return '#0F172A'
|
if (d.niveau === 0) return '#1d4ed8'
|
||||||
return '#FFFFFF'
|
if (d.niveau === 1) return '#2563eb'
|
||||||
|
if (d.niveau === 2) return '#60a5fa'
|
||||||
|
return props.familyColors[d.family] || '#9ca3af'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRadius(d: SimNode): number {
|
function getRadius(d: SimNode): number {
|
||||||
if (d.radius != null) return d.radius
|
return d.radius ?? nodeRadius.value
|
||||||
if (d.niveau === 0) return 30
|
|
||||||
if (d.nature === 'projet') return 18
|
|
||||||
return nodeRadius.value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function strokeFor(d: SimNode): string {
|
function strokeFor(d: SimNode): string {
|
||||||
if (d.nature === 'projet') return '#B45309'
|
return d.statut === 'edite' ? '#0f172a' : '#94a3b8'
|
||||||
if (d.niveau === 0) return '#0F172A'
|
|
||||||
return '#0F172A'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function strokeWidthFor(d: SimNode): number {
|
function strokeWidthFor(d: SimNode): number {
|
||||||
return d.statut === 'edite' ? 2.5 : 1.5
|
return d.statut === 'edite' ? 2.5 : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function labelWeightFor(d: SimNode): string {
|
function labelWeightFor(d: SimNode): string {
|
||||||
return d.statut === 'edite' ? 'bold' : 'normal'
|
return d.statut === 'edite' ? 'bold' : 'normal'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Label inscrit dans le cercle (fond fonce) pour central + projets
|
|
||||||
function labelInsideFor(d: SimNode): boolean {
|
|
||||||
return d.niveau === 0 || d.nature === 'projet'
|
|
||||||
}
|
|
||||||
|
|
||||||
function labelColorFor(d: SimNode): string {
|
function labelColorFor(d: SimNode): string {
|
||||||
if (labelInsideFor(d)) return '#FFFFFF'
|
return d.statut === 'edite' ? '#0f172a' : '#6b7280'
|
||||||
return d.statut === 'edite' ? '#0F172A' : '#475569'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate(str: string, max: number): string {
|
function truncate(str: string, max: number): string {
|
||||||
@@ -111,27 +97,6 @@ function truncate(str: string, max: number): string {
|
|||||||
return str.length > max ? str.slice(0, max - 1) + '…' : str
|
return str.length > max ? str.slice(0, max - 1) + '…' : str
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split intelligent du label central sur 2-3 lignes (autour de "+")
|
|
||||||
function splitCentralLabel(label: string): string[] {
|
|
||||||
if (!label) return ['']
|
|
||||||
// priorite : split sur " + " si present
|
|
||||||
if (label.includes(' + ')) {
|
|
||||||
const parts = label.split(' + ')
|
|
||||||
return [parts[0].trim(), '+', parts.slice(1).join(' + ').trim()]
|
|
||||||
}
|
|
||||||
// fallback : split a peu pres au milieu sur un espace
|
|
||||||
if (label.length > 14) {
|
|
||||||
const mid = Math.floor(label.length / 2)
|
|
||||||
const left = label.lastIndexOf(' ', mid)
|
|
||||||
const right = label.indexOf(' ', mid)
|
|
||||||
const cut = (mid - left <= right - mid && left > 0) ? left : right
|
|
||||||
if (cut > 0) {
|
|
||||||
return [label.slice(0, cut).trim(), label.slice(cut).trim()]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [label]
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildSimNodes(): SimNode[] {
|
function buildSimNodes(): SimNode[] {
|
||||||
return props.nodes.map(n => ({ ...n }))
|
return props.nodes.map(n => ({ ...n }))
|
||||||
}
|
}
|
||||||
@@ -202,14 +167,14 @@ function render() {
|
|||||||
|
|
||||||
const fontSize = isMobile.value ? 9 : 11
|
const fontSize = isMobile.value ? 9 : 11
|
||||||
|
|
||||||
// Liens — gris doux papier
|
// Liens
|
||||||
gLinks!
|
gLinks!
|
||||||
.selectAll<SVGLineElement, SimLink>('line')
|
.selectAll<SVGLineElement, SimLink>('line')
|
||||||
.data(simLinks)
|
.data(simLinks)
|
||||||
.join('line')
|
.join('line')
|
||||||
.attr('stroke', '#94A3B8')
|
.attr('stroke', '#94a3b8')
|
||||||
.attr('stroke-opacity', 0.4)
|
.attr('stroke-opacity', 0.45)
|
||||||
.attr('stroke-width', 1)
|
.attr('stroke-width', 1.2)
|
||||||
|
|
||||||
// Noeuds = groupe <g> par node
|
// Noeuds = groupe <g> par node
|
||||||
const nodeGroups = gNodes!
|
const nodeGroups = gNodes!
|
||||||
@@ -237,58 +202,17 @@ function render() {
|
|||||||
.attr('stroke', d => strokeFor(d))
|
.attr('stroke', d => strokeFor(d))
|
||||||
.attr('stroke-width', d => strokeWidthFor(d))
|
.attr('stroke-width', d => strokeWidthFor(d))
|
||||||
|
|
||||||
// Label : inscrit dans le cercle pour central + projets, a droite sinon
|
// Label
|
||||||
// Pour le noeud central (label long), on passe en multi-lignes
|
nodeGroups.append('text')
|
||||||
nodeGroups.each(function (d) {
|
|
||||||
const g = d3.select(this)
|
|
||||||
const inside = labelInsideFor(d)
|
|
||||||
|
|
||||||
if (inside && d.niveau === 0) {
|
|
||||||
// Noeud central : label en 2 lignes inscrites au centre
|
|
||||||
const parts = splitCentralLabel(d.label)
|
|
||||||
const lineHeight = isMobile.value ? 10 : 12
|
|
||||||
const fs = isMobile.value ? 9 : 11
|
|
||||||
const startY = -((parts.length - 1) * lineHeight) / 2
|
|
||||||
parts.forEach((line, i) => {
|
|
||||||
g.append('text')
|
|
||||||
.attr('text-anchor', 'middle')
|
|
||||||
.attr('dominant-baseline', 'central')
|
|
||||||
.attr('x', 0)
|
|
||||||
.attr('y', startY + i * lineHeight)
|
|
||||||
.attr('font-size', fs)
|
|
||||||
.attr('font-family', 'system-ui, sans-serif')
|
|
||||||
.attr('font-weight', 'bold')
|
|
||||||
.attr('fill', '#FFFFFF')
|
|
||||||
.attr('pointer-events', 'none')
|
|
||||||
.text(line)
|
|
||||||
})
|
|
||||||
} else if (inside) {
|
|
||||||
// Projets : label centre dans le cercle (court)
|
|
||||||
g.append('text')
|
|
||||||
.attr('text-anchor', 'middle')
|
|
||||||
.attr('dominant-baseline', 'central')
|
|
||||||
.attr('x', 0)
|
|
||||||
.attr('y', 0)
|
|
||||||
.attr('font-size', fontSize)
|
|
||||||
.attr('font-family', 'system-ui, sans-serif')
|
|
||||||
.attr('font-weight', labelWeightFor(d))
|
|
||||||
.attr('fill', '#FFFFFF')
|
|
||||||
.attr('pointer-events', 'none')
|
|
||||||
.text(truncate(d.label, 6))
|
|
||||||
} else {
|
|
||||||
// Essais : label a droite du cercle
|
|
||||||
g.append('text')
|
|
||||||
.attr('text-anchor', 'start')
|
.attr('text-anchor', 'start')
|
||||||
.attr('dominant-baseline', 'central')
|
.attr('dominant-baseline', 'central')
|
||||||
.attr('dx', getRadius(d) + 4)
|
.attr('dx', d => getRadius(d) + 4)
|
||||||
.attr('font-size', fontSize)
|
.attr('font-size', fontSize)
|
||||||
.attr('font-family', 'system-ui, sans-serif')
|
.attr('font-family', 'system-ui, sans-serif')
|
||||||
.attr('font-weight', labelWeightFor(d))
|
.attr('font-weight', d => labelWeightFor(d))
|
||||||
.attr('fill', labelColorFor(d))
|
.attr('fill', d => labelColorFor(d))
|
||||||
.attr('pointer-events', 'none')
|
.attr('pointer-events', 'none')
|
||||||
.text(truncate(d.label, isMobile.value ? 18 : 30))
|
.text(d => truncate(d.label, isMobile.value ? 18 : 30))
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Tooltip <title>
|
// Tooltip <title>
|
||||||
nodeGroups.append('title')
|
nodeGroups.append('title')
|
||||||
@@ -401,7 +325,7 @@ onUnmounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #FAFAF7;
|
background: #fafafa;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user