Author SHA1 Message Date
YvvandClaude Opus 5.5 a885eab220 acte : identité du studio DA — exécuté et vérifié en production (pipeline 61, f1dbf21)
ci/woodpecker/push/woodpecker Pipeline failed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 20:55:54 +01:00
YvvandClaude Opus 5.5 c08c262cbd acte : identité du studio DA — dossier repris sur f1dbf21 (IDENTITE-DA-6, composition : ok de DA)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 19:53:45 +01:00
YvvandClaude Opus 5.5 1b821f2b4d acte : identité du studio DA — dossier repris sur bb8fad9 (IDENTITE-DA-5, liste fermée)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:36:07 +01:00
YvvandClaude Opus 5.5 6543e4eff7 acte : identité du studio DA — avis de DA sur IDENTITE-DA-4 (composition : ok, filet : oui)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 69ba5b5e87 acte : identité du studio DA — dossier repris sur b6143c5 (IDENTITE-DA-4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 bf04a090f7 acte : identité du studio DA — l'attendu de la sonde relevé sur le build de 16d6607
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 9a0bc42fc5 acte : identité du studio DA — dossier repris sur 16d6607 (IDENTITE-DA-3, console reposée, doc)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 f34c1da6d1 acte : identité du studio DA — dossier repris sur fb8c71f (IDENTITE-DA-2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 49c0c5d691 acte : identité du studio DA — dossier « déploie » préparé
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:35:48 +01:00
YvvandClaude Opus 5.5 bb8fad9ff3 identité 5 : la liste fermée des règles mesurées, appliquée à toutes les pages
Ordre IDENTITE-DA-5 (03/11 14h41, relayé par la session orch ; seuils confirmés par DA) :
- docs/da-oiseaux.md : « Règles mesurées (liste fermée) », règles a à i avec leurs seuils, telles
  que le contrôle les mesure (pixels peints, ligne de base), et la phrase juste sur l'acrobate ;
- UiOiseauPose : pose `bout`, une ancre sans taille dans le texte, sur sa ligne de base, pour un
  oiseau au bout (ou au début) d'un titre ;
- au bout de leur titre : trapéziste, clown, marionnettiste, DJ (/en-musique), droneuse, vigie,
  alchimiste, relieur, et l'oiseau de l'intitulé au téléphone ;
- authentification : le pompeur de Ğ1 perché sur la carte du projet (plus de colonne en marge) ;
- accueil : l'accordéoniste au bout du titre du format (plus de paire avec la lectrice, plus de
  trait sur le lien) ;
- soudeuse sur la ligne de base de son titre ; administrateur réseau et cartographe sortent par le
  côté de leur carte, pas par un coin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 15:07:35 +01:00
YvvandClaude Opus 5.5 b6143c5cf7 identité 4 : plus de paire ni de colonne en marge, chaque oiseau sur une ligne visible ; la console arrête un curseur qui descendait
Relecture de fb8c71f..16d6607 (03/11 13h10, relayée par la session orch) :
- /economique : la balance sort de derrière le bloc du livre à mi-hauteur, loin du sol de la
  maraîchère ;
- authentification-wot : la toile de confiance, petite, en marge sur la dernière ligne des étapes
  (le bloc n'a pas de fond) ;
- chapitres : le filet au-dessus de précédent / suivant est tracé (border-t seul n'a pas de style
  ici) ; le cartonnier s'y pose ;
- /evenement : l'acrobate passe au bout de la ligne du leitmotiv, le régisseur reste seul près de
  « Format & lieu » ;
- sommaire du livre : empileur plus loin, illustratrice moins sortie : plus de bande commune.
Trouvés par le contrôle étendu : le débogueur (logiciel-libre) sur la dernière ligne des étapes,
la vigneronne (monnaie-libre) derrière le bloc de texte, qui a un fond.

Console, décision d'orch du 03/11 à 13h10 : au premier geste, un curseur non touché que la
rotation faisait descendre s'arrête là où il est ; un curseur qui montait finit sa montée.
docs/consignes-yvv.md (« Ce que fait le code ») et docs/da-oiseaux.md suivent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:52:44 +01:00
YvvandClaude Opus 5.5 16d66072b9 docs : les avis du studio DA et des relectures quittent les consignes d'Yvv (docs/da-oiseaux.md)
consignes-yvv.md ne garde que les mots d'Yvv, datés et mot pour mot. Les deux sections
relayées par la session orch (avis de DA de 07h00, second avis de 07h56 et relecture de
08h14, le 03/11) passent telles quelles dans docs/da-oiseaux.md ; une ligne y renvoie.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:38:56 +01:00
YvvandClaude Opus 5.5 8de9a81b65 console : chaque survol rejoue la montée, aucun curseur figé à mi-course ; pied de page sans lien mort
Les quatre écarts de la relecture « 64e714c : ok », graduation d'Yvv inchangée
(0,75, 0,50, 0,667, montée rejouée à chaque survol) :
- premier geste pendant la rotation : un curseur non touché finit en douceur le
  mouvement que la rotation avait commencé (jusqu'à son cran, ou en bas), puis reste.
  La main ne fait descendre aucun curseur (« ne fait pas descendre les autres ») ;
- un nouveau survol, même à moins de 500 ms, rejoue la montée ; seuls la flèche et
  le focus qui la suit, ou le focus et le clic d'un même tap, font une seule montée ;
- un clic sans survol ni focus (lecteur d'écran, script) monte le curseur avec son
  panneau ;
- la flèche part de l'onglet qui a le focus, plus de l'axe sélectionné.

Pied de page : un lien vers une page qui n'existe pas (/mentions-legales) n'est pas
affiché ; il reviendra seul quand la page existera. site.yml n'est pas touché.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:34:15 +01:00
YvvandClaude Opus 5.5 44e9576b38 identité 3 : plus de zigzag ni de paires, des tailles variées, chaque oiseau sur une vraie ligne
Second avis du studio DA (03/11, 07h56) et relecture de fb8c71f (08h14) :
- numérique : le zigzag gauche-droite à pas égal est cassé. Électricien en M,
  codeuse et cryptographe au bas de leur carte, à droite, administrateur réseau
  en grand derrière Cloud libre ;
- commande : un seul côté par carte. Cycliste à gauche de la première, libraire
  en grand derrière la seconde ; la lectrice se tient sur le sac de l'icône.
  Le cartonnier va sur la ligne qui clôt chaque chapitre, l'empileur sur le
  sommaire du livre : les 61 restent rendus ;
- au moins deux tailles dès trois oiseaux (chapitre, en-musique, événement) ;
- un oiseau de marge a les pieds sur une vraie ligne, le bas ou le haut de son
  bloc ou d'une carte, jamais à mi-hauteur (« posés sans flotter ») ;
- aucun oiseau sur le haut invisible de la boîte d'un titre : dj, trapéziste,
  alchimiste et droneuse se tiennent sur la dernière ligne ou au bout de
  l'intitulé ;
- téléphone : le pompeur de Ğ1 au bout de la ligne de l'intitulé ;
- sous-pages numériques : poses, tailles et décalages variés malgré le sommaire
  à droite ; le comédien de tarifs-eau perché sur sa carte, hors du sommaire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:33:05 +01:00
YvvandClaude Opus 5.5 fb8c71fc59 identité 2 : un oiseau perché seulement où il y a du vide au-dessus, l'en-tête tient à 768 px
Avis du studio DA du 03/11 (07h00) et relecture de 8ccdda3 :
- règle du perché : il faut au-dessus de l'arête un vide au moins égal à la hauteur
  de l'oiseau, sinon il va en marge ou derrière la carte. Les perchés entre cartes
  rapprochées (numérique, logiciel-libre, économique, sommaire du livre, commande,
  citoyenne, événement) passent en marge, derrière, ou partent ;
- productions-collectives : 8 oiseaux ramenés à 4, sans colonne ni chevauchement.
  Les oiseaux retirés vont sur des pages qui en avaient peu : monnaie-libre
  (boulangère, vigneronne), tarifs-eau (potier), décision (tisserand),
  cloud-libre (imprimeuse 3D). Les 61 restent rendus ;
- pas trois oiseaux sur la même verticale (commande, numérique) ;
- au téléphone, l'oiseau de la page se tient au bout de la ligne de l'intitulé ;
- seuil 1024 pour un perché dont le bloc n'a de vide au-dessus qu'en deux colonnes
  (accordéoniste et factrice de l'accueil) ;
- numerique/[slug] : les oiseaux des sections larges tiennent dans 152 px de marge
  à 1200 px ;
- en-tête : de 768 à 1023 px, boutons resserrés au lieu d'un débordement ; le
  logotype du kit ne change pas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:41:10 +01:00
YvvandClaude Opus 5.5 8ccdda39a9 claude.md : les oiseaux et le logotype du studio DA remplacent les shadoks et la signature §
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 06:41:19 +01:00
YvvandClaude Opus 5.5 d2bc0d9e46 identité : le kit du studio DA intégré, les 61 oiseaux posés sur la page
Copie du kit kit-site (empreinte vérifiée) : logotype dans l'en-tête, signe §,
favicons et icônes, og-default (?v=3), frise du pied de page, 61 oiseaux.
Les shadoks positionnés à la main (HomeShadoks et les règles des 10 pages)
cèdent la place à UiOiseauPose : chaque oiseau se pose sur une arête réelle
(perché, marge gauche ou droite, derrière une carte, libre), currentColor,
largeur 72 px au moins, opacité 0,18-0,28 près du texte et 0,10-0,14 derrière,
jamais deux fois sur une page, calligraphe et typographe jamais en miroir.
Sous 768 px, un oiseau par page au plus ; seuls ceux derrière une carte
dérivent un peu, et plus du tout en mouvement réduit.

Consignes d'Yvv du 03/11 inscrites dans docs/consignes-yvv.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 06:39:34 +01:00
YvvandClaude Opus 5.5 cdd3fa57de claude.md : renvoi aux consignes d'Yvv, datées et mot pour mot (docs/consignes-yvv.md)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 06:15:38 +01:00
YvvandClaude Opus 5.5 44dbcfd5cf acte : console de l'accueil — exécuté et vérifié en production (pipeline 60)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 06:15:27 +01:00
YvvandClaude Opus 5.5 26ce315aa6 acte : console de l'accueil, la graduation d'Yvv au survol — dossier « déploie » préparé
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 05:58:48 +01:00
YvvandClaude Opus 5.5 64e714c1dd console : l'animation monte l'axe en avant à son cran
ci/woodpecker/push/woodpecker Pipeline was successful
Avant tout geste, l'axe mis en avant par la rotation monte à sa graduation
(numérique 0,75, économique 0,50, citoyenne 0,667) au lieu de 0,87-0,93 ;
les deux autres gardent leur dérive basse. L'animation et la main donnent
les mêmes niveaux, et un curseur figé au premier geste ne reste plus
au-dessus de son cran. Décision d'orch (03/11, 05h51), consignée dans
docs/consignes-yvv.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 05:56:29 +01:00
YvvandClaude Opus 5.5 03f763ab57 console : graduation d'Yvv, la montée se rejoue à chaque survol
Consigne d'Yvv du 03/11, mot pour mot dans docs/consignes-yvv.md (avec
celles du 29/09) : « Au rollover, numérique monte à 3/4, économie monte à
1/2, citoyenne monte à 2/3. Les curseurs restent. Si on rollover à nouveau
ils refont leur montée. Et le pavé correspondant s'affiche bien sûr au même
rollover. »

- survol à la souris, focus au clavier ou tap : le curseur repart d'en bas
  et monte en 1,1 s à son cran (0,75 / 0,50 / 0,667), puis il y reste ;
  le panneau de l'axe s'affiche au même geste (aria-selected et tabindex
  suivent)
- au premier geste, la rotation s'arrête pour de bon ; les autres
  curseurs restent là où ils sont dessinés, jamais survolés compris
- un défilement au doigt parti d'un curseur ne compte plus comme survol
- flèches du clavier : la montée part avec sa transition rapide
- remplace les choix d'interprétation de 230f79a (curseurs poussés en
  haut, rotation qui reprend, panneau au clic seulement)
- avant tout geste, l'animation du 29/09 est inchangée ; sous
  prefers-reduced-motion, mêmes crans sans transition

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 05:42:32 +01:00
YvvandClaude Opus 5.5 230f79a8c0 console : au survol, le curseur monte sans faire descendre les autres
- survol ou focus d'un curseur : il monte en 0,9 s ; les autres restent
  figés à leur niveau tant que la main est sur la console (dérive et
  rotation suspendues)
- dès le premier geste (survol, focus, clic, flèches), ce qui est monté
  reste monté : le visiteur pousse les curseurs un à un
- avant tout geste, l'animation du 29/09 est inchangée (dérive lente,
  un axe mis en avant à tour de rôle, arrêt au clic)
- prefers-reduced-motion : aucune transition, mêmes règles de niveaux

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 05:17:08 +01:00
YvvandClaude Opus 5.5 89d5f83c7f actes : persistance des messages — preuve au déploiement suivant
Déploiement de 4057f50 (pipeline n° 59) : conteneur recréé, messages.yml
inchangé sur le volume librodrome-data, 0 graine rejouée.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:55:03 +01:00
YvvandClaude Opus 5.5 4057f50bd3 actes : persistance des messages — exécuté et vérifié en production
ci/woodpecker/push/woodpecker Pipeline was successful
Section d'exécution du dossier (sorties relevées par orch, session dev-65),
CLAUDE.md corrigé (volume librodrome-data sur /app/data, m4 de la relecture),
HANDOFF : état en ligne et décisions restant à Yvv.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:50:34 +01:00
YvvandClaude Opus 5.5 c32d88bec1 actes : persistance des messages — diagnostic et dossier préparé
Diagnostic en lecture seule sur sonic (26/10) : le conteneur tourne
dans /app, les montages visent /src/data et /src/public (dossiers
vides de l'hôte), les messages vivent dans la couche du conteneur et
la graine est rejouée à chaque déploiement ; ADMIN_GIT_SYNC=false,
pas de .git, aucun commit [admin]. Rien perdu depuis le 29/09 ;
avant, invérifiable.

Dossier PRÉPARÉ (mot « déploie ») : sauvegarde et volume semé sur
sonic, veille de l'ancien conteneur, push de a6ba0a6
(fix/persistance-messages), vérification et redémarrage à froid.
Scripts déroulés en entier en local avec le vrai docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:46:41 +01:00
YvvandClaude Opus 5.5 a6ba0a6662 docker : messages persistés dans un volume nommé monté sur /app/data
ci/woodpecker/push/woodpecker Pipeline was successful
Depuis 07bf07a (27/02), l'image tourne dans /app et le serveur lit
process.cwd()/data, mais le compose montait toujours /src/data et
/src/public : les messages vivaient dans la couche du conteneur et
chaque déploiement les remettait à la graine (constaté sur sonic le
26/10, voir actes/2026-10-26-persistance-messages.md).

- volume externe librodrome-data sur /app/data, créé et semé à la main
  avant le déploiement ; sans lui, compose échoue sans toucher au
  conteneur en service ;
- montages morts /src/data et /src/public retirés ;
- docker-compose.dev.yml : volumes en !override, le dev garde data/
  des sources.

Répété en local le 26/10 (node:22, .output local) : échec propre sans
volume, aucune graine rejouée, message posté conservé après
--force-recreate, volume épargné par down -v, retour à l'ancienne
config sans perte du volume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:32:16 +01:00
YvvandClaude Opus 5.5 23b1767e67 claude.md : fiche et boucle de vérification fusionnées
- Rôle, port, dépôt, stack (layer @yvv/nuxt-base, pnpm épinglé, Umami),
  déploiement Woodpecker sans étape de test, graine des messages.
- Section « Vérifier » : V0 (build + smoke rejoués le 26/10/2026), V1 et V2
  à construire, V3, trous connus et gates humains d'anneau 1.
- Constats du 26/10/2026 : montages Docker sur /src alors que l'image tourne
  dans /app, git sync admin inactif (pas de variable, pas de .git, aucun
  commit [admin]). Décision portée au HANDOFF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 01:28:52 +01:00
YvvandClaude Opus 5.5 852a4881a6 handoff : bloc REPRISE (bascule quota 2026-09-29)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 14:11:32 +02:00
YvvandClaude Opus 5.5 1c7cc455ab actes : og + favicon — exécuté et vérifié en production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:05:43 +02:00
YvvandClaude Opus 5.5 90f77da49b actes : mise en ligne og + favicon (armé par Yvv)
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 08:52:31 +02:00
YvvandClaude Opus 5.5 74ae8c2666 og : image de partage et favicon avec le vrai §, spaghetti retiré
- og-default.png refaite (§ Playfair, Bricolage, trois autonomies en couleurs)
- favicon.ico : § (c'était le logo Nuxt par défaut)
- JSON-LD : logo pointait vers /images/og-default.png (404) → /og-default.png
- ?v=2 sur l'og:image pour que les réseaux sociaux la reprennent
- retrait des trois tracés « spaghetti » orphelins de public/images

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 08:52:31 +02:00
YvvandClaude Opus 5.5 2144132c74 actes : mise en ligne de la refonte — exécutée et vérifiée en production
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 08:06:49 +02:00
YvvandClaude Opus 5.5 67cd869d83 actes : mise en ligne de la refonte (armé par Yvv)
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 07:44:28 +02:00
YvvandClaude Opus 5.5 201cfbbb50 design : accueil console seul, vrai §, curseurs animés, statuts, lecteur
- accueil : la console devient l'accueil unique (variantes B/C, sélecteur
  et ancien accueil retirés) ; curseurs qui montent de l'asservissement et
  dérivent seuls, un axe mis en avant à tour de rôle, arrêt au clic,
  immobiles en prefers-reduced-motion ; « AUTONOMIE » devant chaque axe,
  leviers mis en valeur, ligne des trois autonomies en couleurs
- logo : § de Playfair Display (SIL OFL) vectorisé, composant partagé
  UiSectionSign (en-tête, page événement) + favicon.svg
- UiStatusBadge (production / développement / gestation) sur l'accueil,
  les pages d'axe et les pages projet
- liens libreDecision / SejeteralO fixés sur la prod (plus de repli localhost)
- logiciel libre : bouton v1 dans la carte projet en tête de page
- couverture du livre : recadrage corrigé (BookSection)
- texte courant en Public Sans (zéros non barrés)
- lecteur : la pastille persistante ne masque plus la navigation du
  BookPlayer ; lecture directe du MP3 (les .ogg n'existent pas : 404)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 05:59:33 +02:00
YvvandClaude Opus 5.5 4d8fe4895d contenus : LaPlanK, sweetHome, statuts de production, sous-titre événement
- LPK → LaPlanK partout ; sweethomeCloud → sweetHome partout
- statuts : Monnaie libre en production depuis 2017 ; wishBounty,
  Décision collective, Tarifs de l'eau en développement ; v1 wishBounty
  en production pour l'écosystème Duniter ; « bridée » retiré
- accueil : « Le librodrome est une invitation », « … une boîte à outils » ;
  échelle de la console Asservissement → Émancipation
- sweetHome clé en main pour chaque collectif, association ou entreprise
  coopérative ; page Le Librodrome : « Un format d'événement »

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 05:59:33 +02:00
YvvandClaude Opus 5.5 e9fce4be8f design : accueil en trois variantes (console, parcours, établi) + couleur par axe
- typo : Bricolage Grotesque (titres) + Atkinson Hyperlegible (texte),
  Syne gardée pour le logo seul ; une seule source de polices (Bunny)
- palettes : teinte propre à chaque axe dans les 4 ambiances ;
  pages d'axe en axis-scope, cartes sans bordure (canon design)
- accueil : console des trois curseurs (tablist clavier), boîte à outils,
  bloc format éditorial + événement + reproduction ; ?v=a|b|c|0
- numérique : carte LPK ; bouquet rendu avec statut et légende
- messages : sans bordure, deux colonnes en grand écran

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 10:15:46 +02:00
YvvandClaude Opus 5.5 c3ada04e52 contenus : LPK sert l'axe numérique, bouquet réaligné sur les stacks HCO/LPK
- site.yml : bloc lpk (La Plank, asso 1901, financement des communs numériques)
- home.yml : bloc format + une ligne d'engagement par axe
- cloud-libre.yml : bouquet en objets {rôle, logiciel, statut, lien} —
  en service / au catalogue / à venir ; OpenCloud, Twenty, ERPNext,
  Vaultwarden, Woodpecker, Kubo… ; aucune ligne d'origine perdue ;
  équivalents « Gestion & organisation » ajoutés
- evenement.yml : Nextcloud → OpenCloud dans l'axe numérique

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 10:15:46 +02:00
YvvandClaude Fable 5 38467bea10 build : packageManager épinglé + approbation des scripts de build en CI
ci/woodpecker/push/woodpecker Pipeline was successful
- le pnpm choisi par corepack dans l'image Docker ignorait l'allowlist
  pnpm.onlyBuiltDependencies de package.json (les pnpm 10 récents la
  lisent dans pnpm-workspace.yaml) → ERR_PNPM_IGNORED_BUILDS, exit 1
- packageManager: pnpm@10.29.3 (déterministe, identique au poste local)
- pnpm-workspace.yaml : onlyBuiltDependencies (@parcel/watcher,
  better-sqlite3, esbuild, sharp)
- vérifié : install à froid CI=true --frozen-lockfile exit 0, build zéro
  erreur, prod :3099 → 200

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 02:54:53 +02:00
YvvandClaude Fable 5 da2a8aed49 build : @yvv/nuxt-base en git+https + git dans l'étape build Docker
ci/woodpecker/push/woodpecker Pipeline failed
- la dép git+ssh échouait en CI : pas de clé SSH ni de binaire git dans
  l'étape build (ENOENT sur git clone) — seule la prod installait git
- package.json + pnpm-lock : git+https://git.open.us.org/… (#v0.1.0 →
  b1c6a2f, même commit épinglé) — nécessite le repo yvv-nuxt-base public
- git + ca-certificates ajoutés à l'étape build du Dockerfile
- vérifié : pnpm install + build zéro erreur, prod :3099 → 200

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 01:13:25 +02:00
YvvandClaude Opus 4.8 e64d4cf003 design(sceau): hexagramme 益 traits épais, coins nets, aspect carré
ci/woodpecker/push/woodpecker Pipeline failed
- viewBox 112×105, height 8, rx supprimé (rendu cut)
- géométrie calée sur les modèles IMAGES/PERVIER/Hexagrammes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 06:54:36 +02:00
aya 483d226c8b empty commit
ci/woodpecker/push/woodpecker Pipeline failed
2026-07-24 23:25:51 +02:00
YvvandClaude Opus 4.8 069d206e94 feat(deps): adopte @yvv/nuxt-base via dépendance git (extends relatif retiré)
ci/woodpecker/manual/woodpecker Pipeline was successful
extends: ['../yvv-nuxt-base'] -> ['@yvv/nuxt-base'] + dépendance
git+ssh://gitea@git.open.us.org/yvv/yvv-nuxt-base.git#v0.1.0.
Rend le projet autonome de l'arborescence locale (débloque Docker/CI).
Build pnpm vert, prod :3099 -> 200, smoke moods OK (vars --color-*
distinctes automne/hiver, classes mood-* appliquées).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 18:15:44 +02:00
YvvandClaude Fable 5 5ec6474b37 feat: adoption layer yvv-nuxt-base — palette.ts délègue à useMood
- extends ../yvv-nuxt-base dans nuxt.config.ts
- application DOM (vars --color-*, palette-light/dark, color-scheme) via useMood(vars) + lightDarkClasses
- storageKey 'palette' et défaut 'ete' conservés — zéro migration utilisateur
- couleurs et API du store inchangées (currentPalette, colors, setPalette, applyToDOM)
- vérifié Playwright : 4 palettes × desktop/mobile au reload + switch à chaud via PaletteSelector, zéro erreur console, prod :3099 → 200
- CONTRIBUTING.md : mécanique déléguée documentée + blocant distribution layer

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 15:14:38 +02:00
YvvandClaude Sonnet 4.6 98fab43fe5 feat: ajout cartouche Ğ1flux dans Productions collectives
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 01:23:49 +02:00
YvvandClaude Sonnet 4.6 a334c97434 fix: Umami externe sur stats.open.us.org — supprime docker-compose.umami.yml
ci/woodpecker/push/woodpecker Pipeline was successful
- host corrigé : stats.open.us.org (instance partagée, non self-hosted)
- docker-compose.umami.yml supprimé (obsolète)
- .env.example simplifié (plus de vars self-hosted)
- README + CONTRIBUTING mis à jour

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 04:02:27 +02:00
YvvandClaude Sonnet 4.6 84e843479d feat: intégration nuxt-umami + refonte logo SVG TheHeader
ci/woodpecker/push/woodpecker Pipeline was successful
- nuxt-umami@3.2.1 installé, module configuré (host + website ID)
- suppression injection script manuelle dans app.vue
- TheHeader : logo § repassé en tracé SVG unique avec dégradé primary→accent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 03:39:39 +02:00
YvvandClaude Sonnet 4.6 2f444ea7c7 fix: couverture BookPresentation — object-fit contain, largeur 100%
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 17:57:20 +02:00
YvvandClaude Sonnet 4.6 8408fd6466 feat: SEO complet + analytics Umami + og:image § logo
ci/woodpecker/push/woodpecker Pipeline was successful
SEO :
- composable useSeoPage() : og:*, Twitter Cards, canonical sur toutes les pages (15 pages)
- app.vue : JSON-LD Organization + Book, og:image global og-default.png
- og-default.png 1200×630 : logo § calligraphique + texte (Pillow)
- nuxt.config.ts : @nuxtjs/sitemap avec 26 URLs statiques

Analytics Umami :
- useTracking() : helpers typés audio/pdf/player/scroll/cta
- useScrollTracking() : scroll depth 25/50/75/100% + liens externes auto
- useAudioPlayer : trackAudioPlay/Progress/Complete
- BookPdfReader : trackPdfOpen/Close avec durée
- BookPlayer : trackPlayerOpen/Chapter/Mode
- docker-compose : variables NUXT_PUBLIC_UMAMI_* passées au container

Images :
- Couv-Economie-du-don.jpg ajoutée dans public/images/
- bookplayer.config.yml + home.yml : références mises à jour

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 00:25:28 +02:00
YvvandClaude Sonnet 4.6 dcf64cc924 fix: corrections lecteur PDF + couverture + navigation chapitres
ci/woodpecker/push/woodpecker Pipeline was successful
- PDF viewer : suppression animation/lock isAnimating, navigation stable
- PDF reader : focus iframe au chargement → flèches actives immédiatement
- BookSection : couverture via background-image (right center) — fiable
- AxisBlock : boutons secondaires NuxtLink/button explicites (v-if/v-else)
- modele-eco/[slug] : scroll top au changement de chapitre (SPA reuse)
- router.options.ts : scrollBehavior global top/instant
- PDF mis à jour (numéros de pages chapitres 7–11)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 05:12:37 +02:00
YvvandClaude Sonnet 4.6 f6339400fa seed messagerie : message d'embarquement persisté en git
ci/woodpecker/push/woodpecker Pipeline was successful
- site/messages.yml : seed officielle avec le message premier embarquement
- server/plugins/seed-messages.ts : init data/messages.yml au démarrage si absent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 00:33:06 +01:00
YvvandClaude Sonnet 4.6 8fd000a153 numerique/[slug] : bouton v1 bridée sur la page logiciel-libre
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:18:41 +01:00
YvvandClaude Sonnet 4.6 95f82e4fee Numérique : blocs cliquables + bouton v1 bridée logiciel libre
ci/woodpecker/push/woodpecker Pipeline was successful
- numerique/index : overlay z-index 1 sur pillar-card, zone actions z-index 2
  avec support pillar.actions (même pattern que citoyenne/index)
- home.yml + numerique.yml : bouton "Voir la v1 bridée (premier flux)"
  sur le bloc Logiciel libre → https://axiom-team.fr/dons
- economique/index : déjà des NuxtLink directs comme cartes, rien à corriger

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:01:53 +01:00
YvvandClaude Sonnet 4.6 a038851895 Home/citoyenne : blocs entièrement cliquables + SejeteralO dans tarifs eau
ci/woodpecker/push/woodpecker Pipeline was successful
- AxisBlock : overlay z-index 1 (au-dessus du contenu), actions z-index 2
  (boutons au-dessus de l'overlay) — fix blocage du clic sur tout le bloc
- citoyenne/index : même correction overlay/z-index ; suppression des
  NuxtLink "En savoir plus" devenus redondants (overlay gère la navigation)
- home.yml : ajout bouton "Ouvrir SejeteralO" sur le bloc Tarifs de l'eau

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 00:12:39 +01:00
YvvandClaude Sonnet 4.6 efed0b9033 Page événement : contenu structuré axes/espaces/config depuis PDF Genèse
ci/woodpecker/push/woodpecker Pipeline was successful
- evenement.yml : kicker, titre, subtitle, leitmotiv, tagline, gestation,
  description, 3 axes (numérique/économique/politique), 6 espaces, 4 config
- evenement.vue : hero complet (shadoks, logo SVG inline, badges), sections
  axes/espaces/config, styles scoped responsive
- bookplayer.config.yml → slugs 06-produire/07-echanger déjà commités
- Ajout Librodrome-Logo.png + librodrome-logo.svg (vectorisation en cours)
- Ajout PDF genèse en public/pdf/
- .gitignore, CLAUDE.md, BookSection, économique : ajustements session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 04:08:00 +01:00
YvvandClaude Sonnet 4.6 99a8b84164 Vouvoiement, libreDecision : bouton + URL
- Vouvoiement partout dans les pages numerique (cloud-libre, logiciel-libre, wot)
- Bouton "Ouvrir libreDecision" dans home AxisBlock (Décision collective)
  - AxisAction supporte href pour liens externes
  - URL prod : decision.librodrome.org
- Labels "Ouvrir libreDecision" (sans Ğ) dans citoyenne/index et [slug]
- app.config.ts : URL prod libredecision mise à jour

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 02:37:42 +01:00
YvvandClaude Sonnet 4.6 b9e6b4a96c Messages : types, réponses, sauts de ligne, data volume
ci/woodpecker/push/woodpecker Pipeline was successful
- HomeMessages : type pill (Réaction/Question/Suggestion/Retour) + sélecteur dans le formulaire (sans Réaction)
- HomeMessages : white-space: pre-line sur les messages
- Page /messages : type pill + white-space: pre-line (idem home)
- Admin : badge type coloré + sélecteur d'édition + formulaire réponse
- API : type et reply dans PUT ; readDataYaml/writeDataYaml (data/ volume Docker)
- main.css : overrides light mode text-white/55, /75, /90

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 05:56:11 +01:00
YvvandClaude Sonnet 4.6 c52fa6007d Page /messages : afficher les réponses publiées
ci/woodpecker/push/woodpecker Pipeline was successful
- Type badge + auteur + date comme sur la home
- Réponse avec liaison graphique (reply-thread/connector/block)
- Style adaptatif light/dark cohérent avec HomeMessages.vue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 05:41:24 +01:00
YvvandClaude Sonnet 4.6 d4ff840e13 bookplayer.config.yml : slugs 06-produire et 07-echanger
ci/woodpecker/push/woodpecker Pipeline was successful
- chapterSongs et chapterPages : 06-economie → 06-produire, 07-echange → 07-echanger
- Les liens "Lire dans le PDF" depuis les chapitres 6 et 7 s'ouvrent maintenant sur les bonnes pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 00:31:55 +01:00
YvvandClaude Sonnet 4.6 7691cc4139 Chapitres condensés, renommages, numéros de page
- 06-economie → 06-produire (titre "Produire"), 07-echange → 07-echanger
- Frontmatter : champ page: ajouté sur les 11 chapitres (p.9 à p.199)
- content.config.ts : page: z.number().optional() dans le schéma
- modele-eco/index.vue : numéro de page affiché sur chaque carte, hero réduit
- 11 chapitres condensés à ~moitié : voix de l'auteur conservée,
  répétitions et transitions secondaires supprimées, concepts clés préservés

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 00:28:09 +01:00
YvvandClaude Sonnet 4.6 088333e4d4 Monnaie libre : réécriture dans la voix du livre, liens forums, purge co-créer
ci/woodpecker/push/woodpecker Pipeline was successful
- monnaie-libre.yml : texte entièrement réécrit (cavalerie, double symétrie, DU,
  toile de confiance, mesure de gratitude) + 3 nouveaux liens (duniter.org,
  forum.duniter.org, forum.monnaie-libre.fr)
- Suppression de "co-créer/co-créée/co-création" dans tous les fichiers :
  economique.yml, home.yml, authentification-wot.yml, cloud-libre.yml,
  content/book/05-trm.md, content/book/11-annexes.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 22:51:28 +01:00
YvvandClaude Sonnet 4.6 07449de187 Pages détail numérique : sommaire flottant, nav ctx, shadoks geek, contenu enrichi
ci/woodpecker/push/woodpecker Pipeline was successful
- [slug].vue : sommaire sticky (overflow:clip sur parent), prev/next en haut, 6 shadoks geek (pinguin+USB, web-of-trust, rubber-duck, caféine, debugger loupe, rack serveur)
- Nouveaux types de sections : territoire (bouquet sweethomeCloud, 2 modèles éco, tableau matériel dépliable), projet (carte gestation)
- cloud-libre.yml : section sweethomeCloud complète avec infra 50 000 hab. (~2€/an/hab)
- authentification-wot.yml : trustWallet, correction WoT Duniter (Ed25519+Scrypt, sigQty=5, stepMax=3), DID/VC standards
- logiciel-libre.yml : carte projet wishBounty
- home.yml + numerique.yml : cloud-libre → sweethomeCloud, description RGPD/local-first
- AxisBlock.vue : bulles de présentation inline dans les cards (plus de tooltip absolu)
- Analytics : useTracking.ts (Umami), docker-compose.umami.yml, /api/stats fédération
- nuxt.config.ts : config Umami runtime

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 04:40:48 +01:00
YvvandClaude Opus 4.6 9d92c4a5b3 Fix typos blanches admin lightmode + hero audience
ci/woodpecker/push/woodpecker Pipeline was successful
- Remplace color:white → hsl(var(--color-text)) dans tous les composants admin
  (AdminFieldText, AdminFieldTextarea, AdminFormSection, AdminMarkdownEditor,
  AdminMediaBrowser, AdminSidebar, book/index, book/[slug], login, messages, site, songs)
- Conserve color:white uniquement sur fond primary (AdminSaveButton, login-btn)
- Hero home : ajout bloc audience/addressees (clé distincte pour éviter conflit YAML)
- home.yml : réordonne axes (citoyenne en premier — effet triangle)
- TypewriterText : affiche le second bloc avec séparateur fin

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 16:08:03 +01:00
YvvandClaude Opus 4.6 8f548afb17 Palette dynamique dans BookPlayer et admin
ci/woodpecker/push/woodpecker Pipeline was successful
- BookPlayer : toutes les couleurs HSL en dur remplacées par variables CSS palette
- Admin (sidebar, formulaires, pages, book, songs, messages, media, login) : idem
- L'ambiance graphique suit maintenant la palette active partout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 16:41:23 +01:00
YvvandClaude Opus 4.6 9caf11c8ab Restructuration sections, contenu administrable, shadoks, palette été
ci/woodpecker/push/woodpecker Pipeline was successful
- Structure par section : /numerique, /economique, /citoyenne (plus de /gestation)
- Chaque section a index + sous-pages avec contenu YAML administrable
- API content supporte les chemins imbriqués ([...path])
- Admin : liste des pages + éditeur par section
- Page /economique : monnaie libre (picto Ğ1), modèle éco, productions collectives, commande livre
- Page /citoyenne : decision (CTA Glibredecision), tarifs-eau (CTA SejeteralO)
- BookActions : composant partagé (player, PDF, chapitres, commande) sur home, eco et modele-eco
- GrateWizard remonté dans la section économique de la home
- Palette été par défaut, choix persisté en localStorage
- Fix lisibilité été (text-white/65 + variables CSS)
- Shadoks thématiques sur toutes les pages (8-10 par page, métiers variés)
- Redirections 301 : /gestation/*, /modele-eco/*, /decision, /lire/*
- README, CONTRIBUTING, CLAUDE.md mis à jour

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 16:13:46 +01:00
YvvandClaude Opus 4.6 c564e7be5f GrateWizard bloc dédié, messagerie libre, page numérique 3 piliers
ci/woodpecker/push/woodpecker Pipeline was successful
- GrateWizard : lancement URL simple (plus de popup embed), bloc
  dédié violet sur la home entre axes et événement
- Messagerie : plus de champs obligatoires, plus de champ email
  séparé, hint email dans le message, remerciement onboarding
- Page /numerique : 3 piliers (Logiciel libre, WoT, Cloud libre)
  avec projets associés, remplace les extraits livre hors-sujet
- Admin : carte Messages ajoutée au dashboard
- Safelist icônes complétée

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 03:06:48 +01:00
YvvandClaude Opus 4.6 3a5c40a886 Décision : picto gavel titre + parchemin docs, GrateWizard embed sans double scroll
ci/woodpecker/push/woodpecker Pipeline was successful
- Page décision : icône gavel pour le titre, scroll-text pour Documents de référence
- GrateWizard : ouverture en mode embed (?embed=true&hideTabBar=true) avec
  scrollbars=no pour supprimer le double scroll

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:48:52 +01:00
YvvandClaude Opus 4.6 fbc2867163 Refonte accueil : hero typo statique, axes icônes, menu italic, page numérique
- Hero : 5 lignes typographiques alternées (bold/light/accent/caps/italic),
  citations et axes dans un bloc discret dépliable
- Icônes axes : Ğ1 custom, balance (éco don), graphe (WoT), marteau (décision),
  pictos plus lumineux (glow)
- Menu : Autonomie en italique + grand, Événement majuscule
- Page /autonomie renommée /numerique avec redirect 301
- Sceau hexagramme 益 Yì dans le layout, BookSection dans /modele-eco
- Fonts Syne + Space Grotesk, dark theme éclairci
- Popup GrateWizard agrandie (480×860)
- Actions AxisBlock : primary côte à côte, secondary séparé dessous

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:34:30 +01:00
YvvandClaude Opus 4.6 082a17d09b Fix accueil : hero fade doux, icônes safelist, blocs cliquables, menu, dark fort
- Hero : réécriture composable timeout pur (plus de Transition callbacks)
  Animation fade opacity 1s très douce, lisible
- Icônes : safelist UnoCSS dans nuxt.config.ts (résout pastilles vides)
- Menu : mis à jour site.yml (Numérique/Économique/Citoyenne/Événement)
- Blocs : card entière cliquable, zone actions séparée (border-top)
- Économie du don : lié à /modele-eco (page chapitres préservée)
- Tarifs de l'eau : bouton SejeteralO (localhost:3009 / collectivites.librodrome.org)
- Dark theme fort : bg 220 12% 15%, surface 19%, surface-light 24%
- Config SejeteralO + Glibredecision dans app.config.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 04:08:47 +01:00
YvvandClaude Opus 4.6 97ba6dd04c Redesign accueil : grille 3 axes, hero fade/swipe, pages gestation et décision
- Hero : animation fade-in/fade-out + swipe (useTypewriter composable + TypewriterText)
- 3 axes : Autonomie numérique, économique, citoyenne (AxisBlock + AxisGrid)
- Pages gestation avec présentations (wishBounty, trustWallet, Cloud libre)
- Page /decision : plateforme Décision collective (lien Glibredecision)
- Bloc événement distinct en bas des axes
- Nav : Numérique / Économique / Citoyenne / Événement
- Dark theme éclairci (bg 7→10%, surface 12→14%)
- Suppression BookSection + GrateWizardTeaser (remplacés par AxisGrid)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 03:49:07 +01:00
YvvandClaude Opus 4.6 f0338cca5e Fix déroulant PDF en production : polyfills DOMMatrix + worker pdfjs
ci/woodpecker/push/woodpecker Pipeline was successful
pdfjs-dist en Node.js pur (hors Vite) nécessite :
- DOMMatrix, Path2D, ImageData polyfills (pas de DOM en Node)
- pdf.worker.mjs copié dans le build (traceInclude dans nitro config)
Testé : 61 entrées retournées en mode production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:24:59 +01:00
YvvandClaude Opus 4.6 c6b9abf2f3 Fix chemin PDF en production pour l'API pdf-outline
ci/woodpecker/push/woodpecker Pipeline was successful
En prod le PDF est dans .output/public/, pas dans public/.
Cherche dans les deux emplacements (dev et prod).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:55:14 +01:00
YvvandClaude Opus 4.6 df0409fec3 Fix déroulant sommaire PDF : onMounted au lieu de import.meta.client
ci/woodpecker/push/woodpecker Pipeline was successful
Le $fetch dans import.meta.client ne se ré-exécutait pas après hydratation SSR.
onMounted garantit l'exécution côté client après le montage du composant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:42:58 +01:00
YvvandClaude Opus 4.6 1af00cc64c Admin : déroulant sommaire PDF par chapitre, transitions pages, URL GrateWizard
ci/woodpecker/push/woodpecker Pipeline was successful
- Ajout API /api/admin/pdf-outline (extraction sommaire PDF côté serveur via pdfjs-dist)
- Déroulant <select> dans chaque ligne de chapitre admin avec les 61 titres/sous-titres du PDF
- Sauvegarde des associations chapitre→page PDF via config YAML
- Transition douce (fondu 1s/1.2s) pour le changement de pages dans le viewer PDF
- Correction des numéros de pages réels dans chapterPages (extraits du sommaire PDF)
- URL GrateWizard prod → gratewizard.axiom-team.fr

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:29:54 +01:00
YvvandClaude Opus 4.6 8a38c86794 Fix prod 404 : retrait volumes git sync qui cassent le conteneur
ci/woodpecker/push/woodpecker Pipeline was successful
Les volumes ../site, ../content, ../public montés dans docker-compose
écrasaient les fichiers du conteneur avec des chemins host inexistants.
Retour à la config d'origine. Le git sync sera configuré ultérieurement
quand le serveur aura un clone avec accès push.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:44:44 +01:00
YvvandClaude Opus 4.6 17f39e735d Fix build prod : postinstall tolérant + copy-pdfjs dans Dockerfile
ci/woodpecker/push/woodpecker Pipeline was successful
- postinstall : test -f avant d'appeler copy-pdfjs.sh (absent pendant pnpm install Docker)
- Dockerfile : RUN copy-pdfjs.sh après COPY . . pour copier les fichiers PDF.js
- Dockerfile : COPY content/ en production pour Nuxt Content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:26:05 +01:00
YvvandClaude Opus 4.6 7ea19e2247 Viewer PDF.js mode livre avec signets, fix hydratation SSR
ci/woodpecker/push/woodpecker Pipeline failed
- Viewer PDF.js mode livre : double page côte à côte, navigation prev/next visuelle et clavier
- Panneau signets (outline) avec tout déplier/replier, highlight du spread courant
- Page 1 = couverture seule, puis paires 2-3, 4-5, etc.
- Navigation clavier : flèches, espace, Home/End
- Redimensionnement auto des canvas au resize
- Fix hydratation SSR : bookData.init() sans await dans ChapterHeader et SongBadges
- BookPdfReader : iframe vers /pdfjs/viewer.html au lieu du viewer natif
- Script postinstall pour copier pdf.min.mjs depuis node_modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:16:47 +01:00
YvvandClaude Opus 4.6 9525ed3953 Bouton PDF par chapitre, badges morceaux améliorés, PDF configurable admin, git sync admin→prod
ci/woodpecker/push/woodpecker Pipeline was successful
- Bouton PDF blanc par chapitre avec numéro de page (ChapterHeader)
- Badges morceaux plus visibles (bordure, poids, hover) dans ChapterHeader et SongBadges
- PDF viewer : page cible + panneau signets ouverts par défaut (BookPdfReader)
- Config YAML : pdfFile dans book, chapterPages pour le mapping chapitre→page
- Admin book : section PDF du livre avec chemin éditable et sauvegarde
- Git sync automatique : chaque sauvegarde admin commit+push en prod (ADMIN_GIT_SYNC=true)
- Docker : git installé en prod, volumes pour .git/site/content/public

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:32:38 +01:00
YvvandClaude Opus 4.6 b02368a15b Fix build prod : Pinia CJS default import crash Node 22+
ci/woodpecker/push/woodpecker Pipeline was successful
Pinia résout vers pinia.prod.cjs en production, Rollup convertit
require('vue') en default import ESM invalide. Script post-build
remplace par un namespace import (* as).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 20:36:37 +01:00
aya 1f47533c77 Merge branch 'develop'
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-27 19:40:43 +01:00
aya 07bf07a942 update app src
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-27 18:38:41 +01:00
YvvandClaude Opus 4.6 e6c91fea7d Replie les paroles par défaut dans le player persistant
ci/woodpecker/push/woodpecker Pipeline was successful
Toggle discret pour les afficher au besoin (usage autonome).
Gain de place dans le panel déployé.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:11:32 +01:00
YvvandClaude Opus 4.6 25bfc07b59 Fix double-fire player, navigation par morceaux, admin labels morceaux
- BookPlayer : navigation par playlist (9 morceaux) au lieu de 11 chapitres
- stopPropagation clavier → plus de saut 1→3→5
- Sommaire aligné avec titres des morceaux
- Bouton back aligné avec clavier (toujours morceau précédent)
- Admin chapitres : tags morceaux cliquables avec étoile primary
- Admin liste chapitres : badges morceaux associés
- Éditeur markdown en vue split par défaut

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 14:08:58 +01:00
YvvandClaude Opus 4.6 8803087e77 Fix player : plus de saut de morceaux, mode scroll par défaut, supprime toggle paginé, media → sources
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:10:12 +01:00
YvvandClaude Opus 4.6 14d3a7b3e3 Logo § restauré, couleur unie partout, palettes printemps/été plus chaudes, rectifs admin
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 12:42:44 +01:00
YvvandClaude Opus 4.6 d8439cba0f 9 morceaux : Relativité supprimé, Créer une économie = #8, Coder la liberté = #9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 02:21:25 +01:00
YvvandClaude Opus 4.6 0308785de9 Supprime media/ du repo, gardé en local via .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 02:14:59 +01:00
YvvandClaude Opus 4.6 52c0af4c83 10 morceaux corrigés : titres, ordre, IDs et fichiers audio renommés
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 01:59:07 +01:00
YvvandClaude Opus 4.6 8d9feed760 Préfixe ED-## sur les fichiers audio et config à jour
Renomme les 9 morceaux avec préfixe album ED (Économie du Don) + numéro
d'ordre conforme aux sources dans media/musiques/. Met à jour les chemins
dans bookplayer.config.yml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:10:42 +01:00
YvvandClaude Opus 4.6 922afa2763 BookPlayer affiche les paroles du morceau, plus le contenu chapitre
Le BookPlayer chargeait les .md via Nuxt Content — qui contenaient avant
les paroles par erreur. Maintenant que les .md ont le vrai contenu du
livre, le BookPlayer doit afficher les lyrics depuis bookplayer.config.yml.

Supprime queryCollection('book') du BookPlayer, remplace ContentRenderer
par un rendu HTML des paroles avec tags stylisés.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:06:11 +01:00
YvvandClaude Opus 4.6 dd1d8baf4f Fix 404 chapitres : stem Nuxt Content inclut le dossier parent
Le `chapter.stem` de Nuxt Content renvoie `book/01-introduction` et non
`01-introduction`. Extraction du slug final via `.split('/').pop()` dans
les liens et la navigation prev/next.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:46:19 +01:00
YvvandClaude Opus 4.6 2f438d9d7a Refactoring complet : contenu livre, config unique, routes, admin et light mode
- Source unique : supprime app/data/librodrome.config.yml, renomme site/ en bookplayer.config.yml
- Morceaux : renommés avec slugs lisibles, fichiers audio renommés, inversion ch2↔ch3 corrigée
- Chapitres : 11 fichiers .md réécrits avec le vrai contenu du livre (synthèse fidèle du PDF)
- Routes : /lire → /modele-eco, /ecouter → /en-musique, redirections 301
- Admin chapitres : champs structurés (titre, description, temps lecture), compteur mots
- Éditeur markdown : mode split, plein écran, support Tab, meilleur rendu aperçu
- Admin morceaux : drag & drop, ajout/suppression, gestion playlist
- Light mode : palettes printemps/été plus saturées et contrastées, teintes primary
- Raccourcis clavier player : espace, flèches gauche/droite
- Paroles : toggle supprimé, toujours visibles et scrollables
- Nouvelles pages : autonomie, evenement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:20:52 +01:00
YvvandClaude Opus 4.6 4fce862df6 Affiche le mot de passe admin sous la saisie en mode dev
Endpoint /api/admin/auth/hint (dev-only, 404 en prod via import.meta.dev).
Le hint est aussi éliminé côté client au build grâce à import.meta.dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 f5cf98ce15 Ajout CLAUDE.md : conventions projet et ports dev
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 acf66513af Fix ports dev : librodrome→3000, grateWizard→3001
Évite les conflits de ports entre projets :
- nuxt.config.ts : devServer.port fixé à 3000
- app.config.ts : URL dev grateWizard corrigée 3009→3001

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 d412975a4c Fix light mode nav invisible, logo § calligraphié, typo ronde fine
- Navigation : btn-ghost, active-class, footer, nav mobile → CSS vars adaptatifs
- Overrides light mode renforcés avec !important (scoped styles compatibles)
- btn-primary garde text-white en light mode (fond coloré)
- Logo : symbole § calligraphié SVG inline remplace lucide-book-open
- Logo text : font-display weight 300 (ronde fine) + text-gradient
- Logo SVG aussi exporté en /public/images/logo-section.svg
- Header/footer : backgrounds et bordures via CSS vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 326ae0ca77 Shadoks visibles : opacités ×3, tailles augmentées, fonds moins noirs
- Opacités Shadoks : 0.1 → 0.25-0.35 (enfin visibles)
- Tailles SVG augmentées (clamp min/max relevés de 20-40%)
- Fix pumper hors écran (right: -15% → 3%)
- Footer pattern : opacités internes ×3
- Fonds palettes dark éclaircis (bg 4% → 7%, surface 9% → 12%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 ac4aff4985 Refonte UI complète : palettes saisonnières, typo moderne, paroles nettoyées, Shadoks
- Nettoyage paroles : suppression instructions Suno AI, corrections prononciation (11 fichiers)
- 4 palettes saisonnières (Automne/Hiver dark, Printemps/Été light) avec sélecteur
- Typographie modernisée : Outfit (display) + Inter (sans) remplacent Syne + Space Grotesk
- Styles adaptatifs : CSS vars pour couleurs, overrides light mode complets
- Mini-player : bouton Next ajouté, flèche expand plus visible
- BookPlayer : fix scroll mode paginé, croix de fermeture visible
- Illustrations Shadoks inline SVG dans 11 composants/pages
- Suppression soulignés navigation, reset boutons, bordures propres

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 6f422a7369 Fix affichage paroles : white-space pre-line + échappement crochets markdown
Le parseur markdown convertissait [Intro] en <span>Intro</span> (perte des
crochets) et les \n dans les nœuds texte étaient collapsés en espaces HTML.

- Échappe tous les crochets dans les 11 fichiers markdown (\[Intro\] etc.)
- Ajoute white-space: pre-line sur les paragraphes dans BookPlayer et
  ChapterContent pour que les sauts de ligne des paroles soient visibles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 b29fc77c60 Reordonner morceaux selon PDF, paroles dans les pages, sync player↔chapitres
- Reordonne les songs dans le config YAML selon l'ordre du PDF (01→09, 06 en dernier)
- Met à jour les titres avec les noms du PDF et la numérotation correcte
- Remplace le contenu des 11 pages markdown par les paroles des chansons associées
- Ajoute getChapterForSong() dans useBookData pour la recherche inverse
- Ajoute un watcher dans BookPlayer qui navigue au chapitre quand le morceau change
- Flag _skipSongWatch pour éviter les boucles infinies player↔navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 ac2b8040b1 Refonte mini-player flottant, nettoyage GrateWizard, corrections UI
- PlayerPersistent: widget compact pill + panneau extensible, aligné au contenu
- BookPlayer: ajustements scroll mode, suppression bordures boutons
- UnoCSS: ajout border-none au shortcut btn-ghost
- GrateWizard: suppression composants, services et utils obsolètes
- Ajout du PDF source des paroles (media/)
- Mises à jour config et dépendances

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 0e1e704319 Extraire les paroles des chansons du PDF et les intégrer au YAML
8 chansons sur 9 peuplées depuis media/Paroles Chansons.pdf.
chanson-06 (La croissance, une option ?) reste sans paroles (absente du PDF).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 3612cc17f8 Clean up BookPlayer UI: remove button borders, move close into top bar
Remove borders from all buttons (bar, nav) for a minimal ghost style,
remove the viewport border, relocate the close button from the overlay
corner into the reader bar, and tighten spacing around controls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 837b5394fe Add BookPlayer scroll reading mode and floating mini-player widget
Replace paginated-only reading with a toggle between paginated (CSS columns)
and continuous vertical scroll modes. Replace the full-width fixed footer
player bar with a compact floating pill in the bottom-right corner,
expandable to show full controls, visualizer, and playlist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 554602ad52 Pin Bloc 0 and Arrivant juste at top of relations list, sort others alphabetically
- Rename "Newbie" to "Arrivant juste"
- Base friends (Bloc 0, Arrivant juste) always stay at the top
- User-added relations are sorted below them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 2b5543791f Migrate grateWizard from React/Next.js to native Nuxt integration
- Port all React components to Vue 3 (GwTabs, GwMN, GwCRA, GwCRS,
  GwMap, GwRelations, GwPerimeterList)
- Port hooks to Vue composables (useCesiumProfiles, useSavedPerimeters)
- Copy pure TS services and utils (duniter/, ss58, gratewizard utils)
- Add Leaflet + Geoman + MarkerCluster dependencies
- Serve grateWizard as popup via /gratewizard?popup (layout: false)
  and info page on /gratewizard (with Librodrome layout)
- Remove public/gratewizard-app/ static Next.js export
- Refine UI: compact tabs, buttons, inputs, cards, perimeter list
- Use Ğ1 breve everywhere, French locale for all dates and amounts
- Rename roles: vendeur→offre / acheteur→reçoit le produit ou service
- Rename prix→évaluation in all visible text
- Add calculated result column in CRA and CRS relation tables
- DU/Ğ1 selector uses toggle switch (same as role toggle)
- Auto-scroll to monetary data card on polygon selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
YvvandClaude Opus 4.6 524c7a0fc2 Ouverture directe du BookPlayer en lecture, corrections éditoriales
- Suppression des phases intro (livre 3D) et cover (page intermédiaire)
  du BookPlayer : le reader s'ouvre directement depuis la home
- Corrections textuelles : about.md, app.config.ts, app.vue
- Mise à jour de GrateWizard app

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:05:43 +01:00
aya bf4b9e02f1 fix docker build
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-25 02:23:58 +01:00
aya de0480de5b deploy
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-25 01:09:01 +01:00
341 changed files with 17387 additions and 2945 deletions

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
.woodpecker.yml
docker
+6
View File
@@ -1,3 +1,9 @@
# Admin authentication # Admin authentication
NUXT_ADMIN_PASSWORD=changeme NUXT_ADMIN_PASSWORD=changeme
NUXT_ADMIN_SECRET=change-this-to-a-random-secret-at-least-32-chars NUXT_ADMIN_SECRET=change-this-to-a-random-secret-at-least-32-chars
# Umami analytics — hébergé sur stats.open.us.org
# NUXT_UMAMI_API_KEY : Settings → API Keys dans l'interface Umami (pour /api/stats)
NUXT_PUBLIC_UMAMI_URL=https://stats.open.us.org
NUXT_PUBLIC_UMAMI_WEBSITE_ID=95ff616d-9ce1-47d9-bca2-f6ddc344a99a
NUXT_UMAMI_API_KEY=
+10
View File
@@ -18,6 +18,16 @@ logs
.fleet .fleet
.idea .idea
# PDF.js (copié depuis node_modules par postinstall)
public/pdfjs/pdf.min.mjs
public/pdfjs/pdf.worker.min.mjs
# Sources originales (PDF, JPG — pas servies par l'appli)
sources/
# Runtime data (Docker volume — never committed)
data/
# Local env files # Local env files
.env .env
.env.* .env.*
+19
View File
@@ -0,0 +1,19 @@
steps:
- name: build
image: docker:dind
environment:
COMPOSE_PROJECT_NAME: ${CI_REPO_OWNER,,}-${CI_REPO_NAME,,}-${CI_COMMIT_BRANCH//\//-}
LETSENCRYPT_HOST: librodrome.org
SERVICE_3000_TAGS: urlprefix-librodrome.org:443/*
NUXT_PUBLIC_SITE_URL: https://librodrome.org
NUXT_ADMIN_PASSWORD:
from_secret: NUXT_ADMIN_PASSWORD
NUXT_ADMIN_SECRET:
from_secret: NUXT_ADMIN_SECRET
commands:
- docker compose -f docker/docker-compose.yml -f docker/docker-compose.fabio.yml up --build -d
volumes:
- ${DOCKER_SOCKET_LOCATION:-/var/run/docker.sock}:/var/run/docker.sock
when:
- branch: main
event: push
+210
View File
@@ -0,0 +1,210 @@
# Librodrome
Site vitrine du projet Le Librodrome — livre + chansons sur l'économie du don.
- **Rôle** : site éditorial en production sur `librodrome.org` et hub d'intégration
de l'écosystème (GrateWizard en popup ; liens libreDecision
`decision.librodrome.org`, SejeteralO, sweetHome/LaPlanK dans le YAML de `site/`).
Cap : plateforme éditoriale de bassin de vie (autonomie collective, économie
monnaie libriste, boîte à outils, événementiel).
- **Port** : 3000 (dev), 3099 (smoke du build). **Dépôt** : `origin` =
`gitea@git.open.us.org:EHV/librodrome.git` ; `main` = production.
## Protocole de début de session
1. `git pull --rebase origin main` (règle canon ; voir § Contenu administrable)
2. Vérifier que `data/messages.yml` existe — si absent, signaler avant toute opération
3. Si l'objectif de la session n'est pas précisé, le demander
## Stack
- Nuxt 4 (Vue 3, TypeScript, Nitro) + Nuxt Content, Pinia, UnoCSS, VueUse, Nuxt Image
- Layer `@yvv/nuxt-base` (`extends` dans `nuxt.config.ts`, dépendance `git+https` épinglée `#v0.1.0`)
- Icônes : Lucide + Phosphor (via @iconify-json) ; pnpm épinglé 10.29.3 (`packageManager`)
- Audience : Umami (`nuxt-umami`)
- Déploiement : Woodpecker (`.woodpecker.yml`) — push sur `main` →
`docker compose -f docker/docker-compose.yml -f docker/docker-compose.fabio.yml up --build -d`,
**sans étape de test**. Secrets CI : `NUXT_ADMIN_PASSWORD`, `NUXT_ADMIN_SECRET`.
Healthcheck de l'image : `/api/health`.
## Structure
```
app/
pages/
numerique/ # index + [slug]
economique/ # index, monnaie-libre, commande, productions-collectives
modele-eco/ # sommaire + chapitres [slug]
citoyenne/ # index + [slug]
en-musique/ # player audio
admin/ # back-office (pages/, book/, songs, messages, media)
components/
book/Actions.vue # boutons partagés (player, PDF, chapitres, commande)
home/ # BookSection, AxisBlock, AxisGrid, HeroSection, HomeMessages
admin/, player/, song/, ui/
composables/ # useAudioPlayer, useBookData, useGrateWizard, usePageContent
stores/palette.ts # 4 palettes saisonnières (été par défaut, persisté localStorage)
assets/css/main.css # UnoCSS + overrides light mode
site/
pages/ # Contenu YAML administrable par section (sous-dossiers)
site.yml # Config globale (nav, footer, GrateWizard)
bookplayer.config.yml # Config player/chapitres
data/
messages.yml # Runtime — prod : volume nommé librodrome-data sur /app/data — JAMAIS dans git
server/
api/content/ # GET pages YAML (chemins imbriqués)
api/admin/content/ # PUT pages YAML + liste
api/messages/ # GET (publiés) + POST (nouveau message)
api/admin/messages/ # GET tous + PUT (type, reply, published) + DELETE
utils/content.ts # readDataYaml/writeDataYaml (data/) + readYaml/writeYaml (site/)
middleware/redirects.ts # 301 : /gestation, /modele-eco, /decision, /lire
docker/
Dockerfile, docker-compose.yml, docker-compose.dev.yml
```
## Données runtime (CRITIQUE)
- `data/messages.yml` : en prod, volume nommé `librodrome-data` (`external: true`) monté
sur `/app/data` (l'image tourne dans `/app`, le serveur lit `process.cwd()/data`).
Créé et semé à la main sur sonic par l'acte `actes/2026-10-26-persistance-messages.md` ;
un déploiement sans ce volume échoue au lieu de repartir de la graine.
- Persisté entre les rebuilds depuis le 26/10/2026 — **jamais écrasé par les commits ni
par le déploiement** (avant, il ne l'a jamais été : voir le dossier d'acte)
- Structure message : `{ id, author, email, text, type, published, createdAt, reply: { text, publishedAt } | null }`
- Types : `reaction` (ancien, affiché "Réaction", plus proposé dans les formulaires) | `question` | `suggestion` | `retour`
- En dev local : `<racine>/data/messages.yml`
- Graine : `site/messages.yml` (versionné) copié par `server/plugins/seed-messages.ts`
si `data/messages.yml` est absent
- ⚠ Hors volume, rien ne persiste : éditions /admin de `site/` et `content/`, médias
envoyés par /admin (`/app/public`, jamais servis). Décisions d'Yvv en attente (HANDOFF).
- **Avant toute migration de chemin ou écriture sur data/ : demander confirmation**
## Intégration GrateWizard
- URL dev : `app/app.config.ts` → `localhost:3001`
- URL prod : `https://gratewizard.axiom-team.fr`
## Contenu administrable
- YAML dans `site/pages/` par section ; API supporte les chemins imbriqués
- Admin : `/admin/pages` liste, `/admin/pages/{path}` édite en YAML
- Git sync (`server/utils/gitSync.ts`, actif si `ADMIN_GIT_SYNC=true`) : commit
`[admin] …` puis push depuis le conteneur → `git pull --rebase` obligatoire en début de session
- ⚠ Constat du 26/10/2026 : la CI ne fixe pas `ADMIN_GIT_SYNC` (défaut `false` dans le
compose), l'image de prod n'embarque pas `.git`, et l'historique ne contient aucun
commit `[admin]`. Les éditions /admin en prod ne reviennent donc pas dans git
(voir HANDOFF).
## Commandes
```bash
pnpm dev # Dev server :3000
pnpm build # Build production
PORT=3099 node .output/server/index.mjs # Test build prod (toujours avant commit)
```
## Vérifier
Niveaux V0 à V4 : gabarit `harness/skills/boucles/_gabarit.md`. Seuls V0 et V3 existent :
aucun test automatisé, ni lint ni typecheck (aucun script, pas de `vue-tsc`).
**V0 — build + smoke** (vert le 26/10/2026, build ≈ 1 min)
```bash
date; pnpm build # exit 0
NUXT_ADMIN_PASSWORD=jetable NUXT_ADMIN_SECRET=jetable PORT=3099 node .output/server/index.mjs &
sleep 3; for p in / /api/health /api/admin/messages; do
curl -s -o /dev/null -w "$p %{http_code}\n" http://127.0.0.1:3099$p; done # 200, 200, 401
kill $(lsof -ti :3099)
```
Lancé depuis la racine, le serveur lit et écrit le vrai `data/` : aucun POST pendant le
smoke. Le build ne lit pas `.env` : sans `NUXT_ADMIN_SECRET`, l'API admin répond 503.
**V1 — invariants (à construire)** : vitest sur les API messages (POST/GET/DELETE),
admin content (PUT YAML → fichier écrit, format préservé), auth (mauvais mot de passe →
401). `data/` et `site/` se résolvent depuis `process.cwd()` : lancer depuis un dossier jetable.
**V2 — parcours (à construire)** : Playwright, chromium bundlé (HANDOFF, Pièges), mobile +
desktop, ambiances claire et sombre : accueil sans erreur console, les 3 axes, lecteur PDF,
player, formulaire message (data jetable), login admin. Captures dans `/tmp/librodrome-shots/`.
**V3 — données**
```bash
sha256sum data/messages.yml # avant et après le run : identiques
git status --short # rien sous data/ ni .env
git log --oneline origin/main..HEAD # ce que le prochain push mettrait en ligne
```
**V4** : rapport avec sorties réelles et captures ; tout niveau sauté est annoncé.
**Trous** : la CI déploie sans gate (un commit cassé part en prod) ; V1 et V2 inexistants.
Prochaines briques : gate build + tests dans `.woodpecker.yml` avant le `up`, puis V1 et V2
exposés en `pnpm verify`.
**Gates humains (anneau 1)** : push de `main` (= mise en ligne) ; suppressions admin
(`server/api/admin/messages/[id].delete.ts`, `media/[...path].delete.ts`,
`chapters/[slug].delete.ts`) ; toute écriture sous `site/` ou `content/book/` (contenu de
prod) ; `data/messages.yml` ; lien de commande du livre (Bookelis,
`site/pages/economique/commande.yml`, aucun paiement sur le site) ; auth admin
(`server/middleware/admin-auth.ts`) et secrets `NUXT_ADMIN_*`.
## Conventions
- **Consignes d'Yvv**, datées et mot pour mot : `docs/consignes-yvv.md`. Les relire avant de
toucher au design ; y inscrire toute nouvelle consigne le jour où elle est donnée.
- CSS via UnoCSS + variables CSS palettes ; composants Vue SFC `<script setup lang="ts">`
- Oiseaux du kit du studio DA (depuis le 03/11/2026, à la place des shadoks) : `UiOiseau`,
`app/utils/oiseaux.ts` (copiés tels quels du kit), posés par `UiOiseauPose` près du contenu
de leur métier, jamais en rangée. Règles du kit : currentColor, au moins 72 px, opacité
0,18–0,28 près du texte et 0,10–0,14 derrière une carte, un oiseau jamais deux fois sur une
page, un seul sous 768 px, pas de miroir pour calligraphe et typographe. Consignes :
`docs/consignes-yvv.md` § Les oiseaux.
- Hexagramme 益 (#42 Yi, Augmentation) dans `layouts/default.vue`
- Logotype validé du studio DA (`UiLogotype`) dans `TheHeader.vue`, et `UiSectionSign` du
kit — ne pas modifier sans demander. Source du kit :
`/home/yvv/Documents/PROD/IMAGES/_atelier/2026-10-27-librodrome-logo/livrables/kit-site/`.
## SEO & Recherche IA — Checklist permanente
### À chaque nouvelle page Vue
1. **Appeler `useSeoPage()`** — jamais `useHead({ title })` seul
```ts
useSeoPage({
title: 'Titre page — Le Librodrome', // 50–60 chars
description: 'Description...', // 120–155 chars
image: '/images/og-specifique.jpg', // optionnel, sinon og-default.png (logo §)
type: 'website' | 'article' | 'book', // défaut: website
})
```
2. **og:image** : utiliser la couverture `/images/Couv-Economie-du-don.jpg` pour les pages livre/musique ; `og-default.png` (logo §) pour les pages site générales
3. **type: 'article'** pour les chapitres du modele-eco ; **type: 'book'** pour les index livre
### À chaque nouveau fichier YAML dans `site/pages/`
Ajouter le bloc `seo:` en tête :
```yaml
seo:
title: "Titre SEO — 50-60 chars max"
description: "Description 120-155 chars, avec mots-clés naturels"
# image: /images/og-specifique.jpg # optionnel
# keywords: [monnaie libre, TRM, économie du don]
```
### Règles description SEO
- Commence par un verbe d'action ou une affirmation forte
- Contient les mots-clés : économie du don, monnaie libre, TRM, June, bassin de vie, autonomie
- 120–155 caractères (ni trop court, ni tronqué)
- Différente du titre et du H1
### JSON-LD automatique
- JSON-LD `Organization` + `Book` : injecté globalement dans `app.vue` — ne pas redupliquer
- Chapitres → og:type `article` via `useSeoPage({ type: 'article' })`
- Sitemap : géré par `@nuxtjs/sitemap` — ajouter manuellement les nouvelles routes statiques dans `nuxt.config.ts > sitemap.urls`
### Analytics — Nouveaux composants
- Tout bouton CTA externe : `trackCta(label, url)` depuis `useTracking()`
- Tout `<a target="_blank">` : capturé automatiquement par `useScrollTracking()` dans `default.vue`
- Tout nouveau lecteur média : appeler `trackAudioPlay` / `trackPdfOpen` depuis `useTracking()`
+101
View File
@@ -0,0 +1,101 @@
# Contributing — Le Librodrome
## Architecture
```
app/
pages/
numerique/ # Section autonomie numérique
index.vue # Vue d'ensemble (3 piliers)
[slug].vue # Détail pilier (contenu YAML)
economique/ # Section autonomie économique
index.vue # Vue d'ensemble (monnaie libre, livre, productions)
monnaie-libre.vue
commande.vue # Commande du livre (Bookelis + librairie)
productions-collectives.vue
modele-eco/
index.vue # Couverture livre + sommaire chapitres
[slug].vue # Lecteur de chapitre (Nuxt Content)
citoyenne/ # Section autonomie citoyenne
index.vue # Vue d'ensemble (decision, tarifs-eau)
[slug].vue # Détail (contenu YAML)
en-musique/ # Player audio
evenement.vue
admin/ # Back-office protégé
pages/
index.vue # Liste toutes les pages YAML
[...path].vue # Éditeur YAML (supporte les sous-dossiers)
components/
book/Actions.vue # Boutons partagés du livre (player, PDF, chapitres, commande)
home/BookSection.vue # Bloc couverture + CTAs (utilise BookActions)
home/AxisBlock.vue # Bloc axe sur la home (supporte actions lien via `to`)
home/AxisGrid.vue # Grille 3 axes + GrateWizard
stores/palette.ts # 4 palettes saisonnières (été par défaut)
```
## Contenu YAML
API : `GET /api/content/pages/{path}` — supporte les chemins imbriqués (`numerique/logiciel-libre`).
Admin : `PUT /api/admin/content/pages/{path}` + `GET /api/admin/content/pages` (liste).
Les fichiers YAML sont dans `site/pages/`, organisés en sous-dossiers par section.
## Palettes
4 palettes dans `stores/palette.ts` : automne, hiver, printemps, été.
- Défaut : **été** (premier visiteur)
- Persisté en `localStorage('palette')` pour les visites suivantes
- CSS : variables `--color-primary`, `--color-accent`, etc. + classe `.palette-light`/`.palette-dark`
- Mécanique DOM (injection des variables, classes `mood-*`/`palette-*`, `color-scheme`, persistance) déléguée à `useMood` du layer `../yvv-nuxt-base` (`extends` dans `nuxt.config.ts`) — les couleurs restent définies ici. ⚠️ le layer est hors du repo : build Docker/CI cassera tant que la stratégie de distribution n'est pas tranchée (voir README du layer)
- Overrides light mode dans `main.css` (`.palette-light .text-white` → couleur adaptive)
- Admin : tous les `color: white` dans les composants admin sont remplacés par `hsl(var(--color-text))` sauf les boutons sur fond `hsl(var(--color-primary))` (`AdminSaveButton`, `.login-btn`)
## Navigation contextuelle — pages détail
`[slug].vue` (numérique, citoyenne) embarque :
- **Prev/next** (`ctx-nav`) en haut de page — liens vers les pages adjacentes dans la section
- **Sommaire flottant** (`.sommaire-sidebar`, `position: sticky`) dans un aside absolu à droite — visible ≥ 1300px, `overflow: clip` sur le parent pour ne pas casser le sticky
Les ancres sont des `<div :id="\`s${si}\`" class="section-anchor">` avec `scroll-margin-top: 5.5rem` (offset header fixe).
## Types de sections YAML
`[slug].vue` supporte : `arguments`, `fiche`, `equivalents`, `llm`, `atelier`, `links`, `insight`, `tiers`, `projet`, `territoire`.
`type: territoire` : économies alternatives (euro/Ğ1), grille bouquet de services, tableau matériel dépliable (`<details>`).
`type: projet` : carte gestation avec grille de features.
## Shadoks
Illustrations SVG inline sur chaque page, thématiques par section :
- Numérique index : métiers tech/industrie (codeuse, électricien, soudeuse, cryptographe...)
- Numérique détail : postures geek (pinguin+USB, web-of-trust, rubber duck, caféine, rack serveur, debugger loupe)
- Économique : artisanat/agriculture (boulangère, potier, forgeron...)
- Citoyenne : navigation/justice/théâtre (capitaine, avocate, comédien...)
- Modèle éco : livre/édition (typographe, calligraphe, conteuse...)
- Événement : spectacle (funambule, accordéoniste, jongleur...)
Règles : corps compact, longues pattes, grands pieds plats, bec pointu, postures variées.
CSS : `position: absolute`, `pointer-events: none`, `opacity 0.18-0.28`, animation float, `display: none` sur mobile.
Parent avec `overflow: clip` (pas `overflow: hidden` qui casserait `position: sticky`).
## Analytics
`app/composables/useTracking.ts` — wrapper Umami. Module `nuxt-umami` configuré dans `nuxt.config.ts` (host : `stats.open.us.org`).
`server/api/stats/index.get.ts` — endpoint public stats (nécessite `NUXT_UMAMI_API_KEY`).
## Redirections
`server/middleware/redirects.ts` :
- `/gestation/*` → section appropriée
- `/modele-eco/*` → `/economique/modele-eco/*`
- `/decision` → `/citoyenne/decision`
- `/lire/*` → `/economique/modele-eco/*`
- `/ecouter/*` → `/en-musique/*`
## Conventions
- Commits en français, concis
- Build prod vérifié avant push (`PORT=3099 node .output/server/index.mjs`)
- Port dev : 3000 (fixe, jamais de fallback)
+70
View File
@@ -0,0 +1,70 @@
# HANDOFF — librodrome
## ÉTAT — 2026-10-26 vers 19h50
**En ligne** : `4057f50` (code de `a6ba0a6`), les messages des visiteurs sont persistés dans le volume
nommé `librodrome-data` sur `/app/data`. Acte exécuté le 26/10, 19h38-19h44, par la
session dev-65 (orch), et vérifié : sauvegarde, veille, bascule, redémarrage à froid,
1 message conservé, 0 graine rejouée. Dossier : `actes/2026-10-26-persistance-messages.md`.
**Restent à Yvv** (dossier, § Hors champ) :
1. Éditions /admin (`site/`, `content/`), toujours perdues à chaque déploiement :
/admin en lecture seule, git sync rétabli, ou volumes (déconseillé).
2. Médias /admin : écrits dans `/app/public`, jamais servis.
3. Sauvegarde de sonic `~/librodrome-sauvegardes/2026-10-26/` (vraies données de
visiteurs) : la garder, ou la supprimer après un déploiement suivant réussi (« supprime »).
4. Canon démenti : `/DEV/AGENTS.md` (Démarrage §3) et `harness/conventions/git.md`
disent encore que librodrome écrit du YAML en prod via /admin et git sync.
**Preuve en vraie grandeur, faite** : déploiement suivant (`4057f50`, doc seule, pipeline
n° 59, sur le « Déploie » d'Yvv) : conteneur recréé, `messages.yml` inchangé
(`c8afc7de…a6b8`), 0 graine rejouée.
**Local, non poussé** : le commit qui consigne cette preuve (doc seule) ; il part avec
le prochain déploiement.
## REPRISE — bascule quota 2026-09-29 14h05
**Fait, en production** (librodrome.org, déployé et vérifié ; armé par Yvv) :
- `67cd869` : refonte. Accueil = console des trois curseurs, seul accueil
(`app/components/home/HomeLanding.vue`, `HomeConsole.vue`,
`useHomeData.ts`) ; § Playfair (`UiSectionSign`) ; statuts
(`UiStatusBadge`) ; LaPlanK, sweetHome, bouquet aligné sur les stacks
HCO/LaPlanK ; correctifs du lecteur (pastille, MP3 direct).
- `90f77da` : image OG et favicon avec le §, logo JSON-LD corrigé.
- `1c7cc45`, `852a488` et `23b1767` (doc) sont partis avec `a6ba0a6` le 26/10.
Dossiers : `actes/2026-09-29-*.md`.
**Prochaine action** : aucune en cours. Attendre les retours d'Yvv sur la prod.
**Décisions en attente d'Yvv** :
- Qui opère cloud.laplank.org : `vision.md` dit LaPlanK, la fiche sweetHome
dit warren. Le site suit Yvv (LaPlanK).
- Twenty, ERPNext et budgetPilot sont affichés « en service » dans le bouquet
public alors qu'ils servent HCO en interne. Les garder ou passer « au catalogue » ?
- Ambiance par défaut « été » (crème + terre cuite) : proposer une autre ?
- Lien « Mentions légales » du pied de page → page inexistante (défaut antérieur).
- Persistance de la prod (constat du 26/10/2026, d'après les fichiers ; non
vérifié sur le serveur) : voir `CLAUDE.md`, § Données runtime et § Contenu
administrable. Si l'effet se confirme, chaque déploiement repart d'un conteneur
neuf : messages visiteurs re-semés depuis `site/messages.yml`, éditions /admin
perdues. Rétablir les montages (`/app/...`) et décider du sort du git sync
touche aux données de prod : à trancher par Yvv avant le prochain déploiement.
→ **26/10/2026, vérifié sur sonic : confirmé**, puis corrigé et mis en ligne le même
jour (voir ÉTAT ci-dessus).
**Ce qui tourne** : rien (serveur de dev sur 3000 arrêté).
**Pièges** :
- Pousser `main` = mise en ligne sans test → mot « déploie », dossier dans `actes/`.
- `git pull --rebase` avant toute modification (le YAML de prod est édité via /admin).
- Serveur de dev : après des suppressions ou renommages de composants, le SSR
reste périmé (faux mismatch d'hydratation) → relancer `pnpm dev`.
- Chromium de Playwright MCP absent : utiliser le chromium bundlé
`~/.cache/ms-playwright/chromium-1208` + playwright-core
(`/tmp/bp-design/node_modules`). Scripts jetables dans `/tmp/lbshot/`.
- Le BookPlayer ferme sur Échap après une animation de sortie de 0,35 s :
attendre avant d'asserter.
- Statuts : champ YAML `status` (+ `since`), qui prime sur `gestation: true`.
- Libellés de la console dans `home.yml > console` ; titre de la boîte à
outils dans `home.yml > toolbox`.
+60 -63
View File
@@ -1,75 +1,72 @@
# Nuxt Minimal Starter # Le Librodrome
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. Site vitrine du projet Le Librodrome — livre + chansons sur l'économie du don.
## Setup ## Navigation
Make sure to install dependencies: Le site est organisé en 3 grandes sections :
| Section | Route | Contenu |
|---------|-------|---------|
| **Numérique** | `/numerique` | Autonomie numérique : logiciel libre, authentification WoT, cloud libre |
| **Économique** | `/economique` | Création monétaire, monnaie libre, modèle économique (livre + chapitres), productions collectives |
| **Citoyenne** | `/citoyenne` | Décision collective (Glibredecision), tarifs de l'eau (SejeteralO) |
Autres pages : `/en-musique` (player audio), `/evenement`, `/a-propos`, `/messages`.
Chaque section a une page index et des sous-pages de détail (`/numerique/logiciel-libre`, `/economique/modele-eco`, etc.).
## Le livre
- **Lire** : lecteur PDF intégré, chapitres Markdown sous `/economique/modele-eco/[slug]`
- **Écouter** : player audio avec 9 morceaux sous `/en-musique`
- **Commander** : page `/economique/commande` (Bookelis + librairie)
## Stack
- **Nuxt 4** (Vue 3, TypeScript, Nitro)
- **UnoCSS** (utility-first) + palettes saisonnières (été par défaut)
- **Nuxt Content** pour les chapitres du livre
- **Pinia** pour l'état (palette, player)
- **pnpm** comme package manager
## Contenu administrable
Le contenu des pages est dans `site/pages/` en YAML, organisé par section :
```
site/pages/
home.yml # Page d'accueil
numerique.yml # Index numérique
numerique/*.yml # Sous-pages
economique.yml # Index économique
economique/*.yml # Sous-pages (modele-eco, monnaie-libre, commande...)
citoyenne.yml # Index citoyenne
citoyenne/*.yml # Sous-pages (decision, tarifs-eau)
en-musique.yml, evenement.yml, gratewizard.yml
```
Administration via `/admin/pages` (éditeur YAML, authentifié).
Le hero de la home (`home.yml`) supporte deux blocs dépliables :
- `approach` + `axes` : approche par dimension (numérique → code source, etc.)
- `audience` + `addressees` : à qui s'adresse le projet (collectifs, entreprises, collectivités)
## Développement
```bash ```bash
# npm
npm install
# pnpm
pnpm install pnpm install
pnpm dev # Dev server sur :3000
# yarn pnpm build # Build production
yarn install
# bun
bun install
``` ```
## Development Server Port réservé : **3000** (ne pas changer).
Start the development server on `http://localhost:3000`: ## Analytics
```bash Umami hébergé sur `stats.open.us.org`. Module `nuxt-umami` configuré dans `nuxt.config.ts`.
# npm Stats publiques exposées via `/api/stats` (nécessite `NUXT_UMAMI_API_KEY`).
npm run dev
# pnpm ## Déploiement
pnpm dev
# yarn Docker + Traefik, CI via Woodpecker. Domaine : `librodrome.org`.
yarn dev
# bun
bun run dev
```
## Production
Build the application for production:
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
```
Locally preview production build:
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
+32
View File
@@ -0,0 +1,32 @@
# Acte — mise en ligne de l'image de partage et du favicon au vrai §
Classe : déploie (push de main = mise en ligne de librodrome.org)
Projet : librodrome Date : 2026-09-29
Armé le 2026-09-29 par Yvv : « Déploie. […] Vérifie juste l'og. »
## Intention
Remplacer le § « spaghetti » partout où il restait : image OG, favicon,
fichiers orphelins ; corriger l'URL du logo JSON-LD (404).
## Commandes exactes
```bash
git push origin 90f77da49b1c77faf9807ba48740b0abd22aff46:main
```
## Contenu sortant
Commit og (app/app.vue, useSeoPage.ts, public/og-default.png, favicon.ico,
3 fichiers retirés de public/images), le dossier de l'acte précédent (clos)
et ce dossier. Scan data/ .env .db clés : vide.
## Effet attendu
Aperçus de partage et onglet avec le nouveau §. Réversible (git revert).
## Rollback
```bash
git revert --no-edit HEAD~1 && git push origin HEAD:main
```
## Vérifications post-acte
**Exécuté le 2026-09-29** : `67cd869..90f77da -> main`, prod à jour en ~160 s.
- [x] og:image en prod = `https://librodrome.org/og-default.png?v=2` ; JSON-LD logo idem ; fichier servi 200, identique octet pour octet au local
- [x] favicon.ico (identique) et favicon.svg servis 200
@@ -0,0 +1,37 @@
# Acte — mise en ligne de la refonte (accueil console, contenus LaPlanK/sweetHome)
Classe : déploie (le push de main déploie librodrome.org, sans étape de test)
Projet : librodrome Date : 2026-09-29
Armé le 2026-09-29 par Yvv : « Tu déploies directement stp. […] Déploie »
## Intention
Mettre en ligne la refonte : accueil « console des curseurs », vrai §, statuts
de production, bouquet sweetHome aligné sur les stacks réelles, LaPlanK,
correctifs lecteur (pastille, MP3 direct) et couverture du livre.
## Commandes exactes
```bash
git push origin 67cd869d833bcb7924c6458f4d4b1928bb59e62a:main
```
## Contenu sortant
5 commits (c3ada04, e9fce4b, 4d8fe48, 201cfbb + ce dossier) : app/, site/
(YAML de contenu), nuxt.config.ts, uno.config.ts, public/favicon.svg.
Scan `data/ .env .db .enc clés IDENTIFIANTS` sur `git diff origin/main..HEAD` : **vide**.
`git pull --rebase origin main` juste avant : à jour (aucune édition admin
en prod à intégrer).
## Effet attendu
librodrome.org reconstruit par Woodpecker. Irréversibilité : réversible.
## Rollback
```bash
git revert --no-edit c3ada04^..HEAD && git push origin HEAD:main
```
(ou redéployer 38467be)
## Vérifications post-acte
**Exécuté le 2026-09-29** : `38467be..67cd869 -> main`.
- [x] Nouveau bundle servi ~60 s après le push (`entry.CIXHEUkt` → `entry.D1w8lqIL`)
- [x] 17 pages × 2 ambiances (été, hiver) en prod : 0 erreur console, 0 hydratation, 0 débordement ; captures accueil desktop + mobile conformes
- [x] BookPlayer en prod : lecture MP3 (200), suivant, sommaire, fermeture, Échap ; PDF 200 ; /api/messages 200
+281
View File
@@ -0,0 +1,281 @@
# Acte — persistance des messages de librodrome.org (volume nommé sur /app/data)
Classe : déploie (un volume créé et semé sur sonic, puis le push de `main`, qui met en ligne sans étape de test)
Projet : librodrome Date : 2026-10-26
**État : EXÉCUTÉ** le 26/10/2026, 19h38-19h44, par la session dev-65 (orch, sous
mandat de rôle, relecture indépendante inscrite) ; préparé vers 18h par la session de
diagnostic. Section d'exécution en fin de dossier.
## Constat (diagnostic du 26/10/2026, en lecture seule)
| Fait | Preuve (26/10/2026, sauf date indiquée) |
|---|---|
| La prod tourne sur sonic | `getent ahostsv4 librodrome.org` → 161.97.174.60 (sonic, `harness/conventions/infra.md`) |
| Un seul conteneur : `lpk-librodrome-main-app-1`, image `lpk-librodrome-main-app` (`sha256:8fe50a5b7c65…`), créé le 2026-09-29T06:59:03Z | `docker ps -a`, `docker inspect` |
| Répertoire de travail `/app` ; le serveur lit et écrit `process.cwd()/data`, donc `/app/data` | `docker inspect` (`WorkingDir=/app`) ; `server/utils/content.ts`, `server/plugins/seed-messages.ts` |
| Montages : deux binds seulement, `…/LPK/librodrome/data → /src/data` et `…/LPK/librodrome/docker/public → /src/public`, aucun volume nommé | `docker inspect` (`.Mounts`, `.HostConfig.Binds`) |
| Les sources de ces binds sont des dossiers vides de root sous `/woodpecker/src/git.open.us.org/LPK/librodrome/`, créés par le démon le 2026-08-12 à 00h58m36Z, la seconde où s'est terminé le pipeline #55. L'ancien chemin `EHV/librodrome/` est vide lui aussi (créé le 23/03 à 03h10m44Z, fin du #36 à 03h10m45Z). | `ls -la --time-style=full-iso`, `find` sur sonic ; API CI. Mécanisme : la CI lance compose depuis son espace de travail, et un chemin relatif y désigne un chemin de l'hôte qui n'existe pas (déjà noté en 8a38c86, 28/02). |
| `/app/data/messages.yml` vit dans la couche du conteneur, et non dans un montage : 1099 octets, daté du 2026-09-29T06:59:05Z, sha256 `c8afc7de…a6b8`, identique à la graine `site/messages.yml`, avec 1 message (celui d'Yvv) | `docker exec … sha256sum`, `stat`, `grep -c` ; `docker diff` → `A /app/data/messages.yml` |
| Graine rejouée au premier démarrage du conteneur actuel | `docker logs` : `2026-09-29T06:59:05Z [seed-messages] data/messages.yml initialisé depuis site/messages.yml`, une seule fois. Les redémarrages des 12/10 et 18/10 (×4) ne l'ont pas rejouée : un redémarrage garde la couche, une recréation (un déploiement) la détruit. |
| Aucune édition /admin dans le conteneur actuel | `docker diff` : rien sous `/app/site` ni `/app/content` |
| `ADMIN_GIT_SYNC=false`, pas de `/app/.git`, et aucun commit `[admin]` dans l'historique | `docker inspect` (variable non secrète) ; `ls -d /app/.git` → absent ; `git log --all --grep='^\[admin\]'` → 0 |
| Les secrets `NUXT_ADMIN_PASSWORD` et `NUXT_ADMIN_SECRET` sont définis ; les variables Umami sont vides | `docker inspect`, longueur seulement (aucune valeur relevée) |
| 42 déploiements réussis sur `main` du 25/02 au 29/09 (#4 à #57) ; les derniers : #46 le 24/04, #50 le 24/07 (manuel, 10 s : recréation non vérifiée), #55 le 12/08, #56 et #57 le 29/09 | `https://ci.open.us.org/api/repos/1/pipelines` (lecture anonyme, Woodpecker 3.19.0) |
**Diagnostic** : la persistance de la prod est cassée, et elle l'a toujours été.
Avant le 19/03 (`b9e6b4a`), les messages s'écrivaient dans `site/messages.yml`, dans
le conteneur ; depuis, dans `/app/data`, dans le conteneur aussi. Chaque déploiement
a donc remis les messages à zéro, puis à la graine à partir du 28/03 (`f633940`).
Les éditions /admin de `site/` et `content/` ont subi le même sort, et ne sont jamais
revenues dans git.
**Pertes** : depuis le 29/09, rien n'a été perdu (aucun message reçu, aucune édition).
Avant cette date, ce qui a été perdu n'est pas vérifiable : les conteneurs détruits
emportent leur couche, et les journaux n'en gardent pas trace (le journal de
l'application commence le 29/09, celui de fabio le 07/10).
## Intention
Monter les messages des visiteurs sur un volume nommé `librodrome-data` en
`/app/data`, pour qu'ils survivent aux déploiements. Il faut le faire maintenant :
au prochain push, tout message reçu d'ici là serait perdu. Le code est prêt sur la
branche locale `fix/persistance-messages` (a6ba0a6), et il a été répété en local.
## Avant — prémisses vivantes
Sur le poste, dans `/home/yvv/Documents/PROD/DEV/librodrome` (attendu en commentaire) :
```bash
git status --short # P1 : vide
git fetch -q origin && git rev-parse origin/main # P2 : 90f77da49b1c77faf9807ba48740b0abd22aff46
# sinon ARRÊT : quelqu'un a poussé (pull --rebase, rebaser la branche, refaire le dossier)
git rev-parse fix/persistance-messages # P3 : a6ba0a6662d54e6ed42ef26ce9e1411e873a2484
git merge-base --is-ancestor origin/main a6ba0a6662d54e6ed42ef26ce9e1411e873a2484; echo $? # P4 : 0
git diff --name-only origin/main a6ba0a6662d54e6ed42ef26ce9e1411e873a2484 \
| grep -E '(^|/)data/|\.env|\.db$|\.enc$|\.key$|\.pem$|id_rsa|id_ed25519|IDENTIFIANTS'; echo $? # P5 : 1 (rien)
curl -4 -s 'https://ci.open.us.org/api/repos/1/pipelines?perPage=3' \
| python3 -I -c 'import sys,json; [print(p["number"], p["status"]) for p in json.load(sys.stdin)]' # P6 : « 57 success » en tête, rien en running ni pending
curl -4 -s -o /dev/null -w '%{http_code}\n' https://librodrome.org/api/health # P7 : 200 (server/api/health.ts ne fait que répondre)
curl -4 -s https://librodrome.org/api/messages \
| python3 -I -c 'import sys,json; print(len(json.load(sys.stdin)))' # P8 : 1 au 26/10 (lecture seule : server/api/messages/index.get.ts)
```
Pour P8, un autre nombre veut dire que des messages ont été publiés depuis : le
noter, il doit se retrouver après.
Sur sonic, les prémisses sont vérifiées par le script de l'étape 1, qui s'arrête en
les nommant : conteneur en marche, `WorkingDir=/app`, `/app/data` non monté, volume
`librodrome-data` absent, dossier de sauvegarde absent, `docker diff` vide sous
`/app/site` et `/app/content`. Une édition /admin trouvée arrête l'acte : elle doit
d'abord passer dans git, sinon ce déploiement l'effacerait.
Contenu sortant (`git log origin/main..a6ba0a6 --stat`, relevé le 26/10) :
```
a6ba0a6 2026-10-26 docker : messages persistés dans un volume nommé monté sur /app/data
docker/docker-compose.dev.yml | 3 ++-
docker/docker-compose.yml | 16 ++++++++++++++--
23b1767 2026-10-26 claude.md : fiche et boucle de vérification fusionnées
CLAUDE.md | 76 +++… HANDOFF.md | 11 +++…
852a488 2026-09-29 handoff : bloc REPRISE (bascule quota 2026-09-29)
HANDOFF.md | 39 +++…
1c7cc45 2026-09-29 actes : og + favicon — exécuté et vérifié en production
actes/2026-09-29-og-logo-mise-en-ligne.md | 8 +++++---
```
Le diff du compose retire deux lignes, les montages morts `../data:/src/data` et
`./public:/src/public`, et en ajoute une, `data:/app/data`, plus le bloc `volumes:`
(`librodrome-data`, `external: true`). Ce dossier n'est pas dans le push : il est
sur `main` en local, et partira avec le déploiement suivant.
## Commandes exactes
Depuis le poste, dans `/home/yvv/Documents/PROD/DEV/librodrome`. Les scripts sont
dans `actes/annexes/`, et chacun se retire de `/tmp` à la fin.
```bash
# Étape 1 — sauvegarde, puis volume créé et semé (sonic ; le conteneur en service n'est pas touché)
scp -q -o BatchMode=yes actes/annexes/2026-10-26-persistance-messages-avant.sh yvv@161.97.174.60:/tmp/lb-avant.sh \
&& scp -q -o BatchMode=yes actes/annexes/2026-10-26-persistance-messages-veille.sh yvv@161.97.174.60:/tmp/lb-veille.sh \
&& scp -q -o BatchMode=yes actes/annexes/2026-10-26-persistance-messages-apres.sh yvv@161.97.174.60:/tmp/lb-apres.sh \
&& ssh -o BatchMode=yes yvv@161.97.174.60 'bash /tmp/lb-avant.sh' </dev/null
# attendu : « sauvegarde : N message(s), sha256 … », « volume librodrome-data semé : sha256 … » (même empreinte), « ÉTAPE 1 OK »
# Étape 2 — veille sur l'ancien conteneur, jusqu'à sa disparition (30 min au plus)
ssh -o BatchMode=yes yvv@161.97.174.60 'setsid nohup bash /tmp/lb-veille.sh >/tmp/lb-veille.log 2>&1 &' </dev/null
# Étape 3 — mise en ligne (push du SHA vérifié), puis attente du pipeline
for i in 1 2 3 4 5; do if git push -q origin a6ba0a6662d54e6ed42ef26ce9e1411e873a2484:main; then break; fi; sleep 10; done; git status -sb | head -1
for i in $(seq 1 40); do s=$(curl -4 -s -m 20 'https://ci.open.us.org/api/repos/1/pipelines?perPage=5' | python3 -I -c 'import sys,json; print(next((p["status"] for p in json.load(sys.stdin) if p["commit"].startswith("a6ba0a6662d5")), "absent"))'); echo "$(date +%T) $s"; case "$s" in success|failure|error|killed|declined) break;; esac; sleep 15; done
# attendu : « success » en 3 min environ (#56 : 3 min 18 s, #57 : 2 min 36 s)
# Étape 4 — vérification sur sonic : bascule, veille, redémarrage à froid
ssh -o BatchMode=yes yvv@161.97.174.60 'cat /tmp/lb-veille.log; bash /tmp/lb-apres.sh && rm -f /tmp/lb-veille.log' </dev/null
# attendu : « ancien conteneur remplacé », « veille : dernière relève = sauvegarde », deux fois « fichier du volume = sauvegarde », « ÉTAPE 4 OK »
# Étape 5 — vu de l'extérieur
curl -4 -s -o /dev/null -w '%{http_code}\n' https://librodrome.org/api/health
curl -4 -s -o /dev/null -w '%{http_code}\n' https://librodrome.org/
curl -4 -s https://librodrome.org/api/messages | python3 -I -c 'import sys,json; print(len(json.load(sys.stdin)))'
# attendu : 200, 200, le nombre relevé en P8
# Étape 6 — branche locale sur la tête déployée, puis compte rendu
git switch main && git rebase a6ba0a6662d54e6ed42ef26ce9e1411e873a2484
```
Si le pipeline échoue à l'étape 3 (par exemple sur `external volume "librodrome-data"
not found`), l'ancien conteneur continue de servir, sans changement : la répétition
l'a montré. La veille s'arrête seule au bout de 30 min. On ne relance rien : on
rapporte.
## Effet attendu
- librodrome.org est reconstruit par Woodpecker. `/app/data` devient le volume
`librodrome-data`, et les messages survivent désormais aux déploiements, aux
redémarrages et à `docker compose down -v` (volume `external`).
- Les montages morts `/src/data` et `/src/public` disparaissent. Les dossiers vides
de root sous `/woodpecker/src/git.open.us.org/{EHV,LPK}/librodrome/` restent sur
l'hôte, sans effet ; les retirer demande root (hors acte).
- Ce qui ne change pas : les éditions /admin de `site/` et `content/` restent perdues
à chaque déploiement, les médias envoyés par /admin ne sont toujours pas servis, et
`ADMIN_GIT_SYNC` reste à `false` (décisions d'Yvv, voir plus bas).
- Fenêtre : entre la sauvegarde et la bascule (3 min environ), un message posté va
dans l'ancien conteneur. La veille le relève toutes les 5 s, et l'étape 4 s'arrête
s'il y en a un. Le risque résiduel tient en quelques secondes : la dernière relève,
puis l'arrêt du conteneur. Le débit observé est de 0 message en 27 jours.
- Irréversibilité : réversible (voir Retour). Ni l'acte ni son retour ne suppriment le
volume ni la sauvegarde.
## Vérifications après
- [x] P7 et P8 rejoués : `200`, et le même nombre de messages publiés
- [x] `lb-apres.sh` : `/app/data` monté sur le volume `librodrome-data`, aucun autre montage, 0 ligne `seed-messages`, fichier du volume = sauvegarde, idem après `docker restart`
- [x] La veille a vu partir l'ancien conteneur, et sa dernière relève est identique à la sauvegarde
- [x] Pipeline du commit `a6ba0a6662d5` : `success`
- [x] Sauvegarde présente sur sonic : `~/librodrome-sauvegardes/2026-10-26/` (700, fichiers 600 ; `messages.yml`, `SHA256SUMS`, `ancien-conteneur.id`, relève de la veille)
- [x] Au déploiement suivant, quel qu'il soit : `docker exec lpk-librodrome-main-app-1 sha256sum /app/data/messages.yml` inchangé, et aucune ligne `seed-messages`. C'est la preuve en vraie grandeur.
## Retour
Retour du code, par un nouvel acte « déploie » :
```bash
git switch main && git revert --no-edit a6ba0a6662d54e6ed42ef26ce9e1411e873a2484 \
&& for i in 1 2 3 4 5; do if git push -q origin "$(git rev-parse HEAD)":main; then break; fi; sleep 10; done
```
Effet du retour, répété en local le 26/10 : le conteneur est recréé sans le volume
et re-semé depuis la graine. Le volume `librodrome-data` reste intact, avec tous les
messages reçus depuis la bascule ; redéployer le correctif les remonte.
Arrêt après l'étape 1, avant le push : rien à défaire en production, puisque le
conteneur n'a pas changé. Le volume et la sauvegarde restent ; un second passage de
l'étape 1 s'arrêtera sur « le volume existe déjà », ce qui est voulu. Les retirer est
un acte « supprime » à part.
La sauvegarde de sonic contient de vraies données de visiteurs (auteurs, adresses).
Elle reste sur sonic, et ne quitte pas le serveur, jusqu'à ce qu'Yvv décide ; sa
suppression est un acte « supprime ».
## Répétition (26/10/2026, sur le poste)
Faite avec le vrai docker (29.4.1, compose v5.1.3) et les noms exacts de la prod :
projet `lpk-librodrome-main`, conteneur `lpk-librodrome-main-app-1`, image locale
`lpk-librodrome-main-app` (`node:22-bookworm-slim` plus le `.output`, `site/` et
`content/` du dépôt, en couche d'image comme en prod). L'ancien conteneur venait de
l'ancien compose (`main`), la bascule du compose d'a6ba0a6, et `HOME` pointait sur un
faux dossier.
- Nominal : étape 1 OK (sauvegarde, puis volume semé à la même empreinte), veille
arrêtée à la bascule, étape 4 OK avant et après le redémarrage à froid, 0 graine
rejouée.
- Nouveau compose sans volume : `external volume "librodrome-data" not found`,
sortie 1, ancien conteneur intact (même identifiant).
- Étape 1 rejouée après la bascule : ARRÊT « /app/data est déjà monté ».
- Édition /admin présente dans la couche : ARRÊT, aucun volume créé.
- Message posté dans l'ancien conteneur après la sauvegarde : relevé par la veille
(2 messages), étape 4 en ARRÊT avec la consigne.
- Message posté après la bascule, puis `--force-recreate` : conservé, sans graine ;
le volume survit à `down -v` ; le retour à l'ancien compose re-sème sans toucher au
volume.
- Second déroulé, après correction de la veille (elle relevait par nom, et le nom
désigne le nouveau conteneur dès la bascule ; elle relève maintenant par
identifiant, et laisse `veille.fin`), à 16h58-16h59Z :
- étape 4 lancée avant le déploiement : ARRÊT « conteneur non recréé » ;
- message posté après la bascule : la dernière relève reste égale à la
sauvegarde, l'étape 4 passe avec la NOTE « fichier du volume changé (2
messages) », avant et après le redémarrage ;
- message tardif dans l'ancien conteneur : ARRÊT, comme au premier déroulé.
- Non déroulés : la sortie de la veille au bout de 30 min sans bascule, et
l'arrêt « la veille n'a pas constaté la bascule » (fenêtre de moins de 5 s
entre la recréation et la fin de la veille).
- Répétition retirée du poste : conteneur, volume et image locale supprimés, ainsi
que `/tmp/lbacte` (rien que du factice et une copie du build).
Différences avec la prod : node 22 au lieu de 23.11 (sans effet sur les montages ni
sur la graine), compose du poste au lieu de celui de l'image `docker:dind` de la CI,
et pas de proxy fabio devant le conteneur.
## Hors champ — décisions d'Yvv
1. **Éditions /admin** (`site/`, `content/`) : perdues à chaque déploiement, jamais
remontées dans git. Trois voies : (a) /admin en lecture seule en prod, et le
contenu ne s'édite plus que par git ; (b) rétablir le git sync : un clone avec
droit d'écriture sur `LPK/librodrome` (acte « accorde »), `.git` monté,
`ADMIN_GIT_SYNC=true` en CI, et chaque édition devient un push, donc un
déploiement ; (c) des volumes sur `site/` et `content/`, ce qui fait deux
vérités face à git (déconseillé).
2. **Médias /admin** : `upload.post.ts` écrit dans `/app/public`, qui n'existe pas
dans l'image, et Nitro ne sert que le manifeste figé à la construction
(`.output/server/chunks/nitro/nitro.mjs`, `readAsset` et `assets[id]`). Un envoi
n'est donc jamais servi. `/admin/media` lit `/app/public` : déduit du code, il
doit répondre 500 (non sondé).
3. **Canon démenti** : `/DEV/AGENTS.md` (Démarrage §3) et
`harness/conventions/git.md` (« Début de session », point 1) disent que librodrome
écrit du YAML en prod via /admin et git sync. C'est faux depuis l'origine
(preuves ci-dessus). Même chose pour `CLAUDE.md` du dépôt, § Données runtime :
« Persisté entre les rebuilds — jamais écrasé ».
4. **Sauvegarde sur sonic** : la garder, ou la supprimer après un déploiement
suivant réussi (acte « supprime »).
## Exécution
Acte exécuté le 26/10/2026, 19h38-19h44, par la session dev-65 (orch, mandat de rôle
du 26-27/10). Relecture indépendante de a6ba0a6 et des scripts : un sous-agent neuf,
verdict « ok » à 18h48, inscrite dans `state/relectures.json`. Sorties relevées par
orch, puis consignées par la session librodrome-e9.
- **Prémisses** (19:38:45) : P1 vide, P2 `90f77da49b1c…`, P3 `a6ba0a6662d5…`, P4 `0`,
P5 `1`, P6 `57 success` / `56 success` / `55 success`, P7 `200`, P8 `1`.
Contrôle ajouté (relecture, m1) : `docker diff` du conteneur, 0 entrée sous
`/app/(public|site|content)`.
- **Étape 1** (19:39:43-19:39:51) : « sauvegarde : 1 message(s), sha256
c8afc7de728fb9d57f6565a36b40f16fe7beb438768f8f9127183bea9569a6b8, 1099 2026-09-29
06:59:05.542963509 +0000 » ; « volume librodrome-data semé : sha256 c8afc7de…a6b8 » ;
« ÉTAPE 1 OK ».
- **Étape 2** : veille lancée vers 19h40.
- **Étape 3** : boucle de push lancée seule. Écart au déroulé : sans le
`; git status -sb | head -1` final, que le garde refuse sous mandat. `origin/main` =
`a6ba0a6662d54e6ed42ef26ce9e1411e873a2484`. Pipeline n° 58 : running à 19:42:41,
success à 19:43:51.
- **Étape 4** (jusqu'à 19:44:14) : « ancien conteneur remplacé, constaté à
2026-10-26T18:43:46Z » ; « veille : dernière relève = sauvegarde
(2026-10-26T18:43:41Z) » ; bascule, puis redémarrage à froid, deux fois « fichier du
volume = sauvegarde (1 message(s)) » ; « ÉTAPE 4 OK ».
Contrôle indépendant (relecture, m2) : journal du conteneur lu (2 lignes), 0 ligne
`seed-messages` ; seul montage, le volume `librodrome-data` sur `/app/data` ; conteneur
créé le 2026-10-26T18:43:43Z.
- **Sauvegarde** sur sonic : `~/librodrome-sauvegardes/2026-10-26/` (700, fichiers 600 :
`SHA256SUMS`, `ancien-conteneur.id`, `derniere-releve.date`,
`messages-derniere-releve.yml`, `messages.stat`, `messages.yml`, `veille.fin`).
`/tmp/lb-*` retirés, aucune veille en cours.
- **Étape 5** (19:44:41) : health `200`, accueil `200`, messages `1`.
- **Étape 6** : `main` locale rebasée sur `a6ba0a6` sans conflit ; ce dossier (`52f0a00`)
devient `c32d88b`.
Mineurs de la relecture, non bloquants, à reprendre si l'on réutilise ces scripts :
m1 `avant.sh` ne regarde pas `/app/public`, où /admin écrit ses médias (paré à la
main, ci-dessus) ; m2 `|| true` sur `docker logs` dans `apres.sh` (paré par le contrôle
indépendant) ; m3 pas de témoin de fin d'étape 1 ; m4 `CLAUDE.md` décrivait encore
`../data:/src/data` (corrigé dans ce commit) ; m5 les statuts `blocked` et `skipped` ne
sont pas prévus par la boucle de l'étape 3 ; m6 le dossier de sauvegarde est à retirer
à la main si l'étape 1 échoue.
**Preuve en vraie grandeur** : faite au déploiement suivant, par la session
librodrome-e9, sur le « Déploie » d'Yvv tapé dans cette session (26/10, vers 19h50 :
« il bosse, je le court-circuite. Déploie […] »). Push de `4057f50` (doc seule) ; le
pipeline n° 59 passe de running (19:51:39) à success (19:53:49). Sur sonic, en lecture
seule : le conteneur `4f97cff481d8…`, créé à 18:43:43Z, est remplacé par `154b4906183c…`,
créé à 18:53:43Z ; seul montage, `librodrome-data` sur `/app/data` ; `messages.yml` reste
à `c8afc7de…a6b8` avant comme après ; 0 ligne `seed-messages` (journal : 1 ligne). Vu de
l'extérieur (19:54:44) : health `200`, accueil `200`, messages `1`.
Reste ouvert : les décisions du § Hors champ.
+109
View File
@@ -0,0 +1,109 @@
# Acte — Console de l'accueil : la graduation d'Yvv au survol
Classe : déploie
Projet : librodrome Date : 2026-11-03
**État : EXÉCUTÉ (03/11, 06h11-06h16), par orch (session dev-63) sous mandat « déploie » (inscrit du 03/11 au 08/11), après la relecture neuve « 64e714c : ok »**
## Intention
Mettre en ligne la console de l'accueil selon la consigne d'Yvv du 03/11 : au survol,
numérique monte à 3/4, économique à 1/2, citoyenne à 2/3. Chaque curseur reste à son cran,
et un nouveau survol rejoue sa montée. Le panneau suit le même geste. Avant le premier geste,
l'animation lente du 29/09 continue, et l'axe en avant monte à son cran, jamais au-dessus.
Les consignes sont écrites mot pour mot dans `docs/consignes-yvv.md`. La première relecture
(« 230f79a : à reprendre ») a été traitée par `03f763a` et `64e714c`.
## Avant — prémisses vivantes
Sur le poste, dans `/home/yvv/Documents/PROD/DEV/librodrome`. L'attendu, relevé le 03/11 à
05h57, est en commentaire :
```bash
git fetch -q origin && git rev-parse origin/main # P1 : 4057f50bd37fa8a3ba3ea9dc6c9c38d51d4f6434
# sinon ARRÊT : quelqu'un a poussé
git merge-base --is-ancestor origin/main 64e714c1dde9897e46d36caf6cab737799081c96; echo $? # P2 : 0
git diff --name-only origin/main 64e714c1dde9897e46d36caf6cab737799081c96 \
| grep -E '(^|/)data/|\.env|\.db$|\.enc$|\.key$|\.pem$|id_rsa|id_ed25519|IDENTIFIANTS'; echo $? # P3 : 1 (rien)
curl -4 -s 'https://ci.open.us.org/api/repos/1/pipelines?perPage=3' \
| python3 -I -c 'import sys,json; [print(p["number"], p["status"]) for p in json.load(sys.stdin)]' # P4 : « 59 success » en tête, rien en cours
curl -4 -s -o /dev/null -w '%{http_code}\n' https://librodrome.org/api/health # P5 : 200
curl -4 -s https://librodrome.org/api/messages \
| python3 -I -c 'import sys,json; print(len(json.load(sys.stdin)))' # P6 : 1
ssh -o BatchMode=yes yvv@161.97.174.60 'docker diff lpk-librodrome-main-app-1 | grep -E " /app/(site|content)(/|$)"; echo $?; docker exec lpk-librodrome-main-app-1 sha256sum /app/data/messages.yml' </dev/null
# P7 : « 1 » (aucune édition /admin, que ce déploiement effacerait)
# puis c8afc7de728fb9d57f6565a36b40f16fe7beb438768f8f9127183bea9569a6b8 /app/data/messages.yml
```
Une édition /admin trouvée en P7 arrête l'acte : elle doit d'abord passer dans git.
Relecture : `~/harness/etat/relectures.json` doit porter « 64e714c : ok », d'un relecteur neuf.
Contenu sortant (`git log origin/main..64e714c --stat`, relevé le 03/11 à 05h57) :
```
64e714c console : l'animation monte l'axe en avant à son cran
03f763a console : graduation d'Yvv, la montée se rejoue à chaque survol
230f79a console : au survol, le curseur monte sans faire descendre les autres
89d5f83 actes : persistance des messages — preuve au déploiement suivant
actes/2026-10-26-persistance-messages.md | 14 ++-
app/components/home/HomeConsole.vue | 166 ++++++++++++++++++++++++-----
docs/consignes-yvv.md | 50 ++++++++++
```
Ni `data/`, ni `site/`, ni configuration, ni secret. Ce dossier n'est pas dans le push : il
partira avec le déploiement suivant.
## Commandes exactes
```bash
# 1. La mise en ligne : la poussée du SHA relu
cd /home/yvv/Documents/PROD/DEV/librodrome && for i in 1 2 3 4 5; do if git push -q origin 64e714c1dde9897e46d36caf6cab737799081c96:main; then break; fi; sleep 10; done
# 2. Attente du pipeline (environ 3 min)
for i in $(seq 1 40); do s=$(curl -4 -s -m 20 'https://ci.open.us.org/api/repos/1/pipelines?perPage=5' | python3 -I -c 'import sys,json; print(next((p["status"] for p in json.load(sys.stdin) if p["commit"].startswith("64e714c1dde9")), "absent"))'); echo "$(date +%T) $s"; case "$s" in success|failure|error|killed|declined) break;; esac; sleep 15; done
# attendu : success
# 3. Branche main locale sur la tête déployée (avance rapide seule ; main n'est extraite nulle part)
git -C /home/yvv/Documents/PROD/DEV/librodrome fetch . 64e714c1dde9897e46d36caf6cab737799081c96:main
```
Si le pipeline échoue, l'ancien conteneur continue de servir, sans changement : on ne
relance rien, on rapporte.
## Effet attendu
- librodrome.org est reconstruit. Seule la console de l'accueil change de comportement.
Les messages restent sur le volume `librodrome-data`, sans être touchés.
- Irréversibilité : réversible (voir Retour).
## Vérifications après
- [x] Pipeline du commit `64e714c1dde9` : `success`
- [x] P5 et P6 rejoués : `200`, puis le même nombre de messages publiés
- [x] Sur sonic : `messages.yml` a la même empreinte qu'en P7, et le journal du conteneur n'a aucune ligne `seed-messages`
- [x] Vu de l'extérieur, sur https://librodrome.org, dans un navigateur sans tête : au survol d'économique, `--level` passe de 0 à 0,50 ; les deux autres ne bougent pas ; le panneau « Autonomie économique » s'affiche
## Retour
Par un nouvel acte « déploie » :
```bash
git switch main && git revert --no-edit 64e714c1dde9897e46d36caf6cab737799081c96 03f763a 230f79a \
&& for i in 1 2 3 4 5; do if git push -q origin "$(git rev-parse HEAD)":main; then break; fi; sleep 10; done
```
Le retour ne touche ni le volume ni les messages.
## Exécution
Acte exécuté le 03/11/2026, 06h11-06h16, par orch (session dev-63, e66db8ca), sous mandat
« déploie » ; consigne d'Yvv du 03/11 à 06h00 : « livre et déploie tout ce que tu peux ».
- Relecture : « 230f79a : à reprendre » (05h34), puis « 64e714c : ok » (06h05), d'un sous-agent
neuf, inscrite dans `~/harness/etat/relectures.json`. Légers, pour un lot suivant : un curseur
non touché peut se figer à mi-course si le premier geste tombe pendant la rotation ; un
nouveau survol à moins de 500 ms ne rejoue pas la montée ; un clic sans survol ni focus
affiche le panneau sans monter le curseur ; la flèche part de l'axe sélectionné.
- Prémisses rejouées à 06h11:39 : P1 `4057f50…`, P2 0, P3 1, P4 « 59 success », P5 200, P6 1,
P7 1 et `c8afc7de…a6b8`.
- Poussée de `64e714c1dde9897e46d36caf6cab737799081c96:main` à 06h11:5x, passée du premier coup.
- Pipeline n° 60 : `running` de 06h12:08, `success` à 06h14:27.
- Après : `/api/health` 200, `/` 200, 1 message publié ; conteneur `Up 20 seconds (healthy)` ;
`messages.yml` `c8afc7de…a6b8`, inchangé ; 0 ligne `seed-messages`.
- Vu de l'extérieur (Chromium sans tête, https://librodrome.org, 1280 px), `--level` :
repos 0,75 / 0,336 / 0,17, panneau numérique ; survol d'économique 0,75 / **0,50** / 0,17,
panneau économique ; survol de citoyenne 0,75 / 0,50 / **0,667** ; survol de numérique
0,75 / 0,50 / 0,667 ; 4 s après la sortie, inchangé ; 0 erreur dans la console.
- `main` local avancé sur `64e714c` (`git fetch . 64e714c…:main`).
- Ce dossier n'est pas en ligne : il partira avec le déploiement suivant.
+173
View File
@@ -0,0 +1,173 @@
# Acte — L'identité du studio DA : logotype, icônes et les 61 oiseaux
Classe : déploie
Projet : librodrome Date : 2026-11-03
**État : EXÉCUTÉ le 03/11 de 20h51 à 20h55 (voir « Exécution ») ; préparé le 03/11 à 06h45 ( repris à 07h47 sur `fb8c71f`, puis à 12h44 sur `16d6607`, puis à 14h07 sur `b6143c5`, puis à 17h35 sur `bb8fad9`, puis à 19h53 sur `f1dbf21`)**
## Intention
Mettre en ligne le kit d'identité du studio DA, qu'Yvv a validé le 03/11 (« Oui, à intégrer ») :
- le logotype dans l'en-tête ;
- les favicons, l'icône d'écran d'accueil et l'image de partage ;
- la frise du pied de page ;
- les 61 oiseaux, posés près du contenu de leur métier, à la place des shadoks.
Les consignes d'Yvv du 03/11 (05h09 et le formulaire) sont écrites dans `docs/consignes-yvv.md` § Les oiseaux. Elles disent : pas en colonne, pas papier peint, tailles et places variées, posés sans flotter, un oiseau par page sur téléphone, les 61 tout de suite.
Historique :
- La relecture neuve de 07h06 a jugé `8ccdda3` « à reprendre » : un oiseau sur du texte, l'en-tête qui débordait de 768 à 798 px, deux oiseaux rognés vers 1200 px, des colonnes dans les marges.
- DA a rendu « kit : ok » à 07h00, avec trois constats de composition et la règle du perché.
- `fb8c71f` (IDENTITE-DA-2) corrige le tout ; relu « fb8c71f : ok » (inscrit à 08h12), avec trois écarts légers.
- DA, second avis : les pages numérique et commande à reprendre (zigzag, paires, une seule taille).
- `44e9576` (IDENTITE-DA-3) : numérique, commande et les trois écarts légers ; aucun défaut de 375 à 1440 px, sur 18 pages, au contrôle de librodrome-77. DA : « composition : ok » (reçu entre 12h38 et 12h44), les cinq règles mesurées confirmées.
- `8de9a81` : CONSOLE-SURVOL-4, les quatre écarts légers de la relecture de la console (`849c477` reposé sur `44e9576`) : chaque survol rejoue la montée, aucun curseur figé à mi-course, le lien « Mentions légales » (page inexistante) retiré du pied de page.
- `16d6607` : doc seule, les avis relayés de DA quittent `docs/consignes-yvv.md` pour `docs/da-oiseaux.md`.
- La relecture neuve de `fb8c71f..16d6607` : « 16d6607 : à reprendre » (inscrite à 13h10) : deux paires d'oiseaux (`/economique`, `/evenement`), la toile de confiance à travers un texte, le cartonnier des chapitres sur une ligne invisible, une colonne dans la marge de modele-eco ; la console laissait descendre un curseur après le premier geste.
- `b6143c5` (IDENTITE-DA-4) : les cinq constats et trois de plus, un filet tracé au-dessus de précédent / suivant dans les chapitres ; la console arrête au premier geste un curseur qui descendait (décision d'orch de 13h10, tirée de « ne fait pas descendre les autres »). Contrôle de librodrome-77 : 1256 défauts sur `16d6607`, 0 sur 3164 audits sur `b6143c5` (28 pages, de 375 à 1440 px) ; sonde de la console : 0 image en descente sur 7 scénarios.
- La relecture neuve de `fb8c71f..b6143c5` : « b6143c5 : à reprendre » (inscrite à 14h40) : sur authentification-wot, deux groupes de trois oiseaux de marge sur une même bande (21 et 23 px). Pour finir, DA et orch ferment la liste des règles mesurées, avec leurs seuils (`docs/da-oiseaux.md`, « Règles mesurées », seuils confirmés par DA).
- `bb8fad9` (IDENTITE-DA-5) : la liste fermée appliquée à toutes les pages (pose « au bout du titre », pompeur perché sur la carte du projet, accordéoniste au bout du titre de l'accueil…). Contrôle de librodrome-77 : 1080 défauts sur `b6143c5`, 0 sur 3724 mesures sur `bb8fad9` (28 pages, 375 à 1600 px).
- La relecture neuve de `fb8c71f..bb8fad9` : « bb8fad9 : à reprendre » (inscrite à 18h05) : la règle f mesurée au-dessus du sol et non du dessin (le pompeur de la toile de confiance n'avait que 11 px au-dessus de la tête), les chapitres du calligraphe et du typographe hors de leur ligne, des oiseaux derrière une carte qui touchaient ses coins. Orch précise la liste fermée : e vaut pour les oiseaux « libres » hors de leur bloc, g se mesure sur le rectangle du bloc, « derrière » reste « derrière ».
- `28a6daf` (IDENTITE-DA-6) : f mesurée du haut du dessin à chaque ligne ou bloc au-dessus, 15 perchés reposés, les chapitres sur leurs filets, les coins dégagés ; sur `/evenement`, le marionnettiste se perche sur le filet du pied de page à partir de 1200 px, son décalage tiré des variables du sceau (`--seal-block`), seul oiseau hors de son bloc (option retenue par orch, puis par DA). Contrôle de librodrome-77 : 2386 relevés sur `bb8fad9`, 0 défaut sur `f1dbf21` (28 pages, 375 à 1600 px, 4 ambiances de l'accueil), 61 oiseaux distincts à 1440. DA : « composition : ok » sur `28a6daf`, reçu avant 19h28, les deux lectures de f confirmées.
- `f1dbf21` : la remarque non bloquante de DA, la lectrice de l'accueil réduite à sa bulle au-dessus de la carte, est retirée de l'accueil (elle reste sur `/commande`). L'accueil passe de 6 à 5 oiseaux à 1440. Retrait retenu par défaut, signalé à DA à 19h52.
## Avant — prémisses vivantes
Sur le poste, dans `/home/yvv/Documents/PROD/DEV/librodrome`. L'attendu, relevé le 03/11 à 06h42, est en commentaire :
```bash
git fetch -q origin && git rev-parse origin/main # P1 : 64e714c1dde9897e46d36caf6cab737799081c96
# sinon ARRÊT : quelqu'un a poussé
git merge-base --is-ancestor origin/main f1dbf217238a2b9857c191f4691ed632da0f731e; echo $? # P2 : 0
git diff --name-only origin/main f1dbf217238a2b9857c191f4691ed632da0f731e \
| grep -E '(^|/)data/|\.env|\.db$|\.enc$|\.key$|\.pem$|id_rsa|id_ed25519|IDENTIFIANTS'; echo $? # P3 : 1 (rien)
curl -4 -s 'https://ci.open.us.org/api/repos/1/pipelines?perPage=3' \
| python3 -I -c 'import sys,json; [print(p["number"], p["status"]) for p in json.load(sys.stdin)]' # P4 : « 60 success » en tête, rien en cours
curl -4 -s -o /dev/null -w '%{http_code}\n' https://librodrome.org/api/health # P5 : 200
curl -4 -s https://librodrome.org/api/messages \
| python3 -I -c 'import sys,json; print(len(json.load(sys.stdin)))' # P6 : 1
ssh -o BatchMode=yes yvv@161.97.174.60 'docker diff lpk-librodrome-main-app-1 | grep -E " /app/(site|content)(/|$)"; echo $?; docker exec lpk-librodrome-main-app-1 sha256sum /app/data/messages.yml' </dev/null
# P7 : « 1 » (aucune édition /admin, que ce déploiement effacerait)
# puis c8afc7de728fb9d57f6565a36b40f16fe7beb438768f8f9127183bea9569a6b8 /app/data/messages.yml
```
Une édition /admin trouvée en P7 arrête l'acte : elle doit d'abord passer dans git.
Relectures :
- `~/harness/etat/relectures.json` doit porter « f1dbf21 : ok », d'un relecteur neuf, sur `fb8c71f..f1dbf21`, qui juge sur la liste fermée des règles de `docs/da-oiseaux.md` (tout ce qui précède est relu « fb8c71f : ok ») ;
- DA (images-52) : « composition : ok » sur les planches de `28a6daf` (IDENTITE-DA-6), reçu avant 19h28 ; `f1dbf21` applique sa remarque ;
- DA, version 4 : « composition : ok » et « filet : oui » sur les planches de `b6143c5`, reçus avant 14h08. Ses remarques hors lot (liste d'attente) : des puces noires devant les cartes de `/economique/modele-eco`, déjà en ligne ; pas de cinquième oiseau dans l'en-tête de `/evenement` ;
- DA (images-52) : « composition : ok » sur les planches de `44e9576`, reçu entre 12h38 et 12h44 (version 3).
Contenu sortant (`git log origin/main..f1dbf21`, relevé le 03/11 à 19h53, origin/main relu par `git fetch`) :
```
f1dbf21 identité 6 : plus de lectrice derrière la carte du livre sur l'accueil (DA)
28a6daf identité 6 : la règle f mesurée au-dessus du dessin, les chapitres posés sur leurs filets, les coins arrondis dégagés
bb8fad9 identité 5 : la liste fermée des règles mesurées, appliquée à toutes les pages
b6143c5 identité 4 : plus de paire ni de colonne en marge, chaque oiseau sur une ligne visible ; la console arrête un curseur qui descendait
16d6607 docs : les avis du studio DA et des relectures quittent les consignes d'Yvv (docs/da-oiseaux.md)
8de9a81 console : chaque survol rejoue la montée, aucun curseur figé à mi-course ; pied de page sans lien mort
44e9576 identité 3 : plus de zigzag ni de paires, des tailles variées, chaque oiseau sur une vraie ligne
fb8c71f identité 2 : un oiseau perché seulement où il y a du vide au-dessus, l'en-tête tient à 768 px
8ccdda3 claude.md : les oiseaux et le logotype du studio DA remplacent les shadoks et la signature §
d2bc0d9 identité : le kit du studio DA intégré, les 61 oiseaux posés sur la page
cdd3fa5 claude.md : renvoi aux consignes d'Yvv, datées et mot pour mot (docs/consignes-yvv.md)
44dbcfd acte : console de l'accueil — exécuté et vérifié en production (pipeline 60)
26ce315 acte : console de l'accueil, la graduation d'Yvv au survol — dossier « déploie » préparé
106 files changed, 1482 insertions(+), 3486 deletions(-)
```
Hors des 62 SVG de `public/images/oiseaux/`, il touche :
- 43 fichiers : `app/` (composants, pages, utils, dont `HomeConsole.vue` et `TheFooter.vue`), `public/` (icônes, `og-default.png`), `docs/consignes-yvv.md`, `docs/da-oiseaux.md`, `CLAUDE.md`, `actes/` ;
- `nuxt.config.ts`, pour deux liens d'icône seulement (`favicon.ico`, `apple-touch-icon`), relus par leur diff.
Il ne touche ni `data/`, ni `site/`, ni `content/`, ni `server/`, ni `docker/`, ni `.woodpecker.yml`, ni aucun secret. Ce dossier n'est pas dans le push : il partira avec le déploiement suivant.
## Commandes exactes
```bash
# 1. La mise en ligne : la poussée du SHA relu
cd /home/yvv/Documents/PROD/DEV/librodrome && for i in 1 2 3 4 5; do if git push -q origin f1dbf217238a2b9857c191f4691ed632da0f731e:main; then break; fi; sleep 10; done
# 2. Attente du pipeline (environ 3 min)
for i in $(seq 1 40); do s=$(curl -4 -s -m 20 'https://ci.open.us.org/api/repos/1/pipelines?perPage=5' | python3 -I -c 'import sys,json; print(next((p["status"] for p in json.load(sys.stdin) if p["commit"].startswith("f1dbf217238a")), "absent"))'); echo "$(date +%T) $s"; case "$s" in success|failure|error|killed|declined) break;; esac; sleep 15; done
# attendu : success
# 3. Branche main locale sur la tête déployée (avance rapide seule ; main n'est extraite nulle part)
git -C /home/yvv/Documents/PROD/DEV/librodrome fetch . f1dbf217238a2b9857c191f4691ed632da0f731e:main
```
Si le pipeline échoue, l'ancien conteneur continue de servir, sans changement : on ne relance rien, on rapporte.
## Effet attendu
- librodrome.org est reconstruit avec le logotype, les icônes, l'image de partage et les oiseaux du studio DA. Les shadoks disparaissent.
- La console de l'accueil : chaque survol rejoue la montée de son curseur ; au premier geste, un curseur qui descendait s'arrête où il est ; la graduation d'Yvv ne change pas. Le pied de page n'a plus le lien « Mentions légales », qui menait à une page inexistante.
- Les 11 chapitres du livre gagnent un filet discret au-dessus des liens précédent / suivant (validé par DA).
- Les textes, le lecteur et les messages ne changent pas. Les messages restent sur le volume `librodrome-data`, sans être touchés.
- Irréversibilité : réversible (voir Retour). Les aperçus de partage déjà mis en cache par les réseaux gardent l'ancienne image : l'URL passe en `?v=3` pour les pages vues après.
## Vérifications après
- [ ] Pipeline du commit `f1dbf217238a` : `success`
- [ ] P5 et P6 rejoués : `200`, puis le même nombre de messages publiés
- [ ] Sur sonic : `messages.yml` a la même empreinte qu'en P7, et le journal du conteneur n'a aucune ligne `seed-messages`
- [ ] Icônes, vues de l'extérieur : `favicon.ico` 200 (3 292 octets), `apple-touch-icon.png` 200 (5 189), `icon-192.png` 200 (5 621), `og-default.png` 200 (56 710). Avant : 5 887, 404, 404, 82 920.
- [ ] Sonde navigateur, vue de l'extérieur (`verif-prod-ida.cjs`, Chromium sans tête), sur `/`, `/economique` et `/evenement` :
- à 1440 px : logotype présent, 5, 4 et 9 oiseaux visibles, 0 doublon, `"shadoks":1`, `og:image` en `?v=3`, pas de débordement, 0 erreur dans la console ;
- à 375 px : 1, 1 et 0 oiseau ;
- `"shadoks":1` n'est pas un shadok : le sélecteur `[class*="shadok"]` attrape la frise d'oiseaux du kit dans le pied de page (`TheFooter.vue:4`, `<UiOiseau nom="frise" class="footer-shadok-pattern" />`, ancien nom de classe gardé). Tout autre nombre que 1 arrête la vérification.
- Attendu relevé sur le build de `f1dbf21` (librodrome-77, build de 19h28 à 19h30, port 3099, aucun POST, sonde au premier plan, `messages.yml` identique avant et après ; l'accueil à 1440 passe de 6 à 5 oiseaux par `f1dbf21`, les cinq autres lignes inchangées depuis `16d6607`) :
```
1440 / {"logotype":true,"oiseaux":5,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
1440 /economique {"logotype":true,"oiseaux":4,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
1440 /evenement {"logotype":true,"oiseaux":9,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 / {"logotype":true,"oiseaux":1,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 /economique {"logotype":true,"oiseaux":1,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 /evenement {"logotype":true,"oiseaux":0,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
```
- pied de page : aucun lien « Mentions légales ».
- Avant, relevé à 06h43 : pas de logotype, 0 oiseau, 4, 9 et 11 shadoks, `?v=2`.
## Retour
Par un nouvel acte « déploie » :
```bash
git switch main && git revert --no-edit f1dbf21 28a6daf bb8fad9 b6143c5 16d6607 8de9a81 44e9576 fb8c71f 8ccdda3 d2bc0d9 \
&& for i in 1 2 3 4 5; do if git push -q origin "$(git rev-parse HEAD)":main; then break; fi; sleep 10; done
```
Le retour ne touche ni le volume ni les messages.
## Exécution
Acte exécuté le 03/11/2026, 20h51-20h55, par orch (session dev-63, e66db8ca), sous mandat « déploie »
(03/11 → 08/11, `~/harness/etat/mandats.json`).
- **Relectures** : « f1dbf21 : ok », inscrite à 20h50 (sous-agent neuf, sur `fb8c71f..f1dbf21` et la liste
fermée ; mesure indépendante : 0 infraction aux règles a à i, de 375 à 1600 px, 29 pages, 4 palettes ;
console, liens, SEO, logotype, sceau et zones gardées verts ; smoke V0 vert). DA : « composition : ok »
sur `28a6daf` ; le retrait de la lectrice (`f1dbf21`) lui a été signalé à 19h52, sans objection reçue.
Aucune autre relecture de ce code en cours.
- **Prémisses** (20 h 51 min 25 s) : P1 `origin/main` → `64e714c1dde9897e46d36caf6cab737799081c96` ; P2 0 ;
P3 1 (rien) ; P4 « 60 success » en tête, rien en cours ; P5 200 ; P6 1 ; P7 « 1 » (aucune édition
/admin), puis `c8afc7de728fb9d57f6565a36b40f16fe7beb438768f8f9127183bea9569a6b8 /app/data/messages.yml`.
- **Poussée** (20 h 51) : la commande 1 du dossier, telle quelle, passée au premier essai.
- **Pipeline 61** : créé à 20 h 51 min 55 s, `success` à 20 h 54 min 14 s ; conteneur
`lpk-librodrome-main-app-1` « Up 20 seconds (healthy) » à 20 h 54 min 31 s.
- **Vérifications après** (20 h 54 min 31 s à 20 h 55 min 04 s) :
- P5 200, P6 1 ;
- sur sonic : `messages.yml` à la même empreinte qu'en P7 (`c8afc7de…a6b8`), 0 ligne `seed-messages` au journal ;
- icônes vues de l'extérieur : `favicon.ico` 200 (3 292 octets), `apple-touch-icon.png` 200 (5 189),
`icon-192.png` 200 (5 621), `og-default.png` 200 (56 710) ;
- sonde `verif-prod-ida.cjs` sur la production, avec un préchargement qui répond en local aux 6 POST des
statistiques (`stats.open.us.org/api/send`), pour ne pas compter de fausses visites : les six lignes
attendues, à l'identique ;
```
1440 / {"logotype":true,"oiseaux":5,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
1440 /economique {"logotype":true,"oiseaux":4,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
1440 /evenement {"logotype":true,"oiseaux":9,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 / {"logotype":true,"oiseaux":1,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 /economique {"logotype":true,"oiseaux":1,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
375 /evenement {"logotype":true,"oiseaux":0,"doublons":0,"shadoks":1,"og":"https://librodrome.org/og-default.png?v=3","debord":false} erreurs 0
```
- pied de page : aucun lien vers `/mentions-legales` dans la page servie. Le libellé « Mentions légales »
reste une fois dans la configuration du site sérialisée dans la page (`site.yml`, liens du pied de
page), que `TheFooter.vue` filtre au rendu.
- **Branche locale** : `main` avancée `cdd3fa5..f1dbf21` à 20 h 55 min 33 s.
- **Retour** : la commande du dossier, inchangée (revert de `f1dbf21 … d2bc0d9`, par un nouvel acte).
- Écart au déroulé : la sonde a tourné avec le préchargement qui bloque les statistiques ; elle-même n'a
pas changé.
@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# Acte 2026-10-26-persistance-messages — étape 4, sur sonic, sous yvv, après le déploiement.
# Vérifie la bascule, puis un redémarrage à froid, puis revérifie.
# Lancement : ssh yvv@161.97.174.60 'bash /tmp/lb-apres.sh' </dev/null
set -euo pipefail
C=lpk-librodrome-main-app-1
V=librodrome-data
D="$HOME/librodrome-sauvegardes/2026-10-26"
stop() { echo "ARRÊT : $*" >&2; exit 1; }
check() {
[ "$(docker inspect -f '{{.State.Running}}' "$C")" = true ] || stop "$C ne tourne pas"
src=$(docker inspect -f '{{range .Mounts}}{{if eq .Destination "/app/data"}}{{.Type}} {{.Name}}{{end}}{{end}}' "$C")
[ "$src" = "volume $V" ] || stop "/app/data n'est pas le volume $V (trouvé : '$src')"
others=$(docker inspect -f '{{range .Mounts}}{{.Destination}} {{end}}' "$C")
[ "$others" = "/app/data " ] || stop "montages inattendus : $others"
s=$(docker logs "$C" 2>&1 | grep -c 'seed-messages' || true)
[ "$s" = 0 ] || stop "la graine a été rejouée ($s ligne(s) seed-messages)"
hc=$(docker exec "$C" sha256sum /app/data/messages.yml | cut -d' ' -f1)
nc=$(docker exec "$C" grep -c '^ - id:' /app/data/messages.yml || true)
if [ "$hc" = "$h" ]; then
echo " fichier du volume = sauvegarde ($nc message(s))"
else
echo " NOTE : le fichier du volume a changé depuis la sauvegarde ($nc message(s)) : message reçu après la bascule, à regarder"
fi
}
wait_up() {
for _ in $(seq 1 30); do
if docker exec "$C" node -e "fetch('http://127.0.0.1:3000/api/health').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))" 2>/dev/null; then
return 0
fi
sleep 2
done
stop "$C ne répond pas sur /api/health après 60 s"
}
[ -s "$D/ancien-conteneur.id" ] || stop "étape 1 non jouée"
old=$(cat "$D/ancien-conteneur.id")
h=$(cut -d' ' -f1 "$D/SHA256SUMS")
new=$(docker inspect -f '{{.Id}}' "$C")
[ "$new" != "$old" ] || stop "conteneur non recréé : le déploiement n'a pas eu lieu"
# La veille doit avoir vu l'ancien conteneur partir, sans message arrivé après la sauvegarde.
[ -s "$D/veille.fin" ] || stop "la veille n'a pas constaté la bascule (encore en cours ?) : attendre 10 s et relancer cette étape"
[ -s "$D/messages-derniere-releve.yml" ] || stop "aucune relève de la veille"
hl=$(sha256sum "$D/messages-derniere-releve.yml" | cut -d' ' -f1)
[ "$hl" = "$h" ] || stop "un message est arrivé dans l'ancien conteneur après la sauvegarde ($(cat "$D/derniere-releve.date")) : le reporter dans le volume avant toute autre chose (hors acte, décision d'Yvv)"
echo "veille : dernière relève = sauvegarde ($(head -1 "$D/derniere-releve.date"))"
echo "bascule :"
wait_up
check
echo "redémarrage à froid :"
docker restart "$C" >/dev/null
wait_up
check
rm -f -- "$0"
echo "ÉTAPE 4 OK"
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
# Acte 2026-10-26-persistance-messages — étape 1, sur sonic, sous yvv.
# Prémisses, sauvegarde des messages, volume librodrome-data créé et semé.
# Ne touche pas au conteneur en service (lectures seulement).
# Lancement : ssh yvv@161.97.174.60 'bash /tmp/lb-avant.sh' </dev/null
set -euo pipefail
C=lpk-librodrome-main-app-1
IMG=lpk-librodrome-main-app
V=librodrome-data
D="$HOME/librodrome-sauvegardes/2026-10-26"
stop() { echo "ARRÊT : $*" >&2; exit 1; }
# --- Prémisses
[ "$(docker inspect -f '{{.State.Running}}' "$C")" = true ] || stop "$C ne tourne pas"
[ "$(docker inspect -f '{{.Config.WorkingDir}}' "$C")" = /app ] || stop "WorkingDir de $C différent de /app"
m=$(docker inspect -f '{{range .Mounts}}{{if eq .Destination "/app/data"}}{{.Type}}{{end}}{{end}}' "$C")
[ -z "$m" ] || stop "/app/data est déjà monté ($m) : l'acte a déjà été joué ?"
if docker volume inspect "$V" >/dev/null 2>&1; then stop "le volume $V existe déjà"; fi
[ ! -e "$D" ] || stop "$D existe déjà"
dd=$(docker diff "$C")
modifs=$(printf '%s\n' "$dd" | grep -E '^[ACD] /app/(site|content)(/|$)' || true)
if [ -n "$modifs" ]; then
echo "$modifs" >&2
stop "éditions /admin présentes dans $C et absentes de git : les reporter dans git avant de déployer"
fi
# --- Sauvegarde (reste sur sonic, dossier 700, fichiers 600)
umask 077
mkdir -p "$D"
docker inspect -f '{{.Id}}' "$C" > "$D/ancien-conteneur.id"
docker exec "$C" cat /app/data/messages.yml > "$D/messages.yml"
docker exec "$C" stat -c '%s %y' /app/data/messages.yml > "$D/messages.stat"
[ -s "$D/messages.yml" ] || stop "sauvegarde vide"
n=$(grep -c '^ - id:' "$D/messages.yml" || true)
h=$(sha256sum "$D/messages.yml" | cut -d' ' -f1)
echo "$h messages.yml" > "$D/SHA256SUMS"
echo "sauvegarde : $n message(s), sha256 $h, $(cat "$D/messages.stat")"
# --- Volume créé et semé avec la sauvegarde
docker volume create "$V" >/dev/null
docker run --rm -i --entrypoint sh -v "$V":/data "$IMG" -c 'cat > /data/messages.yml' < "$D/messages.yml"
hv=$(docker run --rm --entrypoint sha256sum -v "$V":/data:ro "$IMG" /data/messages.yml | cut -d' ' -f1)
[ "$hv" = "$h" ] || stop "empreinte du volume ($hv) différente de la sauvegarde ($h)"
echo "volume $V semé : sha256 $hv"
rm -f -- "$0"
echo "ÉTAPE 1 OK"
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Acte 2026-10-26-persistance-messages — étape 2, sur sonic, sous yvv, en arrière-plan.
# Relève toutes les 5 s le fichier de messages de l'ancien conteneur, jusqu'à ce
# que le déploiement le remplace (ou 30 min au plus). Lectures seulement, sauf
# l'écriture de la relève dans le dossier de sauvegarde.
# Lancement : ssh yvv@161.97.174.60 'setsid nohup bash /tmp/lb-veille.sh >/tmp/lb-veille.log 2>&1 &' </dev/null
set -uo pipefail
C=lpk-librodrome-main-app-1
D="$HOME/librodrome-sauvegardes/2026-10-26"
[ -s "$D/ancien-conteneur.id" ] || { echo "ARRÊT : étape 1 non jouée"; exit 1; }
old=$(cat "$D/ancien-conteneur.id")
umask 077
i=0
while [ "$(docker inspect -f '{{.Id}}' "$C" 2>/dev/null)" = "$old" ] && [ "$i" -lt 360 ]; do
# par l'identifiant : après la bascule, le nom désigne déjà le nouveau conteneur
if docker exec "$old" cat /app/data/messages.yml > "$D/.releve.tmp" 2>/dev/null && [ -s "$D/.releve.tmp" ]; then
mv "$D/.releve.tmp" "$D/messages-derniere-releve.yml"
date -u +%FT%TZ > "$D/derniere-releve.date"
fi
i=$((i + 1))
sleep 5
done
rm -f "$D/.releve.tmp"
if [ "$i" -ge 360 ]; then
echo "FIN SANS BASCULE : 30 min écoulées, l'ancien conteneur tourne toujours"
else
date -u +%FT%TZ > "$D/veille.fin"
echo "ancien conteneur remplacé, constaté à $(cat "$D/veille.fin")"
fi
rm -f -- "$0"
+11 -11
View File
@@ -1,29 +1,29 @@
export default defineAppConfig({ export default defineAppConfig({
site: { site: {
name: 'Le Librodrome', name: 'Le Librodrome',
description: 'Une économie du don — enfin concevable. Un livre et 9 chansons, lecture guidée et écoute libre.', description: 'Une économie du don — enfin concevable. Un livre et des chansons, lecture guidée et écoute libre.',
url: 'https://librodrome.org', url: 'https://librodrome.org',
}, },
header: { header: {
height: '4rem', height: '4rem',
nav: [
{ label: 'Accueil', to: '/' },
{ label: 'Lire', to: '/lire' },
{ label: 'Écouter', to: '/ecouter' },
{ label: 'À propos', to: '/a-propos' },
],
}, },
footer: { footer: {
credits: '© 2026 Le Librodrome — Production collective', credits: '© 2026 Le Librodrome — Productions collectives',
links: [ links: [
{ label: 'Mentions légales', to: '/mentions-legales' }, { label: 'Mentions légales', to: '/mentions-legales' },
], ],
}, },
gratewizard: { gratewizard: {
url: '/gratewizard-app/', url: import.meta.dev ? 'http://localhost:3001' : 'https://gratewizard.axiom-team.fr',
popup: { popup: {
width: 420, width: 480,
height: 720, height: 860,
}, },
}, },
libredecision: {
url: 'https://decision.librodrome.org',
},
sejeteral0: {
url: 'https://collectivites.librodrome.org',
},
}) })
+55 -7
View File
@@ -14,15 +14,63 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const { data: site } = await useSiteContent() const paletteStore = usePaletteStore()
onMounted(() => paletteStore.applyToDOM())
const config = useRuntimeConfig()
const siteUrl = (config.public.siteUrl as string) || 'https://librodrome.org'
// Global SEO defaults — surchargeables page par page via useSeoPage()
useHead({ useHead({
titleTemplate: (title) => { titleTemplate: (title) => title ? `${title} — Le Librodrome` : 'Le Librodrome',
const siteName = site.value?.identity.name ?? 'Le Librodrome' })
return title ? `${title} — ${siteName}` : siteName
}, useSeoMeta({
meta: [ ogSiteName: 'Le Librodrome',
{ name: 'description', content: site.value?.identity.description ?? '' }, ogType: 'website',
ogLocale: 'fr_FR',
ogImage: `${siteUrl}/og-default.png?v=3`,
ogImageWidth: 1200,
ogImageHeight: 630,
twitterCard: 'summary_large_image',
twitterSite: '@librodrome',
})
// JSON-LD — Organisation + Livre
useHead({
script: [
{
type: 'application/ld+json',
innerHTML: JSON.stringify({
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'Organization',
'@id': `${siteUrl}/#organization`,
name: 'Le Librodrome',
url: siteUrl,
logo: {
'@type': 'ImageObject',
url: `${siteUrl}/og-default.png?v=3`,
},
description: 'Plateforme d\'autonomie numérique, économique et citoyenne à l\'échelle des bassins de vie.',
},
{
'@type': 'Book',
'@id': `${siteUrl}/economique/modele-eco#book`,
name: 'Une économie du don — enfin concevable',
author: { '@type': 'Person', name: 'Yvv' },
publisher: { '@id': `${siteUrl}/#organization` },
isbn: '979-1-042-45206-3',
inLanguage: 'fr',
image: `${siteUrl}/images/Couv-Economie-du-don.jpg`,
url: `${siteUrl}/economique/modele-eco`,
description: 'Un livre et 9 chansons pour explorer les fondements d\'une économie fondée sur le don.',
license: 'https://creativecommons.org/licenses/by-nc/4.0/',
},
],
}),
},
], ],
}) })
</script> </script>
+2 -2
View File
@@ -60,10 +60,10 @@
@keyframes glow-pulse { @keyframes glow-pulse {
0%, 100% { 0%, 100% {
box-shadow: 0 0 8px hsl(12 76% 48% / 0.3); box-shadow: 0 0 8px hsl(var(--color-primary) / 0.3);
} }
50% { 50% {
box-shadow: 0 0 24px hsl(12 76% 48% / 0.6); box-shadow: 0 0 24px hsl(var(--color-primary) / 0.6);
} }
} }
+3 -3
View File
@@ -2,13 +2,13 @@
/* This file provides fallback and utility classes */ /* This file provides fallback and utility classes */
.font-display { .font-display {
font-family: 'Syne', system-ui, sans-serif; font-family: var(--font-display);
} }
.font-sans { .font-sans {
font-family: 'Space Grotesk', system-ui, sans-serif; font-family: var(--font-sans);
} }
.font-mono { .font-mono {
font-family: 'JetBrains Mono', ui-monospace, monospace; font-family: var(--font-mono);
} }
+158 -10
View File
@@ -3,26 +3,45 @@
@import './typography.css'; @import './typography.css';
:root { :root {
--color-primary: 12 76% 48%; --color-primary: 18 80% 45%;
--color-accent: 36 80% 52%; --color-accent: 32 85% 50%;
--color-bg: 20 8% 3.5%; --color-bg: 215 8% 22%;
--color-surface: 20 8% 8%; --color-surface: 213 7% 27%;
--color-surface-light: 20 8% 13%; --color-surface-light: 210 6% 32%;
--color-text: 0 0% 100%; --color-text: 0 0% 100%;
--color-text-muted: 0 0% 100% / 0.6; --color-text-muted: 0 0% 65%;
--header-height: 4rem; --header-height: 4rem;
--player-height: 5rem; --player-height: 0rem;
--sidebar-width: 280px; --sidebar-width: 280px;
--font-display: 'Syne', sans-serif; --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
--font-sans: 'Space Grotesk', sans-serif; --font-sans: 'Public Sans', system-ui, sans-serif;
--font-logo: 'Syne', sans-serif;
/* One hue per axis — overridden by each palette (stores/palette.ts) */
--axis-num: 198 70% 30%;
--axis-eco: 24 88% 42%;
--axis-cit: 150 45% 28%;
--font-mono: 'JetBrains Mono', monospace; --font-mono: 'JetBrains Mono', monospace;
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1); --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
} }
/* A page whose birds may stand behind a card (UiOiseauPose, pose « derriere »):
the stacking context they go back into, above the page background */
.oiseaux-scene {
isolation: isolate;
}
/* Fader level of the home console — registered so it can transition smoothly */
@property --level {
syntax: '<number>';
inherits: true;
initial-value: 0;
}
*, *,
*::before, *::before,
*::after { *::after {
@@ -43,9 +62,22 @@ body {
min-height: 100dvh; min-height: 100dvh;
} }
button {
border: none;
background: none;
cursor: pointer;
font: inherit;
color: inherit;
}
a {
text-decoration: none;
color: inherit;
}
::selection { ::selection {
background-color: hsl(var(--color-primary) / 0.3); background-color: hsl(var(--color-primary) / 0.3);
color: white; color: hsl(var(--color-text));
} }
:focus-visible { :focus-visible {
@@ -72,6 +104,122 @@ body {
background: hsl(var(--color-text) / 0.25); background: hsl(var(--color-text) / 0.25);
} }
/* ═══ Axis scopes — each axis page takes its own hue as primary ═══ */
.axis-scope--num { --color-primary: var(--axis-num); }
.axis-scope--eco { --color-primary: var(--axis-eco); }
.axis-scope--cit { --color-primary: var(--axis-cit); }
/* ═══ Light mode overrides ═══ */
.palette-light {
color-scheme: light;
}
/* Force all white text → adaptive text color in light mode.
Using !important to override scoped component styles and UnoCSS utilities. */
.palette-light,
.palette-light .text-white {
color: hsl(var(--color-text)) !important;
}
/* white with opacity → dark text with boosted opacity for punch */
.palette-light .text-white\/20 { color: hsl(var(--color-text) / 0.28) !important; }
.palette-light .text-white\/30 { color: hsl(var(--color-text) / 0.38) !important; }
.palette-light .text-white\/40 { color: hsl(var(--color-text) / 0.48) !important; }
.palette-light .text-white\/45 { color: hsl(var(--color-text) / 0.52) !important; }
.palette-light .text-white\/50 { color: hsl(var(--color-text) / 0.58) !important; }
.palette-light .text-white\/60 { color: hsl(var(--color-text) / 0.68) !important; }
.palette-light .text-white\/65 { color: hsl(var(--color-text) / 0.73) !important; }
.palette-light .text-white\/70 { color: hsl(var(--color-text) / 0.78) !important; }
.palette-light .text-white\/55 { color: hsl(var(--color-text) / 0.63) !important; }
.palette-light .text-white\/75 { color: hsl(var(--color-text) / 0.83) !important; }
.palette-light .text-white\/80 { color: hsl(var(--color-text) / 0.88) !important; }
.palette-light .text-white\/85 { color: hsl(var(--color-text) / 0.92) !important; }
.palette-light .text-white\/90 { color: hsl(var(--color-text) / 0.95) !important; }
/* white backgrounds → surface tones with more contrast */
.palette-light .bg-white\/5 { background-color: hsl(var(--color-primary) / 0.05) !important; }
.palette-light .bg-white\/8 { background-color: hsl(var(--color-primary) / 0.07) !important; }
.palette-light .bg-white\/10 { background-color: hsl(var(--color-primary) / 0.09) !important; }
/* borders with primary tint */
.palette-light .border-white\/8 { border-color: hsl(var(--color-primary) / 0.15) !important; }
/* hover overrides */
.palette-light .hover\:text-white:hover,
.palette-light .hover\:text-white\/70:hover,
.palette-light .hover\:text-white\/80:hover {
color: hsl(var(--color-text)) !important;
}
.palette-light .hover\:text-white\/60:hover {
color: hsl(var(--color-text) / 0.7) !important;
}
.palette-light .hover\:bg-white\/5:hover {
background-color: hsl(var(--color-primary) / 0.08) !important;
}
.palette-light .hover\:bg-white\/10:hover {
background-color: hsl(var(--color-primary) / 0.12) !important;
}
/* group-hover overrides */
.palette-light .group:hover .group-hover\:text-primary\/60 {
color: hsl(var(--color-primary) / 0.7) !important;
}
/* placeholder overrides */
.palette-light .placeholder\:text-white\/30::placeholder {
color: hsl(var(--color-text) / 0.35) !important;
}
/* Prose/content in light mode */
.palette-light .prose { color: hsl(var(--color-text)); }
.palette-light .prose :where(h1,h2,h3,h4,h5,h6) { color: hsl(var(--color-text)); }
/* text-gradient — solid primary color everywhere */
/* card surfaces — subtle shadow for depth */
.palette-light .card-surface {
background: hsl(var(--color-surface)) !important;
border-color: hsl(var(--color-primary) / 0.12) !important;
box-shadow: 0 1px 3px hsl(var(--color-text) / 0.06);
}
/* btn-primary text stays white on colored bg */
.palette-light .btn-primary {
color: white !important;
}
/* input fields — cleaner contrast */
.palette-light input,
.palette-light textarea {
color: hsl(var(--color-text));
background-color: white;
border-color: hsl(var(--color-text) / 0.18);
}
.palette-light input:focus,
.palette-light textarea:focus {
border-color: hsl(var(--color-primary) / 0.5);
box-shadow: 0 0 0 3px hsl(var(--color-primary) / 0.1);
}
/* Ecouter view toggle buttons */
.palette-light .bg-white\/10 {
background-color: hsl(var(--color-primary) / 0.1) !important;
}
/* Light mode scrollbar — tinted with primary */
.palette-light ::-webkit-scrollbar-thumb {
background: hsl(var(--color-primary) / 0.2);
}
.palette-light ::-webkit-scrollbar-thumb:hover {
background: hsl(var(--color-primary) / 0.35);
}
/* Light mode selection — vivid */
.palette-light ::selection {
background-color: hsl(var(--color-accent) / 0.25);
}
/* Page transitions */ /* Page transitions */
.page-enter-active, .page-enter-active,
.page-leave-active { .page-leave-active {
+25 -25
View File
@@ -3,7 +3,7 @@
font-family: var(--font-sans); font-family: var(--font-sans);
font-size: 1.125rem; font-size: 1.125rem;
line-height: 1.8; line-height: 1.8;
color: hsl(0 0% 100% / 0.90); color: hsl(var(--color-text) / 0.90);
max-width: 65ch; max-width: 65ch;
} }
@@ -13,11 +13,11 @@
font-weight: 800; font-weight: 800;
line-height: 1.25; line-height: 1.25;
letter-spacing: -0.02em; letter-spacing: -0.02em;
color: white; color: hsl(var(--color-text));
margin-top: 0; margin-top: 0;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
border-bottom: 2px solid hsl(12 76% 48% / 0.4); border-bottom: 2px solid hsl(var(--color-primary) / 0.4);
} }
.prose h2 { .prose h2 {
@@ -26,11 +26,11 @@
font-weight: 700; font-weight: 700;
line-height: 1.3; line-height: 1.3;
letter-spacing: -0.01em; letter-spacing: -0.01em;
color: white; color: hsl(var(--color-text));
margin-top: 3.5rem; margin-top: 3.5rem;
margin-bottom: 1rem; margin-bottom: 1rem;
padding-left: 0.75rem; padding-left: 0.75rem;
border-left: 3px solid hsl(12 76% 48% / 0.5); border-left: 3px solid hsl(var(--color-primary) / 0.5);
} }
.prose h3 { .prose h3 {
@@ -38,7 +38,7 @@
font-size: clamp(1.25rem, 3vw, 1.625rem); font-size: clamp(1.25rem, 3vw, 1.625rem);
font-weight: 600; font-weight: 600;
line-height: 1.4; line-height: 1.4;
color: hsl(0 0% 100% / 0.92); color: hsl(var(--color-text) / 0.92);
margin-top: 3rem; margin-top: 3rem;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
@@ -49,7 +49,7 @@
width: 0.5rem; width: 0.5rem;
height: 0.5rem; height: 0.5rem;
border-radius: 50%; border-radius: 50%;
background: hsl(36 80% 52%); background: hsl(var(--color-accent));
margin-right: 0.625rem; margin-right: 0.625rem;
vertical-align: middle; vertical-align: middle;
position: relative; position: relative;
@@ -61,7 +61,7 @@
font-size: clamp(1.065rem, 2.5vw, 1.25rem); font-size: clamp(1.065rem, 2.5vw, 1.25rem);
font-weight: 600; font-weight: 600;
line-height: 1.45; line-height: 1.45;
color: hsl(0 0% 100% / 0.85); color: hsl(var(--color-text) / 0.85);
margin-top: 2.5rem; margin-top: 2.5rem;
margin-bottom: 0.625rem; margin-bottom: 0.625rem;
} }
@@ -69,7 +69,7 @@
.prose h4::before { .prose h4::before {
content: '//'; content: '//';
font-family: var(--font-mono); font-family: var(--font-mono);
color: hsl(36 80% 52%); color: hsl(var(--color-accent));
margin-right: 0.5rem; margin-right: 0.5rem;
font-weight: 500; font-weight: 500;
} }
@@ -78,7 +78,7 @@
.prose h2 + p, .prose h2 + p,
.prose h3 + p { .prose h3 + p {
font-size: 1.175rem; font-size: 1.175rem;
color: hsl(0 0% 100% / 0.75); color: hsl(var(--color-text) / 0.75);
line-height: 1.85; line-height: 1.85;
} }
@@ -88,25 +88,25 @@
} }
.prose a { .prose a {
color: hsl(12 76% 68%); color: hsl(var(--color-primary) / 0.85);
text-decoration: underline; text-decoration: underline;
text-decoration-color: hsl(12 76% 58% / 0.3); text-decoration-color: hsl(var(--color-primary) / 0.3);
text-underline-offset: 3px; text-underline-offset: 3px;
transition: text-decoration-color 0.2s; transition: text-decoration-color 0.2s;
} }
.prose a:hover { .prose a:hover {
text-decoration-color: hsl(12 76% 58%); text-decoration-color: hsl(var(--color-primary));
} }
.prose blockquote { .prose blockquote {
margin: 2rem 0; margin: 2rem 0;
padding: 1rem 1.5rem; padding: 1rem 1.5rem;
border-left: 3px solid hsl(12 76% 58%); border-left: 3px solid hsl(var(--color-primary));
background: hsl(240 10% 8%); background: hsl(var(--color-surface));
border-radius: 0 0.5rem 0.5rem 0; border-radius: 0 0.5rem 0.5rem 0;
font-style: italic; font-style: italic;
color: hsl(0 0% 100% / 0.75); color: hsl(var(--color-text) / 0.75);
} }
.prose blockquote p:last-child { .prose blockquote p:last-child {
@@ -116,17 +116,17 @@
.prose code { .prose code {
font-family: var(--font-mono); font-family: var(--font-mono);
font-size: 0.875em; font-size: 0.875em;
background: hsl(240 10% 12%); background: hsl(var(--color-surface-light));
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
border-radius: 0.25rem; border-radius: 0.25rem;
color: hsl(31 97% 66%); color: hsl(var(--color-accent));
} }
.prose pre { .prose pre {
margin: 2rem 0; margin: 2rem 0;
padding: 1.5rem; padding: 1.5rem;
background: hsl(240 10% 6%); background: hsl(var(--color-bg));
border: 1px solid hsl(0 0% 100% / 0.08); border: 1px solid hsl(var(--color-text) / 0.08);
border-radius: 0.75rem; border-radius: 0.75rem;
overflow-x: auto; overflow-x: auto;
} }
@@ -134,7 +134,7 @@
.prose pre code { .prose pre code {
background: none; background: none;
padding: 0; padding: 0;
color: hsl(0 0% 100% / 0.87); color: hsl(var(--color-text) / 0.87);
} }
.prose ul, .prose ul,
@@ -149,22 +149,22 @@
} }
.prose li::marker { .prose li::marker {
color: hsl(12 76% 58%); color: hsl(var(--color-primary));
} }
.prose hr { .prose hr {
margin: 3rem 0; margin: 3rem 0;
border: none; border: none;
border-top: 1px solid hsl(0 0% 100% / 0.1); border-top: 1px solid hsl(var(--color-text) / 0.1);
} }
.prose strong { .prose strong {
color: white; color: hsl(var(--color-text));
font-weight: 600; font-weight: 600;
} }
.prose em { .prose em {
color: hsl(0 0% 100% / 0.9); color: hsl(var(--color-text) / 0.9);
} }
.prose img { .prose img {
+7 -7
View File
@@ -58,7 +58,7 @@ function addItem() {
.field-label { .field-label {
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 500; font-weight: 500;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
} }
.list-item { .list-item {
@@ -66,9 +66,9 @@ function addItem() {
align-items: flex-start; align-items: flex-start;
gap: 0.5rem; gap: 0.5rem;
padding: 0.5rem; padding: 0.5rem;
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
background: hsl(20 8% 5%); background: hsl(var(--color-bg));
} }
.list-item > :deep(*:first-child) { .list-item > :deep(*:first-child) {
@@ -101,9 +101,9 @@ function addItem() {
gap: 0.375rem; gap: 0.375rem;
padding: 0.375rem 0.75rem; padding: 0.375rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: 1px dashed hsl(20 8% 22%); border: 1px dashed hsl(var(--color-surface-light));
background: none; background: none;
color: hsl(20 8% 50%); color: hsl(var(--color-text-muted));
font-size: 0.8rem; font-size: 0.8rem;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
@@ -111,7 +111,7 @@ function addItem() {
} }
.list-add:hover { .list-add:hover {
border-color: hsl(12 76% 48% / 0.4); border-color: hsl(var(--color-primary) / 0.4);
color: hsl(12 76% 68%); color: hsl(var(--color-primary));
} }
</style> </style>
+5 -5
View File
@@ -36,21 +36,21 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-'
.field-label { .field-label {
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 500; font-weight: 500;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
} }
.field-input { .field-input {
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.875rem; font-size: 0.875rem;
transition: border-color 0.2s; transition: border-color 0.2s;
} }
.field-input:focus { .field-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
</style> </style>
+5 -5
View File
@@ -37,15 +37,15 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-'
.field-label { .field-label {
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 500; font-weight: 500;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
} }
.field-textarea { .field-textarea {
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.875rem; font-size: 0.875rem;
resize: vertical; resize: vertical;
min-height: 5rem; min-height: 5rem;
@@ -55,6 +55,6 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-'
.field-textarea:focus { .field-textarea:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
</style> </style>
+4 -4
View File
@@ -19,7 +19,7 @@ defineProps<{
<style scoped> <style scoped>
.admin-section { .admin-section {
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.75rem; border-radius: 0.75rem;
overflow: hidden; overflow: hidden;
margin-bottom: 1rem; margin-bottom: 1rem;
@@ -32,14 +32,14 @@ defineProps<{
padding: 0.75rem 1rem; padding: 0.75rem 1rem;
font-weight: 600; font-weight: 600;
font-size: 0.9rem; font-size: 0.9rem;
color: white; color: hsl(var(--color-text));
cursor: pointer; cursor: pointer;
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
user-select: none; user-select: none;
} }
.admin-section-header:hover { .admin-section-header:hover {
background: hsl(20 8% 8%); background: hsl(var(--color-surface));
} }
.admin-section[open] .section-arrow { .admin-section[open] .section-arrow {
+124 -40
View File
@@ -1,34 +1,57 @@
<template> <template>
<div class="md-editor"> <div class="md-editor">
<div class="md-tabs"> <div class="md-toolbar">
<div class="md-tabs">
<button
class="md-tab"
:class="{ 'md-tab--active': tab === 'edit' }"
@click="tab = 'edit'"
>
<div class="i-lucide-pencil h-3.5 w-3.5" />
Édition
</button>
<button
class="md-tab"
:class="{ 'md-tab--active': tab === 'split' }"
@click="tab = 'split'"
>
<div class="i-lucide-columns-2 h-3.5 w-3.5" />
Split
</button>
<button
class="md-tab"
:class="{ 'md-tab--active': tab === 'preview' }"
@click="tab = 'preview'"
>
<div class="i-lucide-eye h-3.5 w-3.5" />
Aperçu
</button>
</div>
<button <button
class="md-tab" class="md-fullscreen"
:class="{ 'md-tab--active': tab === 'edit' }" :class="{ 'md-fullscreen--active': fullscreen }"
@click="tab = 'edit'" @click="fullscreen = !fullscreen"
> >
Édition <div :class="fullscreen ? 'i-lucide-minimize-2' : 'i-lucide-maximize-2'" class="h-3.5 w-3.5" />
</button>
<button
class="md-tab"
:class="{ 'md-tab--active': tab === 'preview' }"
@click="tab = 'preview'"
>
Aperçu
</button> </button>
</div> </div>
<textarea <div class="md-body" :class="{ 'md-body--split': tab === 'split', 'md-body--fullscreen': fullscreen }">
v-if="tab === 'edit'" <textarea
:value="modelValue" v-if="tab === 'edit' || tab === 'split'"
class="md-textarea" ref="textareaRef"
:rows="rows" :value="modelValue"
@input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement).value)" class="md-textarea"
/> :rows="rows"
<div @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement).value)"
v-else @keydown.tab.prevent="insertTab"
class="md-preview prose" />
v-html="renderedHtml" <div
/> v-if="tab === 'preview' || tab === 'split'"
class="md-preview prose"
v-html="renderedHtml"
/>
</div>
</div> </div>
</template> </template>
@@ -38,64 +61,123 @@ const props = defineProps<{
rows?: number rows?: number
}>() }>()
defineEmits<{ const emit = defineEmits<{
'update:modelValue': [value: string] 'update:modelValue': [value: string]
}>() }>()
const tab = ref<'edit' | 'preview'>('edit') const tab = ref<'edit' | 'preview' | 'split'>('split')
const fullscreen = ref(false)
const textareaRef = ref<HTMLTextAreaElement>()
function insertTab(e: KeyboardEvent) {
const ta = e.target as HTMLTextAreaElement
const start = ta.selectionStart
const end = ta.selectionEnd
const val = ta.value
const newVal = val.substring(0, start) + ' ' + val.substring(end)
emit('update:modelValue', newVal)
nextTick(() => {
ta.selectionStart = ta.selectionEnd = start + 2
})
}
const renderedHtml = computed(() => { const renderedHtml = computed(() => {
// Simple markdown rendering for preview
return props.modelValue return props.modelValue
.replace(/^> (.+)$/gm, '<blockquote>$1</blockquote>')
.replace(/^### (.+)$/gm, '<h3>$1</h3>') .replace(/^### (.+)$/gm, '<h3>$1</h3>')
.replace(/^## (.+)$/gm, '<h2>$1</h2>') .replace(/^## (.+)$/gm, '<h2>$1</h2>')
.replace(/^# (.+)$/gm, '<h1>$1</h1>') .replace(/^# (.+)$/gm, '<h1>$1</h1>')
.replace(/^- (.+)$/gm, '<li>$1</li>')
.replace(/(<li>.*<\/li>\n?)+/g, '<ul>$&</ul>')
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>') .replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
.replace(/\*(.+?)\*/g, '<em>$1</em>') .replace(/\*(.+?)\*/g, '<em>$1</em>')
.replace(/\n\n/g, '</p><p>') .replace(/\n\n/g, '</p><p>')
.replace(/^(?!<[hp])(.+)/gm, '<p>$1</p>') .replace(/^(?!<[hpulob])(.+)/gm, '<p>$1</p>')
}) })
</script> </script>
<style scoped> <style scoped>
.md-editor { .md-editor {
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
overflow: hidden; overflow: hidden;
} }
.md-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
background: hsl(var(--color-bg));
border-bottom: 1px solid hsl(var(--color-surface-light));
}
.md-tabs { .md-tabs {
display: flex; display: flex;
background: hsl(20 8% 6%);
border-bottom: 1px solid hsl(20 8% 14%);
} }
.md-tab { .md-tab {
padding: 0.5rem 1rem; display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.5rem 0.875rem;
border: none; border: none;
background: none; background: none;
color: hsl(20 8% 50%); color: hsl(var(--color-text-muted));
font-size: 0.8rem; font-size: 0.8rem;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
} }
.md-tab--active { .md-tab--active {
color: white; color: hsl(var(--color-text));
background: hsl(20 8% 10%); background: hsl(var(--color-surface));
}
.md-fullscreen {
padding: 0.5rem 0.75rem;
color: hsl(var(--color-text-muted));
transition: color 0.2s;
}
.md-fullscreen:hover,
.md-fullscreen--active { color: hsl(var(--color-text)); }
.md-body {
display: flex;
}
.md-body--split .md-textarea,
.md-body--split .md-preview {
width: 50%;
}
.md-body--split .md-preview {
border-left: 1px solid hsl(var(--color-surface-light));
}
.md-body--fullscreen {
position: fixed;
inset: 0;
z-index: 50;
background: hsl(var(--color-bg));
}
.md-body--fullscreen .md-textarea,
.md-body--fullscreen .md-preview {
height: 100vh;
} }
.md-textarea { .md-textarea {
width: 100%; width: 100%;
padding: 1rem; padding: 1rem;
border: none; border: none;
background: hsl(20 8% 4%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
font-size: 0.85rem; font-size: 0.85rem;
line-height: 1.7; line-height: 1.7;
resize: vertical; resize: vertical;
min-height: 20rem; min-height: 24rem;
tab-size: 2;
} }
.md-textarea:focus { .md-textarea:focus {
@@ -104,7 +186,9 @@ const renderedHtml = computed(() => {
.md-preview { .md-preview {
padding: 1rem; padding: 1rem;
min-height: 20rem; min-height: 24rem;
background: hsl(20 8% 4%); max-height: 70vh;
overflow-y: auto;
background: hsl(var(--color-bg));
} }
</style> </style>
+16 -16
View File
@@ -102,18 +102,18 @@ function formatSize(bytes: number): string {
.filter-btn { .filter-btn {
padding: 0.25rem 0.625rem; padding: 0.25rem 0.625rem;
border-radius: 9999px; border-radius: 9999px;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: none; background: none;
color: hsl(20 8% 55%); color: hsl(var(--color-text-muted));
font-size: 0.75rem; font-size: 0.75rem;
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
} }
.filter-btn--active { .filter-btn--active {
background: hsl(12 76% 48% / 0.15); background: hsl(var(--color-primary) / 0.15);
border-color: hsl(12 76% 48% / 0.3); border-color: hsl(var(--color-primary) / 0.3);
color: hsl(12 76% 68%); color: hsl(var(--color-primary));
} }
.media-grid { .media-grid {
@@ -123,7 +123,7 @@ function formatSize(bytes: number): string {
} }
.media-card { .media-card {
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
@@ -131,18 +131,18 @@ function formatSize(bytes: number): string {
} }
.media-card:hover { .media-card:hover {
border-color: hsl(20 8% 22%); border-color: hsl(var(--color-surface-light));
} }
.media-card--selected { .media-card--selected {
border-color: hsl(12 76% 48%); border-color: hsl(var(--color-primary));
box-shadow: 0 0 0 1px hsl(12 76% 48% / 0.3); box-shadow: 0 0 0 1px hsl(var(--color-primary) / 0.3);
} }
.media-thumb { .media-thumb {
aspect-ratio: 1; aspect-ratio: 1;
overflow: hidden; overflow: hidden;
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
} }
.media-thumb img { .media-thumb img {
@@ -156,8 +156,8 @@ function formatSize(bytes: number): string {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
} }
.media-info { .media-info {
@@ -169,7 +169,7 @@ function formatSize(bytes: number): string {
.media-name { .media-name {
font-size: 0.72rem; font-size: 0.72rem;
color: white; color: hsl(var(--color-text));
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -177,7 +177,7 @@ function formatSize(bytes: number): string {
.media-size { .media-size {
font-size: 0.65rem; font-size: 0.65rem;
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
} }
.media-actions { .media-actions {
@@ -186,9 +186,9 @@ function formatSize(bytes: number): string {
justify-content: space-between; justify-content: space-between;
margin-top: 1rem; margin-top: 1rem;
padding: 0.75rem; padding: 0.75rem;
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
background: hsl(20 8% 5%); background: hsl(var(--color-bg));
} }
.delete-btn { .delete-btn {
+5 -5
View File
@@ -73,7 +73,7 @@ async function upload(files: FileList) {
<style scoped> <style scoped>
.upload-zone { .upload-zone {
border: 2px dashed hsl(20 8% 22%); border: 2px dashed hsl(var(--color-surface-light));
border-radius: 0.75rem; border-radius: 0.75rem;
padding: 2rem; padding: 2rem;
text-align: center; text-align: center;
@@ -82,12 +82,12 @@ async function upload(files: FileList) {
} }
.upload-zone:hover { .upload-zone:hover {
border-color: hsl(12 76% 48% / 0.4); border-color: hsl(var(--color-primary) / 0.4);
} }
.upload-zone--active { .upload-zone--active {
border-color: hsl(12 76% 48%); border-color: hsl(var(--color-primary));
background: hsl(12 76% 48% / 0.05); background: hsl(var(--color-primary) / 0.05);
} }
.upload-progress { .upload-progress {
@@ -95,7 +95,7 @@ async function upload(files: FileList) {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
color: hsl(20 8% 55%); color: hsl(var(--color-text-muted));
font-size: 0.85rem; font-size: 0.85rem;
} }
+2 -2
View File
@@ -31,7 +31,7 @@ defineEmits<{
padding: 0.625rem 1.25rem; padding: 0.625rem 1.25rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: none; border: none;
background: hsl(12 76% 48%); background: hsl(var(--color-primary));
color: white; color: white;
font-weight: 600; font-weight: 600;
font-size: 0.85rem; font-size: 0.85rem;
@@ -40,7 +40,7 @@ defineEmits<{
} }
.save-btn:hover:not(:disabled) { .save-btn:hover:not(:disabled) {
background: hsl(12 76% 42%); background: hsl(var(--color-primary));
} }
.save-btn:disabled { .save-btn:disabled {
+28 -16
View File
@@ -23,21 +23,33 @@
</NuxtLink> </NuxtLink>
<p class="sidebar-section">Pages</p> <p class="sidebar-section">Pages</p>
<NuxtLink to="/admin/pages" class="sidebar-link" exact-active-class="sidebar-link--active">
<div class="i-lucide-file-text h-4 w-4" />
Toutes les pages
</NuxtLink>
<NuxtLink to="/admin/pages/home" class="sidebar-link" active-class="sidebar-link--active"> <NuxtLink to="/admin/pages/home" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-home h-4 w-4" /> <div class="i-lucide-home h-4 w-4" />
Accueil Accueil
</NuxtLink> </NuxtLink>
<NuxtLink to="/admin/pages/lire" class="sidebar-link" active-class="sidebar-link--active"> <NuxtLink to="/admin/pages/numerique" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-book-open h-4 w-4" /> <div class="i-lucide-monitor h-4 w-4" />
Lire Numérique
</NuxtLink> </NuxtLink>
<NuxtLink to="/admin/pages/ecouter" class="sidebar-link" active-class="sidebar-link--active"> <NuxtLink to="/admin/pages/economique" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-coins h-4 w-4" />
Économique
</NuxtLink>
<NuxtLink to="/admin/pages/citoyenne" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-landmark h-4 w-4" />
Citoyenne
</NuxtLink>
<NuxtLink to="/admin/pages/en-musique" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-headphones h-4 w-4" /> <div class="i-lucide-headphones h-4 w-4" />
Écouter En musique
</NuxtLink> </NuxtLink>
<NuxtLink to="/admin/pages/gratewizard" class="sidebar-link" active-class="sidebar-link--active"> <NuxtLink to="/admin/pages/gratewizard" class="sidebar-link" active-class="sidebar-link--active">
<div class="i-lucide-sparkles h-4 w-4" /> <div class="i-lucide-sparkles h-4 w-4" />
GrateWizard grateWizard
</NuxtLink> </NuxtLink>
<p class="sidebar-section">Livre</p> <p class="sidebar-section">Livre</p>
@@ -79,8 +91,8 @@ async function logout() {
<style scoped> <style scoped>
.admin-sidebar { .admin-sidebar {
background: hsl(20 8% 5%); background: hsl(var(--color-bg));
border-right: 1px solid hsl(20 8% 14%); border-right: 1px solid hsl(var(--color-surface-light));
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100dvh; height: 100dvh;
@@ -90,7 +102,7 @@ async function logout() {
.sidebar-header { .sidebar-header {
padding: 1.25rem 1rem; padding: 1.25rem 1rem;
border-bottom: 1px solid hsl(20 8% 14%); border-bottom: 1px solid hsl(var(--color-surface-light));
} }
.sidebar-nav { .sidebar-nav {
@@ -104,7 +116,7 @@ async function logout() {
font-weight: 700; font-weight: 700;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.1em; letter-spacing: 0.1em;
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
padding: 1rem 0.75rem 0.375rem; padding: 1rem 0.75rem 0.375rem;
margin: 0; margin: 0;
} }
@@ -116,7 +128,7 @@ async function logout() {
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
font-size: 0.85rem; font-size: 0.85rem;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
text-decoration: none; text-decoration: none;
transition: all 0.2s; transition: all 0.2s;
border: none; border: none;
@@ -126,18 +138,18 @@ async function logout() {
} }
.sidebar-link:hover { .sidebar-link:hover {
background: hsl(20 8% 10%); background: hsl(var(--color-surface));
color: white; color: hsl(var(--color-text));
} }
.sidebar-link--active { .sidebar-link--active {
background: hsl(12 76% 48% / 0.12); background: hsl(var(--color-primary) / 0.12);
color: hsl(12 76% 68%); color: hsl(var(--color-primary));
} }
.sidebar-footer { .sidebar-footer {
padding: 0.5rem; padding: 0.5rem;
border-top: 1px solid hsl(20 8% 14%); border-top: 1px solid hsl(var(--color-surface-light));
} }
@media (max-width: 768px) { @media (max-width: 768px) {
+33
View File
@@ -0,0 +1,33 @@
<template>
<div class="mt-8 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:gap-4">
<UiBaseButton @click="$emit('open-player')">
<div class="i-lucide-play mr-2 h-5 w-5" />
Présentation musicale
</UiBaseButton>
<UiBaseButton variant="accent" @click="$emit('open-pdf')">
<div class="i-lucide-book-open mr-2 h-5 w-5" />
Lire le livre
</UiBaseButton>
<UiBaseButton v-if="showChapters" variant="ghost" to="/economique/modele-eco">
<div class="i-lucide-list mr-2 h-5 w-5" />
Présentation des chapitres
</UiBaseButton>
<UiBaseButton variant="ghost" to="/economique/commande">
<div class="i-lucide-shopping-bag mr-2 h-5 w-5" />
Commandez le livre
</UiBaseButton>
</div>
</template>
<script setup lang="ts">
withDefaults(defineProps<{
showChapters?: boolean
}>(), {
showChapters: true,
})
defineEmits<{
'open-player': []
'open-pdf': []
}>()
</script>
+32 -24
View File
@@ -1,13 +1,12 @@
<template> <template>
<Teleport to="body"> <Teleport to="body">
<Transition name="pdf-overlay"> <div
<div v-if="isOpen"
v-if="isOpen" class="pdf-reader"
class="pdf-reader" @keydown.escape="close"
@keydown.escape="close" tabindex="0"
tabindex="0" ref="overlayRef"
ref="overlayRef" >
>
<!-- Top bar --> <!-- Top bar -->
<div class="pdf-bar"> <div class="pdf-bar">
<div class="pdf-bar-title"> <div class="pdf-bar-title">
@@ -22,38 +21,58 @@
<!-- PDF embed --> <!-- PDF embed -->
<div class="pdf-viewport"> <div class="pdf-viewport">
<iframe <iframe
:key="pdfUrl"
:src="pdfUrl" :src="pdfUrl"
class="pdf-frame" class="pdf-frame"
:title="bpContent?.pdf.iframeTitle" :title="bpContent?.pdf.iframeTitle"
ref="iframeRef"
@load="iframeRef?.focus()"
/> />
</div> </div>
</div> </div>
</Transition>
</Teleport> </Teleport>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = defineProps<{ modelValue: boolean }>() const props = defineProps<{ modelValue: boolean; page?: number }>()
const emit = defineEmits<{ 'update:modelValue': [value: boolean] }>() const emit = defineEmits<{ 'update:modelValue': [value: boolean] }>()
const { data: bpContent } = await usePageContent('book-player') const { data: bpContent } = await usePageContent('book-player')
const bookData = useBookData()
await bookData.init()
const { trackPdfOpen, trackPdfClose } = useTracking()
const overlayRef = ref<HTMLElement>() const overlayRef = ref<HTMLElement>()
const iframeRef = ref<HTMLIFrameElement>()
const isOpen = computed({ const isOpen = computed({
get: () => props.modelValue, get: () => props.modelValue,
set: (v) => emit('update:modelValue', v), set: (v) => emit('update:modelValue', v),
}) })
const pdfUrl = '/pdf/une-economie-du-don.pdf' const pdfUrl = computed(() => {
const base = bookData.getPdfUrl()
const viewerBase = `/pdfjs/viewer.html?file=${encodeURIComponent(base)}`
if (props.page) return `${viewerBase}#page=${props.page}`
return viewerBase
})
function close() { function close() {
isOpen.value = false isOpen.value = false
} }
// Tracking state
let pdfOpenedAt = 0
watch(isOpen, (open) => { watch(isOpen, (open) => {
if (open) { if (open) {
nextTick(() => overlayRef.value?.focus()) nextTick(() => overlayRef.value?.focus())
trackPdfOpen(props.page ? `chapter-p${props.page}` : 'direct')
pdfOpenedAt = Date.now()
}
else if (pdfOpenedAt > 0) {
trackPdfClose(0, Date.now() - pdfOpenedAt)
pdfOpenedAt = 0
} }
if (import.meta.client) { if (import.meta.client) {
document.body.style.overflow = open ? 'hidden' : '' document.body.style.overflow = open ? 'hidden' : ''
@@ -91,7 +110,7 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.625rem; gap: 0.625rem;
font-family: var(--font-display, 'Syne', sans-serif); font-family: var(--font-display);
font-size: 0.9rem; font-size: 0.9rem;
font-weight: 600; font-weight: 600;
color: white; color: white;
@@ -130,15 +149,4 @@ onUnmounted(() => {
background: white; background: white;
} }
/* Overlay transitions */
.pdf-overlay-enter-active {
animation: pdf-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pdf-overlay-leave-active {
animation: pdf-enter 0.3s cubic-bezier(0.7, 0, 0.84, 0) reverse both;
}
@keyframes pdf-enter {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
</style> </style>
+296 -372
View File
@@ -23,45 +23,8 @@
aria-hidden="true" aria-hidden="true"
/> />
<!-- Close --> <!-- ═══ READER ═══ -->
<button class="bp-close" @click="close" aria-label="Fermer"> <div class="bp-phase bp-reader">
<div class="i-lucide-x h-5 w-5" />
</button>
<!-- ═══ PHASE TRANSITIONS ═══ -->
<Transition name="phase" mode="out-in">
<!-- ─── INTRO: 3D spinning book ─── -->
<div v-if="phase === 'intro'" key="intro" class="bp-phase bp-intro">
<div class="spin-scene">
<div class="spin-book" @animationend="onSpinEnd">
<div class="spin-face spin-front">
<img src="/images/book-cover-spread.jpg" alt="Couverture" />
</div>
<div class="spin-face spin-back">
<img src="/images/book-cover-spread.jpg" alt="" />
</div>
</div>
</div>
</div>
<!-- ─── COVER: title + CTA ─── -->
<div v-else-if="phase === 'cover'" key="cover" class="bp-phase bp-cover">
<div class="cover-frame">
<img src="/images/book-cover-spread.jpg" :alt="bpContent?.cover.coverAlt ?? 'Couverture'" class="cover-img" />
</div>
<h1 class="cover-title text-gradient">{{ bpContent?.cover.title }}</h1>
<p class="cover-sub">{{ bpContent?.cover.subtitle }}</p>
<p class="cover-desc">
{{ bpContent?.cover.description }}
</p>
<button class="cover-cta" @click="startReading">
{{ bpContent?.cover.cta }}
<div class="i-lucide-arrow-right ml-2 h-5 w-5 inline-block align-middle" />
</button>
</div>
<!-- ─── READING: paginated book reader ─── -->
<div v-else key="reading" class="bp-phase bp-reader">
<!-- Top bar --> <!-- Top bar -->
<div class="reader-bar"> <div class="reader-bar">
<button <button
@@ -72,12 +35,13 @@
<div class="i-lucide-list h-5 w-5" /> <div class="i-lucide-list h-5 w-5" />
</button> </button>
<div class="reader-bar-title"> <div class="reader-bar-title">
<span class="reader-bar-num">{{ chapterIdx + 1 }}.</span> <span class="reader-bar-num">{{ trackIdx + 1 }}.</span>
{{ chapters[chapterIdx].title }} {{ currentTrack?.title ?? '' }}
</div> </div>
<span class="reader-bar-pages"> <span class="reader-bar-pages">{{ scrollPercent }}%</span>
{{ currentPage + 1 }}<span class="op-40">/</span>{{ totalPages }} <button class="reader-bar-btn reader-bar-close" @click="close" aria-label="Fermer">
</span> <div class="i-lucide-x h-5 w-5" />
</button>
</div> </div>
<!-- Sommaire sidebar --> <!-- Sommaire sidebar -->
@@ -86,73 +50,85 @@
<div class="sommaire-panel"> <div class="sommaire-panel">
<h4 class="sommaire-title">{{ bpContent?.reader.sommaireTitle ?? 'Sommaire' }}</h4> <h4 class="sommaire-title">{{ bpContent?.reader.sommaireTitle ?? 'Sommaire' }}</h4>
<button <button
v-for="(ch, i) in chapters" v-for="(track, i) in tracks"
:key="i" :key="track.id"
class="sommaire-item" class="sommaire-item"
:class="{ 'sommaire-item--active': chapterIdx === i }" :class="{ 'sommaire-item--active': trackIdx === i }"
@click="goToChapter(i)" @click="goToTrack(i)"
> >
<span class="sommaire-num">{{ i + 1 }}</span> <span class="sommaire-num">{{ i + 1 }}</span>
{{ ch.title }} {{ track.title }}
</button> </button>
</div> </div>
</aside> </aside>
</Transition> </Transition>
<!-- Content viewport --> <!-- Content viewport -->
<div class="reader-viewport" ref="viewportEl"> <div
class="reader-viewport"
:class="{ 'reader-viewport--scroll': isScrollMode }"
ref="viewportEl"
@scroll="onViewportScroll"
>
<div <div
class="reader-columns prose" class="reader-columns prose"
:class="{ 'reader-columns--scroll': isScrollMode }"
ref="contentEl" ref="contentEl"
:style="contentStyle" :style="contentStyle"
> >
<ContentRenderer v-if="activeChapter" :value="activeChapter" /> <div v-if="currentLyrics" class="lyrics-content" v-html="currentLyricsHtml" />
<div v-else-if="currentSong" class="lyrics-empty">
<p class="op-40 italic">Paroles à venir pour « {{ currentSong.title }} »</p>
</div>
<div v-else class="lyrics-empty">
<p class="op-40 italic">Aucun morceau sélectionné</p>
</div>
</div> </div>
<!-- Page turn shadow overlay --> <!-- Page turn shadow overlay (paginated only) -->
<div class="reader-shadow" :class="{ visible: isTurning }" /> <div v-if="!isScrollMode" class="reader-shadow" :class="{ visible: isTurning }" />
</div> </div>
<!-- Bottom navigation --> <!-- Bottom navigation -->
<div class="reader-nav"> <div class="reader-nav">
<button <button
class="reader-nav-btn" class="reader-nav-btn"
:class="{ 'reader-nav-btn--hidden': currentPage <= 0 && chapterIdx <= 0 }" :class="{ 'reader-nav-btn--hidden': isScrollMode ? trackIdx <= 0 : (currentPage <= 0 && trackIdx <= 0) }"
@click="prevPage" @click="isScrollMode ? prevTrack() : prevPage()"
aria-label="Page précédente" :aria-label="isScrollMode ? 'Morceau précédent' : 'Page précédente'"
> >
<div class="i-lucide-chevron-left h-5 w-5" /> <div class="i-lucide-chevron-left h-5 w-5" />
</button> </button>
<!-- Song disc (if chapter has a song) --> <!-- Song disc -->
<div v-if="chapterSong" class="reader-song"> <div v-if="currentSong" class="reader-song">
<div class="reader-disc" :class="{ spinning: playerStore.isPlaying }"> <div class="reader-disc" :class="{ spinning: playerStore.isPlaying }">
<img src="/images/book-cover-spread.jpg" alt="" class="reader-disc-img" /> <img src="/images/Couv-Economie-du-don.jpg" alt="" class="reader-disc-img" />
<div class="reader-disc-hole" /> <div class="reader-disc-hole" />
</div> </div>
<span class="reader-song-name">{{ chapterSong.title }}</span> <span class="reader-song-name">{{ currentSong.title }}</span>
</div> </div>
<div v-else class="reader-song" /> <div v-else class="reader-song" />
<button <button
class="reader-nav-btn" class="reader-nav-btn"
:class="{ 'reader-nav-btn--hidden': currentPage >= totalPages - 1 && chapterIdx >= chapters.length - 1 }" :class="{ 'reader-nav-btn--hidden': isScrollMode ? trackIdx >= tracks.length - 1 : (currentPage >= totalPages - 1 && trackIdx >= tracks.length - 1) }"
@click="nextPage" @click="isScrollMode ? nextTrack() : nextPage()"
aria-label="Page suivante" :aria-label="isScrollMode ? 'Morceau suivant' : 'Page suivante'"
> >
<div class="i-lucide-chevron-right h-5 w-5" /> <div class="i-lucide-chevron-right h-5 w-5" />
</button> </button>
</div> </div>
</div> </div>
</Transition>
<!-- Hint --> <!-- Hint -->
<p class="bp-hint"> <p class="bp-hint">
<template v-if="phase === 'reading'"> <template v-if="isScrollMode">
<span class="hidden md:inline">{{ bpContent?.reader.hints.desktop }}</span> <span class="hidden md:inline">{{ bpContent?.reader.hints.desktopScroll ?? '← → morceaux · Défilement libre · Esc fermer' }}</span>
<span class="md:hidden">{{ bpContent?.reader.hints.mobile }}</span> <span class="md:hidden">{{ bpContent?.reader.hints.mobileScroll ?? 'Défilez pour lire' }}</span>
</template> </template>
<template v-else> <template v-else>
<span class="hidden md:inline">{{ bpContent?.reader.hints.default }}</span> <span class="hidden md:inline">{{ bpContent?.reader.hints.desktop }}</span>
<span class="md:hidden">{{ bpContent?.reader.hints.mobile }}</span>
</template> </template>
</p> </p>
</div> </div>
@@ -162,6 +138,7 @@
<script setup lang="ts"> <script setup lang="ts">
const { data: bpContent } = await usePageContent('book-player') const { data: bpContent } = await usePageContent('book-player')
const { trackPlayerOpen, trackPlayerChapter, trackPlayerMode } = useTracking()
const COL_GAP = 80 const COL_GAP = 80
@@ -177,90 +154,98 @@ const overlayRef = ref<HTMLElement>()
const viewportEl = ref<HTMLElement>() const viewportEl = ref<HTMLElement>()
const contentEl = ref<HTMLElement>() const contentEl = ref<HTMLElement>()
// ── Phase state ── const trackIdx = ref(0)
const phase = ref<'intro' | 'cover' | 'reading'>('intro')
const chapterIdx = ref(0)
const currentPage = ref(0) const currentPage = ref(0)
const totalPages = ref(1) const totalPages = ref(1)
const colWidth = ref(500) const colWidth = ref(500)
const showSommaire = ref(false) const showSommaire = ref(false)
const isTurning = ref(false) const isTurning = ref(false)
const { init: initBookData, getSongs, getPrimarySong, getPlaylistOrder } = useBookData() // ── Reading mode ──
const readingMode = ref<'paginated' | 'scroll'>('scroll')
const isScrollMode = computed(() => readingMode.value === 'scroll')
const scrollPercent = ref(0)
// When switching back to paginated, recalc pages
watch(readingMode, async (mode) => {
trackPlayerMode(mode === 'scroll' ? 'scroll' : 'guided')
if (mode === 'paginated') {
await nextTick()
await nextTick()
setTimeout(recalcPages, 100)
}
})
function onViewportScroll() {
if (!isScrollMode.value || !viewportEl.value) return
const el = viewportEl.value
const max = el.scrollHeight - el.clientHeight
scrollPercent.value = max > 0 ? Math.round((el.scrollTop / max) * 100) : 0
}
const { init: initBookData, getPlaylistOrder } = useBookData()
const audioPlayer = useAudioPlayer() const audioPlayer = useAudioPlayer()
const playerStore = usePlayerStore() const playerStore = usePlayerStore()
// ── Content from Nuxt Content ── // ── Tracks: built from playlist order (songs), not chapters ──
const chaptersContent = ref<any[]>([]) const tracks = computed(() => {
const contentLoaded = ref(false) return playerStore.playlist.map(song => ({
id: song.id,
async function loadContent() { title: song.title,
if (contentLoaded.value) return song,
try { }))
const data = await queryCollection('book').order('order', 'ASC').all()
chaptersContent.value = data
contentLoaded.value = true
}
catch (err) {
console.error('Failed to load book content:', err)
}
}
const activeChapter = computed(() => {
if (chapterIdx.value < 0 || !chaptersContent.value.length) return null
return chaptersContent.value[chapterIdx.value] ?? null
}) })
// ── Chapter metadata ── const currentTrack = computed(() => tracks.value[trackIdx.value] ?? null)
const chapters = [ const currentSong = computed(() => currentTrack.value?.song ?? null)
{ slug: 'introduction', title: 'Introduction' },
{ slug: 'de-quel-don-parlons-nous', title: 'De quel don parlons-nous ?' },
{ slug: 'la-mesure-du-don', title: 'La mesure du don' },
{ slug: 'raison-d-etre-d-une-monnaie', title: 'Raison d\'être d\'une monnaie' },
{ slug: 'la-trm', title: 'La TRM' },
{ slug: 'creer-une-economie', title: 'Créer une économie ?' },
{ slug: 'echanger', title: 'Échanger' },
{ slug: 'relation-institutionnelle', title: 'Relation institutionnelle' },
{ slug: 'autres-greffes', title: 'Autres greffes' },
{ slug: 'et-maintenant', title: 'Et maintenant ?… action ?' },
{ slug: 'annexes', title: 'Chapitres annexes' },
]
// ── Per-chapter color hues ── const currentLyrics = computed(() => {
const chapterHues: [number, number][] = [ return currentSong.value?.lyrics?.trim() || ''
[12, 36], // cover (intro + cover phases) })
[15, 35], // 1
[350, 15], // 2 const currentLyricsHtml = computed(() => {
[36, 50], // 3 if (!currentLyrics.value) return ''
[170, 200], // 4 return currentLyrics.value
[220, 250], // 5 .replace(/&/g, '&amp;')
[270, 300], // 6 .replace(/</g, '&lt;')
[320, 345], // 7 .replace(/>/g, '&gt;')
[150, 170], // 8 .replace(/\[([^\]]+)\]/g, '<span class="lyrics-tag">[$1]</span>')
[190, 220], // 9 .replace(/\n\n/g, '</p><p>')
[40, 20], // 10 .replace(/\n/g, '<br>')
[210, 240], // 11 .replace(/^/, '<p>')
.replace(/$/, '</p>')
})
// ── Per-track color hues (9 tracks) ──
const trackHues: [number, number][] = [
[15, 35], // 1 Ce livre est une façon
[350, 15], // 2 De quel don nous parlons
[36, 50], // 3 Les asymétries
[170, 200], // 4 Inverser les flux
[220, 250], // 5 Ainsi soit-il
[270, 300], // 6 La croissance
[320, 345], // 7 Monnaie libre
[150, 170], // 8 Créer une économie
[190, 220], // 9 Coder la liberté
] ]
const sceneVars = computed(() => { const sceneVars = computed(() => {
const idx = phase.value === 'reading' ? chapterIdx.value + 1 : 0 const [h1, h2] = trackHues[trackIdx.value] ?? trackHues[0]
const [h1, h2] = chapterHues[idx] ?? chapterHues[0]
return { '--scene-h1': h1, '--scene-h2': h2 } as Record<string, number> return { '--scene-h1': h1, '--scene-h2': h2 } as Record<string, number>
}) })
const chapterSong = computed(() => { // ── CSS columns pagination ──
if (phase.value !== 'reading') return null const contentStyle = computed(() => {
return getPrimarySong(chapters[chapterIdx.value].slug) if (isScrollMode.value) return {}
return {
columnWidth: colWidth.value + 'px',
columnGap: COL_GAP + 'px',
transform: `translateX(-${currentPage.value * (colWidth.value + COL_GAP)}px)`,
}
}) })
// ── CSS columns pagination ──
const contentStyle = computed(() => ({
columnWidth: colWidth.value + 'px',
columnGap: COL_GAP + 'px',
transform: `translateX(-${currentPage.value * (colWidth.value + COL_GAP)}px)`,
}))
function recalcPages() { function recalcPages() {
if (isScrollMode.value) return
if (!contentEl.value || !viewportEl.value) return if (!contentEl.value || !viewportEl.value) return
colWidth.value = viewportEl.value.offsetWidth colWidth.value = viewportEl.value.offsetWidth
const sw = contentEl.value.scrollWidth const sw = contentEl.value.scrollWidth
@@ -269,25 +254,17 @@ function recalcPages() {
let resizeObs: ResizeObserver | null = null let resizeObs: ResizeObserver | null = null
// Recalc when chapter content changes // Recalc when track changes
watch(activeChapter, async () => { watch(trackIdx, async () => {
currentPage.value = 0 currentPage.value = 0
// Wait for ContentRenderer to update DOM
await nextTick() await nextTick()
await nextTick() await nextTick()
setTimeout(recalcPages, 100) setTimeout(recalcPages, 100)
}) })
// ── Phase transitions ── async function initReading() {
function onSpinEnd() { trackIdx.value = 0
phase.value = 'cover'
}
async function startReading() {
await loadContent()
chapterIdx.value = 0
currentPage.value = 0 currentPage.value = 0
phase.value = 'reading'
await nextTick() await nextTick()
await nextTick() await nextTick()
// Set up ResizeObserver // Set up ResizeObserver
@@ -298,14 +275,37 @@ async function startReading() {
setTimeout(recalcPages, 200) setTimeout(recalcPages, 200)
} }
// ── Navigation ── // ── Navigation by tracks (songs) ──
function goToChapter(idx: number) { let _skipSongWatch = false
chapterIdx.value = idx
function goToTrack(idx: number) {
if (idx < 0 || idx >= tracks.value.length) return
trackIdx.value = idx
currentPage.value = 0 currentPage.value = 0
showSommaire.value = false showSommaire.value = false
// Play chapter song // Scroll to top in scroll mode
const song = getPrimarySong(chapters[idx].slug) if (isScrollMode.value && viewportEl.value) {
if (song) audioPlayer.loadAndPlay(song) viewportEl.value.scrollTop = 0
}
// Play the song
const song = tracks.value[idx]?.song
if (song) {
trackPlayerChapter(song.id)
_skipSongWatch = true
audioPlayer.loadAndPlay(song)
}
}
function nextTrack() {
if (trackIdx.value < tracks.value.length - 1) {
goToTrack(trackIdx.value + 1)
}
}
function prevTrack() {
if (trackIdx.value > 0) {
goToTrack(trackIdx.value - 1)
}
} }
function nextPage() { function nextPage() {
@@ -313,9 +313,8 @@ function nextPage() {
triggerTurn() triggerTurn()
currentPage.value++ currentPage.value++
} }
else if (chapterIdx.value < chapters.length - 1) { else if (trackIdx.value < tracks.value.length - 1) {
// Next chapter goToTrack(trackIdx.value + 1)
goToChapter(chapterIdx.value + 1)
} }
} }
@@ -324,22 +323,8 @@ function prevPage() {
triggerTurn() triggerTurn()
currentPage.value-- currentPage.value--
} }
else if (chapterIdx.value > 0) { else if (trackIdx.value > 0) {
// Previous chapter, go to last page goToTrack(trackIdx.value - 1)
chapterIdx.value--
currentPage.value = 0
showSommaire.value = false
const song = getPrimarySong(chapters[chapterIdx.value].slug)
if (song) audioPlayer.loadAndPlay(song)
// After content loads, go to last page
watch(activeChapter, async () => {
await nextTick()
await nextTick()
setTimeout(() => {
recalcPages()
currentPage.value = Math.max(0, totalPages.value - 1)
}, 150)
}, { once: true })
} }
} }
@@ -353,15 +338,26 @@ function close() {
} }
function handleKeydown(e: KeyboardEvent) { function handleKeydown(e: KeyboardEvent) {
if (phase.value === 'reading') { // CRITICAL: stop propagation so useKeyboardShortcuts doesn't also fire
e.stopPropagation()
if (e.key === 'Escape') { close(); return }
if (e.key === ' ') {
e.preventDefault()
audioPlayer.togglePlayPause()
return
}
if (isScrollMode.value) {
if (e.key === 'ArrowRight') { e.preventDefault(); nextTrack() }
else if (e.key === 'ArrowLeft') { e.preventDefault(); prevTrack() }
}
else {
if (e.key === 'ArrowRight') { e.preventDefault(); nextPage() } if (e.key === 'ArrowRight') { e.preventDefault(); nextPage() }
else if (e.key === 'ArrowLeft') { e.preventDefault(); prevPage() } else if (e.key === 'ArrowLeft') { e.preventDefault(); prevPage() }
else if (e.key === 'ArrowDown') { e.preventDefault(); if (chapterIdx.value < chapters.length - 1) goToChapter(chapterIdx.value + 1) } else if (e.key === 'ArrowDown') { e.preventDefault(); nextTrack() }
else if (e.key === 'ArrowUp') { e.preventDefault(); if (chapterIdx.value > 0) goToChapter(chapterIdx.value - 1) } else if (e.key === 'ArrowUp') { e.preventDefault(); prevTrack() }
else if (e.key === 'Escape') close()
}
else if (e.key === 'Escape') {
close()
} }
} }
@@ -373,6 +369,7 @@ function onTouchStart(e: TouchEvent) {
} }
function onTouchEnd(e: TouchEvent) { function onTouchEnd(e: TouchEvent) {
if (isScrollMode.value) return
const diff = touchStartX - (e.changedTouches[0]?.screenX ?? 0) const diff = touchStartX - (e.changedTouches[0]?.screenX ?? 0)
if (Math.abs(diff) > 50) { if (Math.abs(diff) > 50) {
if (diff > 0) nextPage() if (diff > 0) nextPage()
@@ -381,13 +378,19 @@ function onTouchEnd(e: TouchEvent) {
} }
// ── Lifecycle ── // ── Lifecycle ──
// While the reader is open, the persistent mini player (above it) lifts up
// so it does not cover the reader navigation.
if (import.meta.client) {
watch(isOpen, (open) => {
document.documentElement.classList.toggle('book-player-open', open)
}, { immediate: true })
onUnmounted(() => document.documentElement.classList.remove('book-player-open'))
}
watch(isOpen, async (open) => { watch(isOpen, async (open) => {
if (open) { if (open) {
phase.value = 'intro'
chapterIdx.value = 0
currentPage.value = 0
showSommaire.value = false showSommaire.value = false
contentLoaded.value = false trackPlayerOpen()
await initBookData() await initBookData()
await nextTick() await nextTick()
overlayRef.value?.focus() overlayRef.value?.focus()
@@ -396,8 +399,11 @@ watch(isOpen, async (open) => {
// Load playlist & play first song // Load playlist & play first song
const playlist = getPlaylistOrder() const playlist = getPlaylistOrder()
if (playlist.length) playerStore.setPlaylist(playlist) if (playlist.length) playerStore.setPlaylist(playlist)
const first = getSongs().find(s => s.id === 'chanson-01') if (playlist.length) {
if (first) audioPlayer.loadAndPlay(first) _skipSongWatch = true
audioPlayer.loadAndPlay(playlist[0])
}
await initReading()
} }
else { else {
overlayRef.value?.removeEventListener('touchstart', onTouchStart) overlayRef.value?.removeEventListener('touchstart', onTouchStart)
@@ -406,6 +412,24 @@ watch(isOpen, async (open) => {
} }
}) })
// ── Sync: when song changes externally (persistent player controls), update trackIdx ──
watch(() => playerStore.currentSong, (song) => {
if (!song || !isOpen.value) return
if (_skipSongWatch) {
_skipSongWatch = false
return
}
const idx = tracks.value.findIndex(t => t.id === song.id)
if (idx !== -1 && idx !== trackIdx.value) {
trackIdx.value = idx
currentPage.value = 0
showSommaire.value = false
if (isScrollMode.value && viewportEl.value) {
viewportEl.value.scrollTop = 0
}
}
})
watch(isOpen, (open) => { watch(isOpen, (open) => {
if (import.meta.client) document.body.style.overflow = open ? 'hidden' : '' if (import.meta.client) document.body.style.overflow = open ? 'hidden' : ''
}) })
@@ -436,13 +460,13 @@ onUnmounted(() => {
position: fixed; position: fixed;
inset: 0; inset: 0;
z-index: 60; z-index: 60;
background: hsl(20 8% 3%); background: hsl(var(--color-bg));
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
outline: none; outline: none;
overflow: hidden; overflow: hidden;
padding-bottom: 4.5rem; padding-bottom: 1rem;
transition: --scene-h1 1.6s ease, --scene-h2 1.6s ease; transition: --scene-h1 1.6s ease, --scene-h2 1.6s ease;
} }
@@ -519,38 +543,15 @@ onUnmounted(() => {
50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
} }
/* ─── CLOSE ─── */
.bp-close {
position: absolute;
top: 1rem; right: 1rem;
z-index: 75;
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem; height: 2.5rem;
border-radius: 50%;
background: hsl(20 8% 8% / 0.6);
backdrop-filter: blur(12px);
color: hsl(20 8% 55%);
border: 1px solid hsl(20 8% 18% / 0.5);
cursor: pointer;
transition: all 0.3s;
}
.bp-close:hover {
background: hsl(var(--scene-h1) 60% 45% / 0.25);
color: white;
border-color: hsl(var(--scene-h1) 60% 50% / 0.4);
}
/* ─── HINT ─── */ /* ─── HINT ─── */
.bp-hint { .bp-hint {
position: absolute; position: absolute;
bottom: 5rem; bottom: 0.5rem;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
z-index: 10; z-index: 10;
font-size: 0.68rem; font-size: 0.68rem;
color: hsl(20 8% 28%); color: hsl(var(--color-text-muted));
white-space: nowrap; white-space: nowrap;
} }
@@ -565,135 +566,7 @@ onUnmounted(() => {
align-items: center; align-items: center;
width: 100%; width: 100%;
flex: 1; flex: 1;
} min-height: 0;
/* Phase transitions */
.phase-enter-active { animation: phase-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.phase-leave-active { animation: phase-out 0.3s cubic-bezier(0.7, 0, 0.84, 0) both; }
@keyframes phase-in {
from { opacity: 0; transform: scale(0.97); filter: blur(4px); }
to { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes phase-out {
from { opacity: 1; transform: scale(1); filter: blur(0); }
to { opacity: 0; transform: scale(0.97); filter: blur(4px); }
}
/* ═══════════════════════════════════════
INTRO: 3D SPINNING BOOK
═══════════════════════════════════════ */
.bp-intro {
justify-content: center;
}
.spin-scene {
perspective: 1200px;
}
.spin-book {
position: relative;
width: min(220px, 45vw);
aspect-ratio: 3 / 4;
transform-style: preserve-3d;
animation: book-spin 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.spin-face {
position: absolute;
inset: 0;
backface-visibility: hidden;
border-radius: 0.5rem;
overflow: hidden;
border: 1px solid hsl(20 8% 18%);
box-shadow: 0 20px 60px hsl(0 0% 0% / 0.5);
}
.spin-front img {
width: 200%;
height: 100%;
object-fit: cover;
transform: translateX(-50%);
}
.spin-back {
transform: rotateY(180deg);
}
.spin-back img {
width: 200%;
height: 100%;
object-fit: cover;
}
@keyframes book-spin {
0% { transform: rotateY(0deg) scale(0.65); opacity: 0; }
8% { opacity: 1; }
45% { transform: rotateY(180deg) scale(0.9); }
75% { transform: rotateY(320deg) scale(1); }
90% { transform: rotateY(352deg) scale(1); }
100% { transform: rotateY(360deg) scale(1); }
}
/* ═══════════════════════════════════════
COVER
═══════════════════════════════════════ */
.bp-cover {
justify-content: center;
text-align: center;
}
.cover-frame {
width: min(200px, 42vw);
aspect-ratio: 3 / 4;
border-radius: 0.625rem;
overflow: hidden;
border: 1px solid hsl(20 8% 18%);
box-shadow:
0 25px 60px hsl(0 0% 0% / 0.5),
0 0 40px hsl(var(--scene-h1) 60% 40% / 0.1);
margin-bottom: 2rem;
animation: cover-float 7s ease-in-out infinite;
}
.cover-img {
width: 200%; height: 100%;
object-fit: cover;
transform: translateX(-50%);
}
@keyframes cover-float {
0%, 100% { transform: translateY(0) rotate(-0.5deg); }
50% { transform: translateY(-10px) rotate(0.5deg); }
}
.cover-title {
font-family: var(--font-display, 'Syne', sans-serif);
font-size: clamp(1.75rem, 5vw, 2.75rem);
font-weight: 800;
line-height: 1.1;
margin-bottom: 0.25rem;
}
.cover-sub {
font-family: var(--font-display, 'Syne', sans-serif);
font-size: clamp(1rem, 3vw, 1.4rem);
color: hsl(20 8% 55%);
margin-bottom: 1.5rem;
}
.cover-desc {
font-size: 0.9rem;
color: hsl(20 8% 45%);
max-width: 26rem;
line-height: 1.65;
margin-bottom: 2rem;
}
.cover-cta {
display: inline-flex;
align-items: center;
padding: 0.75rem 2rem;
border-radius: 9999px;
background: hsl(var(--scene-h1) 70% 45%);
color: white;
font-weight: 600;
font-size: 0.95rem;
border: none;
cursor: pointer;
transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
box-shadow: 0 0 24px hsl(var(--scene-h1) 70% 45% / 0.3);
}
.cover-cta:hover {
background: hsl(var(--scene-h1) 70% 52%);
box-shadow: 0 0 36px hsl(var(--scene-h1) 70% 50% / 0.45);
transform: translateY(-2px);
} }
/* ═══════════════════════════════════════ /* ═══════════════════════════════════════
@@ -704,14 +577,15 @@ onUnmounted(() => {
max-width: 52rem; max-width: 52rem;
padding: 0 1rem; padding: 0 1rem;
gap: 0; gap: 0;
min-height: 0;
} }
/* ─── Top bar ─── */ /* ─── Top bar ─── */
.reader-bar { .reader-bar {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.75rem; gap: 0.5rem;
padding: 0.75rem 0; padding: 0.5rem 0;
width: 100%; width: 100%;
} }
.reader-bar-btn { .reader-bar-btn {
@@ -720,22 +594,28 @@ onUnmounted(() => {
justify-content: center; justify-content: center;
width: 2.25rem; height: 2.25rem; width: 2.25rem; height: 2.25rem;
border-radius: 0.5rem; border-radius: 0.5rem;
background: hsl(20 8% 8% / 0.5); background: transparent;
backdrop-filter: blur(8px); color: hsl(var(--color-text-muted));
color: hsl(20 8% 55%); border: none;
border: 1px solid hsl(20 8% 16% / 0.5);
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
flex-shrink: 0; flex-shrink: 0;
} }
.reader-bar-btn:hover { .reader-bar-btn:hover {
color: white; color: white;
background: hsl(var(--scene-h1) 50% 40% / 0.2); background: hsl(0 0% 100% / 0.06);
border-color: hsl(var(--scene-h1) 50% 50% / 0.3); }
.reader-bar-close {
color: hsl(0 0% 100% / 0.7);
background: hsl(0 0% 100% / 0.08);
}
.reader-bar-close:hover {
color: white;
background: hsl(0 70% 55% / 0.3);
} }
.reader-bar-title { .reader-bar-title {
flex: 1; flex: 1;
font-family: var(--font-display, 'Syne', sans-serif); font-family: var(--font-display);
font-size: clamp(0.85rem, 2.5vw, 1.1rem); font-size: clamp(0.85rem, 2.5vw, 1.1rem);
font-weight: 600; font-weight: 600;
color: white; color: white;
@@ -750,7 +630,7 @@ onUnmounted(() => {
.reader-bar-pages { .reader-bar-pages {
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
font-size: 0.75rem; font-size: 0.75rem;
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
flex-shrink: 0; flex-shrink: 0;
} }
@@ -759,16 +639,16 @@ onUnmounted(() => {
position: absolute; position: absolute;
inset: 0; inset: 0;
z-index: 72; z-index: 72;
background: hsl(20 8% 3% / 0.6); background: hsl(var(--color-bg) / 0.6);
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
display: flex; display: flex;
} }
.sommaire-panel { .sommaire-panel {
width: min(300px, 80vw); width: min(300px, 80vw);
height: 100%; height: 100%;
background: hsl(20 8% 6% / 0.95); background: hsl(var(--color-surface) / 0.95);
backdrop-filter: blur(16px); backdrop-filter: blur(16px);
border-right: 1px solid hsl(20 8% 14%); border-right: 1px solid hsl(var(--color-surface-light));
padding: 1.5rem; padding: 1.5rem;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
@@ -776,10 +656,10 @@ onUnmounted(() => {
gap: 0.25rem; gap: 0.25rem;
} }
.sommaire-title { .sommaire-title {
font-family: var(--font-display, 'Syne', sans-serif); font-family: var(--font-display);
font-size: 0.85rem; font-size: 0.85rem;
font-weight: 700; font-weight: 700;
color: hsl(20 8% 45%); color: hsl(var(--color-text-muted));
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.1em; letter-spacing: 0.1em;
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
@@ -791,7 +671,7 @@ onUnmounted(() => {
padding: 0.625rem 0.75rem; padding: 0.625rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
font-size: 0.85rem; font-size: 0.85rem;
color: hsl(20 8% 55%); color: hsl(var(--color-text-muted));
background: transparent; background: transparent;
border: none; border: none;
cursor: pointer; cursor: pointer;
@@ -800,7 +680,7 @@ onUnmounted(() => {
width: 100%; width: 100%;
} }
.sommaire-item:hover { .sommaire-item:hover {
background: hsl(20 8% 12%); background: hsl(var(--color-surface));
color: white; color: white;
} }
.sommaire-item--active { .sommaire-item--active {
@@ -816,8 +696,8 @@ onUnmounted(() => {
font-size: 0.65rem; font-size: 0.65rem;
font-weight: 700; font-weight: 700;
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
background: hsl(20 8% 12%); background: hsl(var(--color-surface));
flex-shrink: 0; flex-shrink: 0;
} }
.sommaire-item--active .sommaire-num { .sommaire-item--active .sommaire-num {
@@ -844,12 +724,11 @@ onUnmounted(() => {
position: relative; position: relative;
flex: 1; flex: 1;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden auto;
border-radius: 0.75rem; border-radius: 0.75rem;
background: hsl(20 8% 5% / 0.4); background: hsl(var(--color-bg) / 0.4);
backdrop-filter: blur(16px); backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
border: 1px solid hsl(20 8% 14% / 0.4);
} }
.reader-columns { .reader-columns {
@@ -860,6 +739,23 @@ onUnmounted(() => {
max-width: none; max-width: none;
} }
/* ─── Scroll mode overrides ─── */
.reader-viewport--scroll {
overflow: hidden auto;
min-height: 0;
}
.reader-columns--scroll {
height: auto;
column-fill: unset;
column-width: unset !important;
transition: none;
}
/* Lyrics: preserve line breaks from \n in text nodes */
.reader-columns :deep(p) {
white-space: pre-line;
}
/* Tighten prose for column context */ /* Tighten prose for column context */
.reader-columns :deep(h1) { .reader-columns :deep(h1) {
font-size: clamp(1.5rem, 3.5vw, 2rem); font-size: clamp(1.5rem, 3.5vw, 2rem);
@@ -880,12 +776,42 @@ onUnmounted(() => {
.reader-columns :deep(h3) { .reader-columns :deep(h3) {
break-after: avoid; break-after: avoid;
} }
.reader-columns :deep(p),
.reader-columns :deep(blockquote), .reader-columns :deep(blockquote),
.reader-columns :deep(ul), .reader-columns :deep(ul),
.reader-columns :deep(ol) { .reader-columns :deep(ol) {
break-inside: avoid; break-inside: avoid;
} }
/* Lyrics content */
.lyrics-content {
white-space: pre-line;
line-height: 1.9;
font-size: clamp(0.9rem, 2vw, 1.05rem);
}
.lyrics-content :deep(.lyrics-tag) {
display: block;
margin-top: 1.5rem;
margin-bottom: 0.5rem;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
opacity: 0.35;
}
.lyrics-content :deep(p) {
break-inside: auto;
overflow-y: auto;
}
.lyrics-empty {
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}
.reader-columns :deep(p) {
break-inside: auto;
overflow-y: auto;
}
/* Page-turn shadow overlay */ /* Page-turn shadow overlay */
.reader-shadow { .reader-shadow {
@@ -896,7 +822,7 @@ onUnmounted(() => {
height: 100%; height: 100%;
pointer-events: none; pointer-events: none;
opacity: 0; opacity: 0;
background: linear-gradient(to left, hsl(20 8% 3% / 0.4), transparent); background: linear-gradient(to left, hsl(var(--color-bg) / 0.4), transparent);
transition: opacity 0.15s; transition: opacity 0.15s;
border-radius: 0 0.75rem 0.75rem 0; border-radius: 0 0.75rem 0.75rem 0;
} }
@@ -910,7 +836,7 @@ onUnmounted(() => {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
padding: 0.5rem 0; padding: 0.25rem 0;
gap: 1rem; gap: 1rem;
} }
.reader-nav-btn { .reader-nav-btn {
@@ -919,18 +845,16 @@ onUnmounted(() => {
justify-content: center; justify-content: center;
width: 2.5rem; height: 2.5rem; width: 2.5rem; height: 2.5rem;
border-radius: 50%; border-radius: 50%;
background: hsl(20 8% 8% / 0.5); background: transparent;
backdrop-filter: blur(8px); color: hsl(var(--color-text-muted));
color: hsl(20 8% 55%); border: none;
border: 1px solid hsl(20 8% 16% / 0.5);
cursor: pointer; cursor: pointer;
transition: all 0.3s; transition: all 0.3s;
flex-shrink: 0; flex-shrink: 0;
} }
.reader-nav-btn:hover { .reader-nav-btn:hover {
background: hsl(var(--scene-h1) 60% 42% / 0.2); background: hsl(0 0% 100% / 0.06);
color: white; color: white;
border-color: hsl(var(--scene-h1) 60% 50% / 0.35);
} }
.reader-nav-btn--hidden { .reader-nav-btn--hidden {
opacity: 0; opacity: 0;
@@ -950,7 +874,7 @@ onUnmounted(() => {
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
flex-shrink: 0; flex-shrink: 0;
border: 2px solid hsl(20 8% 22%); border: 2px solid hsl(var(--color-surface-light));
box-shadow: 0 0 10px hsl(var(--scene-h1) 50% 40% / 0.15); box-shadow: 0 0 10px hsl(var(--scene-h1) 50% 40% / 0.15);
} }
.reader-disc.spinning { .reader-disc.spinning {
@@ -967,12 +891,12 @@ onUnmounted(() => {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 0.5rem; height: 0.5rem; width: 0.5rem; height: 0.5rem;
border-radius: 50%; border-radius: 50%;
background: hsl(20 8% 5%); background: hsl(var(--color-bg));
border: 1.5px solid hsl(20 8% 18%); border: 1.5px solid hsl(var(--color-surface-light));
} }
.reader-song-name { .reader-song-name {
font-size: 0.75rem; font-size: 0.75rem;
color: hsl(20 8% 50%); color: hsl(var(--color-text-muted));
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
+7 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<article class="prose"> <article class="prose prose-lyrics">
<ContentRenderer :value="content" /> <ContentRenderer :value="content" />
</article> </article>
</template> </template>
@@ -9,3 +9,9 @@ defineProps<{
content: any content: any
}>() }>()
</script> </script>
<style scoped>
.prose-lyrics :deep(p) {
white-space: pre-line;
}
</style>
+70 -4
View File
@@ -15,18 +15,28 @@
{{ description }} {{ description }}
</p> </p>
<!-- Songs + PDF actions row -->
<div class="mt-4 flex flex-wrap items-center gap-2">
<!-- Associated songs badges --> <!-- Associated songs badges -->
<div v-if="songs.length > 0" class="mt-4 flex flex-wrap gap-2">
<button <button
v-for="song in songs" v-for="song in songs"
:key="song.id" :key="song.id"
class="inline-flex items-center gap-1.5 rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary transition-colors hover:bg-primary/20" class="song-badge-btn"
@click="playSong(song)" @click="playSong(song)"
> >
<div class="i-lucide-music h-3 w-3" /> <div class="i-lucide-music h-3 w-3" />
{{ song.title }} {{ song.title }}
</button> </button>
<!-- PDF button -->
<button v-if="pdfPage" class="pdf-btn" @click="showPdf = true">
<div class="i-lucide-book-open h-3.5 w-3.5" />
<span>Lire dans le PDF</span>
<span class="pdf-page-badge">p.{{ pdfPage }}</span>
</button>
</div> </div>
<LazyBookPdfReader v-if="showPdf" v-model="showPdf" :page="pdfPage" />
</header> </header>
</template> </template>
@@ -44,9 +54,12 @@ const props = defineProps<{
const bookData = useBookData() const bookData = useBookData()
const { loadAndPlay } = useAudioPlayer() const { loadAndPlay } = useAudioPlayer()
await bookData.init() bookData.init()
const songs = computed(() => bookData.getChapterSongs(props.chapterSlug)) const songs = computed(() => bookData.getChapterSongs(props.chapterSlug))
const pdfPage = computed(() => bookData.getChapterPage(props.chapterSlug))
const showPdf = ref(false)
function playSong(song: Song) { function playSong(song: Song) {
loadAndPlay(song) loadAndPlay(song)
@@ -57,6 +70,59 @@ function playSong(song: Song) {
.chapter-title { .chapter-title {
font-size: clamp(2rem, 5vw, 2.75rem); font-size: clamp(2rem, 5vw, 2.75rem);
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
border-bottom: 2px solid hsl(12 76% 48% / 0.4); border-bottom: 2px solid hsl(var(--color-primary) / 0.4);
}
.song-badge-btn {
display: inline-flex;
align-items: center;
gap: 0.375rem;
border-radius: 9999px;
padding: 0.375rem 0.875rem;
font-size: 0.8rem;
font-weight: 600;
background: hsl(var(--color-primary) / 0.12);
color: hsl(var(--color-primary) / 0.85);
border: 1px solid hsl(var(--color-primary) / 0.25);
cursor: pointer;
transition: all 0.2s;
}
.song-badge-btn:hover {
background: hsl(var(--color-primary) / 0.2);
border-color: hsl(var(--color-primary) / 0.4);
box-shadow: 0 2px 8px hsl(var(--color-primary) / 0.15);
transform: translateY(-1px);
}
.pdf-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
background: hsl(0 0% 96%);
color: hsl(0 0% 15%);
font-size: 0.8rem;
font-weight: 600;
border: 1px solid hsl(0 0% 88%);
cursor: pointer;
transition: all 0.2s;
}
.pdf-btn:hover {
background: white;
box-shadow: 0 2px 12px hsl(0 0% 100% / 0.25);
transform: translateY(-1px);
}
.pdf-page-badge {
font-family: var(--font-mono, monospace);
font-size: 0.7rem;
font-weight: 500;
padding: 0.1rem 0.4rem;
border-radius: 0.25rem;
background: hsl(0 0% 88%);
color: hsl(0 0% 35%);
} }
</style> </style>
+1 -1
View File
@@ -6,7 +6,7 @@
<ul class="flex flex-col gap-1"> <ul class="flex flex-col gap-1">
<li v-for="chapter in chapters" :key="chapter.path"> <li v-for="chapter in chapters" :key="chapter.path">
<NuxtLink <NuxtLink
:to="`/lire/${chapter.stem}`" :to="`/economique/modele-eco/${chapter.stem?.split('/').pop()}`"
class="flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors hover:bg-white/5" class="flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors hover:bg-white/5"
active-class="bg-primary/10 text-primary font-medium" active-class="bg-primary/10 text-primary font-medium"
> >
+159
View File
@@ -0,0 +1,159 @@
<template>
<div class="chapter-toc" ref="tocRoot">
<button class="toc-toggle" @click="open = !open" :aria-expanded="open">
<div class="i-lucide-list h-4 w-4" />
<span>Sommaire</span>
<div class="i-lucide-chevron-down h-3.5 w-3.5 toc-chevron" :class="{ 'toc-chevron--open': open }" />
</button>
<Transition name="toc-dropdown">
<div v-if="open" class="toc-panel">
<nav>
<a
v-for="item in headings"
:key="item.id"
:href="`#${item.id}`"
class="toc-item"
:class="{ 'toc-item--h2': item.level === 2 }"
@click="open = false"
>
{{ item.text }}
</a>
</nav>
</div>
</Transition>
</div>
</template>
<script setup lang="ts">
interface TocHeading {
id: string
text: string
level: number
}
const open = ref(false)
const headings = ref<TocHeading[]>([])
const tocRoot = ref<HTMLElement>()
function extractHeadings() {
const article = document.querySelector('.prose-lyrics')
if (!article) return
const nodes = article.querySelectorAll('h1, h2')
headings.value = Array.from(nodes)
.filter(el => el.id)
.map(el => ({
id: el.id,
text: el.textContent?.trim() ?? '',
level: parseInt(el.tagName[1]),
}))
}
// Close on click outside
function onClickOutside(e: MouseEvent) {
if (tocRoot.value && !tocRoot.value.contains(e.target as Node)) {
open.value = false
}
}
onMounted(() => {
// Wait for content to render
nextTick(() => {
extractHeadings()
// Retry after a short delay in case content loads async
setTimeout(extractHeadings, 500)
})
document.addEventListener('click', onClickOutside)
})
onUnmounted(() => {
document.removeEventListener('click', onClickOutside)
})
</script>
<style scoped>
.chapter-toc {
position: relative;
display: inline-block;
}
.toc-toggle {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.375rem 0.75rem;
border-radius: 0.375rem;
background: hsl(20 8% 10%);
border: 1px solid hsl(20 8% 18%);
color: hsl(20 8% 60%);
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.toc-toggle:hover {
border-color: hsl(20 8% 30%);
color: white;
}
.toc-chevron {
transition: transform 0.2s;
}
.toc-chevron--open {
transform: rotate(180deg);
}
.toc-panel {
position: absolute;
top: calc(100% + 0.5rem);
left: 0;
z-index: 30;
min-width: 280px;
max-width: 400px;
max-height: 60vh;
overflow-y: auto;
padding: 0.5rem;
border-radius: 0.5rem;
background: hsl(20 8% 8%);
border: 1px solid hsl(20 8% 16%);
box-shadow: 0 8px 32px hsl(0 0% 0% / 0.4);
}
.toc-item {
display: block;
padding: 0.5rem 0.75rem;
border-radius: 0.375rem;
font-size: 0.8rem;
color: hsl(20 8% 65%);
text-decoration: none;
transition: all 0.15s;
line-height: 1.3;
}
.toc-item:hover {
background: hsl(20 8% 12%);
color: white;
}
.toc-item--h2 {
padding-left: 1.5rem;
font-size: 0.75rem;
color: hsl(20 8% 50%);
}
/* Dropdown transition */
.toc-dropdown-enter-active {
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.toc-dropdown-leave-active {
transition: all 0.15s ease-in;
}
.toc-dropdown-enter-from,
.toc-dropdown-leave-to {
opacity: 0;
transform: translateY(-4px);
}
</style>
+96 -9
View File
@@ -1,5 +1,56 @@
<template> <template>
<section class="section-padding"> <section class="relative overflow-hidden section-padding">
<!-- Shadok thinker: ovoid character sitting, hand on chin, thinking bubble -->
<svg class="shadok-thinker" viewBox="0 0 220 280" fill="none" aria-hidden="true">
<!-- Body (seated, leaning forward) -->
<ellipse cx="100" cy="160" rx="42" ry="50" fill="currentColor" opacity="0.85"/>
<!-- Head (tilted) -->
<ellipse cx="110" cy="95" rx="25" ry="24" fill="currentColor" opacity="0.8"/>
<!-- Neck -->
<path d="M100 118 Q105 110 108 105" stroke="currentColor" stroke-width="6" stroke-linecap="round" opacity="0.6" fill="none"/>
<!-- Eyes (contemplative) -->
<circle cx="103" cy="90" r="4.5" fill="currentColor" opacity="0.2"/>
<circle cx="120" cy="90" r="4.5" fill="currentColor" opacity="0.2"/>
<circle cx="104" cy="89" r="1.8" fill="currentColor" opacity="0.5"/>
<circle cx="121" cy="89" r="1.8" fill="currentColor" opacity="0.5"/>
<!-- Arm to chin -->
<line x1="140" y1="145" x2="130" y2="108" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<!-- Hand on chin -->
<circle cx="130" cy="105" r="5" fill="currentColor" opacity="0.45"/>
<!-- Seated legs (crossed/bent) -->
<path d="M75 205 Q60 230 50 240" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6" fill="none"/>
<path d="M120 205 Q140 220 145 240" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6" fill="none"/>
<!-- Feet -->
<path d="M50 240 L38 243 M50 240 L45 246" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>
<path d="M145 240 L133 243 M145 240 L140 246" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>
<!-- Thinking bubbles -->
<circle cx="150" cy="78" r="5" fill="currentColor" opacity="0.3"/>
<circle cx="165" cy="62" r="8" fill="currentColor" opacity="0.25"/>
<circle cx="185" cy="42" r="12" fill="currentColor" opacity="0.2"/>
</svg>
<!-- Shadok menuisier: character with plane and plank -->
<svg class="shadok-menuisier" viewBox="0 0 240 300" fill="none" aria-hidden="true">
<ellipse cx="120" cy="155" rx="40" ry="48" fill="currentColor" opacity="0.85"/>
<circle cx="120" cy="92" r="25" fill="currentColor" opacity="0.8"/>
<path d="M98 82 Q120 68 142 82" fill="currentColor" opacity="0.35"/>
<rect x="100" y="80" width="40" height="5" rx="1" fill="currentColor" opacity="0.3"/>
<circle cx="112" cy="90" r="4" fill="currentColor" opacity="0.2"/>
<circle cx="130" cy="90" r="4" fill="currentColor" opacity="0.2"/>
<circle cx="113" cy="89" r="1.8" fill="currentColor" opacity="0.5"/>
<circle cx="131" cy="89" r="1.8" fill="currentColor" opacity="0.5"/>
<line x1="114" y1="103" x2="126" y2="103" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.3"/>
<line x1="160" y1="145" x2="195" y2="160" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<rect x="190" y="155" width="30" height="12" rx="2" fill="currentColor" opacity="0.4"/>
<rect x="200" y="150" width="8" height="8" rx="1" fill="currentColor" opacity="0.35"/>
<line x1="80" y1="148" x2="50" y2="168" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<line x1="105" y1="200" x2="95" y2="258" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<line x1="135" y1="200" x2="145" y2="258" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<rect x="35" y="170" width="80" height="8" rx="1" fill="currentColor" opacity="0.3"/>
<path d="M60 168 Q55 162 62 160" stroke="currentColor" stroke-width="1" stroke-linecap="round" fill="none" opacity="0.2"/>
<path d="M80 166 Q76 158 83 157" stroke="currentColor" stroke-width="1" stroke-linecap="round" fill="none" opacity="0.18"/>
</svg>
<div class="container-content"> <div class="container-content">
<div class="grid items-center gap-12 md:grid-cols-2"> <div class="grid items-center gap-12 md:grid-cols-2">
<!-- Book cover --> <!-- Book cover -->
@@ -63,10 +114,10 @@ const { data: content } = await usePageContent('home')
aspect-ratio: 3 / 4; aspect-ratio: 3 / 4;
border-radius: 0.75rem; border-radius: 0.75rem;
overflow: hidden; overflow: hidden;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-text) / 0.1);
box-shadow: box-shadow:
0 12px 40px hsl(0 0% 0% / 0.5), 0 12px 40px hsl(var(--color-text) / 0.15),
0 0 0 1px hsl(20 8% 15%); 0 0 0 1px hsl(var(--color-text) / 0.08);
transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1), transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
box-shadow 0.5s ease; box-shadow 0.5s ease;
max-width: 360px; max-width: 360px;
@@ -75,18 +126,54 @@ const { data: content } = await usePageContent('home')
.book-cover-3d:hover { .book-cover-3d:hover {
transform: rotateY(-8deg) rotateX(3deg) scale(1.02); transform: rotateY(-8deg) rotateX(3deg) scale(1.02);
box-shadow: box-shadow:
12px 16px 48px hsl(0 0% 0% / 0.6), 12px 16px 48px hsl(var(--color-text) / 0.2),
0 0 0 1px hsl(12 76% 48% / 0.2); 0 0 0 1px hsl(var(--color-primary) / 0.2);
} }
.book-cover-img { .book-cover-img {
width: 200%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: contain;
transform: translateX(-50%);
} }
.heading-section { .heading-section {
font-size: clamp(1.625rem, 4vw, 2.125rem); font-size: clamp(1.625rem, 4vw, 2.125rem);
} }
.shadok-thinker {
position: absolute;
right: 2%;
bottom: 6%;
width: clamp(110px, 14vw, 200px);
opacity: 0.28;
pointer-events: none;
color: hsl(var(--color-accent));
animation: shadok-float-thinker 10s ease-in-out infinite;
}
@keyframes shadok-float-thinker {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-8px); }
}
.shadok-menuisier {
position: absolute;
left: 2%;
top: 5%;
width: clamp(100px, 13vw, 190px);
opacity: 0.25;
pointer-events: none;
color: hsl(var(--color-primary));
animation: shadok-float-menuisier 10s ease-in-out infinite;
}
@keyframes shadok-float-menuisier {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-9px); }
}
@media (max-width: 768px) {
.shadok-thinker { display: none; }
.shadok-menuisier { display: none; }
}
</style> </style>
+67 -38
View File
@@ -1,46 +1,47 @@
<template> <template>
<section class="section-padding"> <section :class="compact ? 'section-book-compact' : 'section-padding'">
<div class="container-content"> <div class="container-content">
<div class="grid items-center gap-12 md:grid-cols-2"> <div :class="['grid items-center', compact ? 'gap-5 md:grid-cols-[auto_1fr]' : 'gap-12 md:grid-cols-2']">
<!-- Book cover --> <!-- Book cover -->
<UiScrollReveal> <UiScrollReveal>
<div class="book-cover-wrapper"> <div class="book-cover-wrapper relative">
<div class="book-cover-3d"> <div
<img :class="['book-cover-3d', compact && 'book-cover-3d--compact']"
:src="content?.book.coverImage" :style="{ backgroundImage: `url(${content?.book.coverImage})` }"
:alt="content?.book.coverAlt" role="img"
class="book-cover-img" :aria-label="content?.book.coverAlt"
/> />
</div>
</div> </div>
</UiScrollReveal> </UiScrollReveal>
<!-- Content + CTAs --> <!-- Content + CTAs -->
<div> <div>
<UiScrollReveal> <UiScrollReveal>
<p class="mb-2 font-mono text-sm tracking-widest text-accent uppercase">{{ content?.book.kicker }}</p> <p :class="['font-mono tracking-widest text-accent uppercase', compact ? 'text-xs mb-1' : 'text-sm mb-2']">
<h2 class="heading-section font-display font-bold tracking-tight text-white"> {{ content?.book.kicker }}
{{ content?.book.title }} </p>
<h2 :class="['book-heading font-display font-bold tracking-tight text-white', compact && 'book-heading--compact']">
<template v-if="compact">
<span class="block">{{ titleLine1 }}</span>
<span class="block" style="color: hsl(var(--color-text) / 0.55)">{{ titleLine2 }}</span>
</template>
<template v-else>{{ content?.book.title }}</template>
</h2> </h2>
</UiScrollReveal> </UiScrollReveal>
<UiScrollReveal :delay="100"> <UiScrollReveal :delay="100">
<p class="mt-4 text-lg leading-relaxed text-white/60"> <p :class="['leading-relaxed', compact ? 'mt-2 text-sm' : 'mt-4 text-lg text-white/60']"
:style="compact ? 'color: hsl(var(--color-text-muted)); font-size: 0.85rem' : ''">
{{ content?.book.description }} {{ content?.book.description }}
</p> </p>
</UiScrollReveal> </UiScrollReveal>
<UiScrollReveal :delay="200"> <UiScrollReveal :delay="200">
<div class="mt-8 flex flex-col gap-3 sm:flex-row sm:gap-4"> <BookActions
<UiBaseButton @click="$emit('open-player')"> :show-chapters="showChapters"
<div class="i-lucide-play mr-2 h-5 w-5" /> @open-player="$emit('open-player')"
{{ content?.book.cta.player }} @open-pdf="$emit('open-pdf')"
</UiBaseButton> />
<UiBaseButton variant="accent" @click="$emit('open-pdf')">
<div class="i-lucide-book-open mr-2 h-5 w-5" />
{{ content?.book.cta.pdf }}
</UiBaseButton>
</div>
</UiScrollReveal> </UiScrollReveal>
</div> </div>
</div> </div>
@@ -49,15 +50,36 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
withDefaults(defineProps<{
showChapters?: boolean
compact?: boolean
}>(), {
showChapters: true,
compact: false,
})
defineEmits<{ defineEmits<{
'open-player': [] 'open-player': []
'open-pdf': [] 'open-pdf': []
}>() }>()
const { data: content } = await usePageContent('home') const { data: content } = await usePageContent('home')
const titleParts = computed(() => {
const title = content.value?.book.title ?? ''
const idx = title.indexOf('—')
if (idx === -1) return [title, '']
return [title.slice(0, idx).trim(), '— ' + title.slice(idx + 1).trim()]
})
const titleLine1 = computed(() => titleParts.value[0])
const titleLine2 = computed(() => titleParts.value[1])
</script> </script>
<style scoped> <style scoped>
.section-book-compact {
padding: 0;
}
.book-cover-wrapper { .book-cover-wrapper {
perspective: 800px; perspective: 800px;
display: flex; display: flex;
@@ -65,33 +87,40 @@ const { data: content } = await usePageContent('home')
} }
.book-cover-3d { .book-cover-3d {
aspect-ratio: 3 / 4; width: 100%;
max-width: 360px;
aspect-ratio: 1756 / 2480;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 0.75rem; border-radius: 0.75rem;
overflow: hidden; overflow: hidden;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-text) / 0.1);
box-shadow: box-shadow:
0 12px 40px hsl(0 0% 0% / 0.5), 0 12px 40px hsl(var(--color-text) / 0.15),
0 0 0 1px hsl(20 8% 15%); 0 0 0 1px hsl(var(--color-text) / 0.08);
transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1), transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
box-shadow 0.5s ease; box-shadow 0.5s ease;
max-width: 360px; }
.book-cover-3d--compact {
max-width: 120px;
} }
.book-cover-3d:hover { .book-cover-3d:hover {
transform: rotateY(-8deg) rotateX(3deg) scale(1.02); transform: rotateY(-8deg) rotateX(3deg) scale(1.02);
box-shadow: box-shadow:
12px 16px 48px hsl(0 0% 0% / 0.6), 12px 16px 48px hsl(var(--color-text) / 0.2),
0 0 0 1px hsl(12 76% 48% / 0.2); 0 0 0 1px hsl(var(--color-primary) / 0.2);
} }
.book-cover-img {
width: 200%;
height: 100%;
object-fit: cover;
transform: translateX(-50%);
}
.heading-section { .book-heading {
font-size: clamp(1.625rem, 4vw, 2.125rem); font-size: clamp(1.625rem, 4vw, 2.125rem);
} }
.book-heading--compact {
font-size: clamp(0.95rem, 2.5vw, 1.15rem);
line-height: 1.35;
}
</style> </style>
+53 -1
View File
@@ -1,5 +1,37 @@
<template> <template>
<section class="section-padding"> <section class="relative overflow-hidden section-padding">
<!-- Shadok scale: balance with absurd objects -->
<svg class="shadok-scale" viewBox="0 0 260 280" fill="none" aria-hidden="true">
<!-- Vertical pole -->
<line x1="130" y1="40" x2="130" y2="240" stroke="currentColor" stroke-width="4" stroke-linecap="round" opacity="0.8"/>
<!-- Base triangle -->
<polygon points="100,240 160,240 130,220" fill="currentColor" opacity="0.5"/>
<!-- Horizontal beam -->
<line x1="40" y1="80" x2="220" y2="60" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.7"/>
<!-- Pivot circle -->
<circle cx="130" cy="70" r="8" fill="currentColor" opacity="0.6"/>
<!-- Left pan (chain lines) -->
<line x1="40" y1="80" x2="30" y2="120" stroke="currentColor" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
<line x1="40" y1="80" x2="70" y2="120" stroke="currentColor" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
<!-- Left pan dish -->
<path d="M20 120 Q50 135 80 120" stroke="currentColor" stroke-width="2.5" fill="currentColor" opacity="0.35"/>
<!-- Absurd object on left: a snail -->
<ellipse cx="50" cy="112" rx="14" ry="8" fill="currentColor" opacity="0.5"/>
<path d="M60 108 Q68 95 58 92 Q48 90 52 100" stroke="currentColor" stroke-width="2" fill="none" opacity="0.4"/>
<!-- Right pan (chain lines) -->
<line x1="220" y1="60" x2="210" y2="100" stroke="currentColor" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
<line x1="220" y1="60" x2="250" y2="100" stroke="currentColor" stroke-width="2" stroke-linecap="round" opacity="0.5"/>
<!-- Right pan dish -->
<path d="M200 100 Q230 115 260 100" stroke="currentColor" stroke-width="2.5" fill="currentColor" opacity="0.35"/>
<!-- Absurd object on right: a star/coin -->
<circle cx="230" cy="92" r="10" fill="currentColor" opacity="0.4"/>
<circle cx="230" cy="92" r="5" fill="currentColor" opacity="0.2"/>
<!-- Tiny Shadok perched on top -->
<ellipse cx="130" cy="35" rx="12" ry="10" fill="currentColor" opacity="0.6"/>
<circle cx="130" cy="22" r="7" fill="currentColor" opacity="0.55"/>
<circle cx="133" cy="20" r="2" fill="currentColor" opacity="0.3"/>
</svg>
<div class="container-content"> <div class="container-content">
<div class="mx-auto max-w-3xl text-center"> <div class="mx-auto max-w-3xl text-center">
<UiScrollReveal> <UiScrollReveal>
@@ -41,4 +73,24 @@ const { data: content } = await usePageContent('home')
.heading-section { .heading-section {
font-size: clamp(1.625rem, 4vw, 2.125rem); font-size: clamp(1.625rem, 4vw, 2.125rem);
} }
.shadok-scale {
position: absolute;
left: 2%;
top: 8%;
width: clamp(120px, 16vw, 240px);
opacity: 0.3;
pointer-events: none;
color: hsl(var(--color-primary));
animation: shadok-float-scale 9s ease-in-out infinite;
}
@keyframes shadok-float-scale {
0%, 100% { transform: translateY(0) rotate(0deg); }
50% { transform: translateY(-10px) rotate(2deg); }
}
@media (max-width: 768px) {
.shadok-scale { display: none; }
}
</style> </style>
-78
View File
@@ -1,78 +0,0 @@
<template>
<section class="section-padding">
<div class="container-content">
<UiScrollReveal>
<div class="gw-card">
<div class="flex flex-col items-center text-center gap-4 md:flex-row md:text-left md:gap-8">
<!-- Icon -->
<div class="gw-icon-wrapper">
<div class="i-lucide-sparkles h-8 w-8 text-amber-400" />
</div>
<!-- Content -->
<div class="flex-1">
<span class="inline-block mb-2 rounded-full bg-amber-400/15 px-3 py-0.5 font-mono text-xs tracking-widest text-amber-400 uppercase">
{{ content?.grateWizardTeaser.kicker }}
</span>
<h3 class="heading-h3 font-display font-bold text-white">
{{ content?.grateWizardTeaser.title }}
</h3>
<p class="mt-2 text-sm text-white/60 md:text-base leading-relaxed">
{{ content?.grateWizardTeaser.description }}
</p>
</div>
<!-- CTAs -->
<div class="shrink-0 flex flex-col gap-2">
<UiBaseButton @click="launch">
<div class="i-lucide-external-link mr-2 h-4 w-4" />
{{ content?.grateWizardTeaser.cta.launch }}
</UiBaseButton>
<UiBaseButton variant="ghost" :to="content?.grateWizardTeaser.cta.more.to">
{{ content?.grateWizardTeaser.cta.more.label }}
<div class="i-lucide-arrow-right ml-2 h-4 w-4" />
</UiBaseButton>
</div>
</div>
</div>
</UiScrollReveal>
</div>
</section>
</template>
<script setup lang="ts">
const { launch } = useGrateWizard()
const { data: content } = await usePageContent('home')
</script>
<style scoped>
.gw-card {
border: 1px solid hsl(40 80% 50% / 0.2);
border-radius: 1rem;
padding: 1.5rem 2rem;
background: linear-gradient(135deg, hsl(40 80% 50% / 0.05), hsl(40 80% 50% / 0.02));
box-shadow: 0 0 40px hsl(40 80% 50% / 0.05);
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gw-card:hover {
border-color: hsl(40 80% 50% / 0.35);
box-shadow: 0 0 60px hsl(40 80% 50% / 0.1);
}
.heading-h3 {
font-size: clamp(1.25rem, 3vw, 1.625rem);
}
.gw-icon-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 3.5rem;
height: 3.5rem;
border-radius: 0.75rem;
background: hsl(40 80% 50% / 0.1);
border: 1px solid hsl(40 80% 50% / 0.15);
flex-shrink: 0;
}
</style>
-57
View File
@@ -1,57 +0,0 @@
<template>
<section class="relative overflow-hidden section-padding">
<!-- Background gradient -->
<div class="absolute inset-0 bg-gradient-to-b from-primary/10 via-transparent to-surface-bg" />
<div class="absolute inset-0 bg-[radial-gradient(ellipse_at_top,hsl(12_76%_48%/0.15),transparent_70%)]" />
<!-- Content -->
<div class="container-content relative z-10 px-4">
<div class="mx-auto max-w-3xl text-center">
<UiScrollReveal>
<p class="mb-3 font-mono text-sm tracking-widest text-primary uppercase">
{{ content?.hero.kicker }}
</p>
</UiScrollReveal>
<UiScrollReveal :delay="100">
<h1 class="font-display font-extrabold leading-tight tracking-tight">
<span class="hero-title text-gradient">{{ content?.hero.title }}</span>
</h1>
</UiScrollReveal>
<UiScrollReveal :delay="200">
<p class="mt-6 text-lg leading-relaxed text-white/60 md:text-xl">
{{ content?.hero.subtitle }}
</p>
</UiScrollReveal>
<UiScrollReveal :delay="300">
<p class="mt-4 text-base leading-relaxed text-white/45">
{{ content?.hero.footnote }}
</p>
</UiScrollReveal>
<UiScrollReveal :delay="400">
<div class="mt-8 flex justify-center">
<UiBaseButton variant="ghost" :to="content?.hero.cta.to">
{{ content?.hero.cta.label }}
<div class="i-lucide-arrow-right ml-2 h-4 w-4" />
</UiBaseButton>
</div>
</UiScrollReveal>
<HomeMessages />
</div>
</div>
</section>
</template>
<script setup lang="ts">
const { data: content } = await usePageContent('home')
</script>
<style scoped>
.hero-title {
font-size: clamp(2.25rem, 7vw, 4rem);
}
</style>
+42
View File
@@ -0,0 +1,42 @@
<template>
<blockquote v-if="lines?.length" class="cites">
<p v-for="(line, i) in lines" :key="i" class="cite" :class="{ 'cite--lead': i === 0 }">{{ line }}</p>
</blockquote>
</template>
<script setup lang="ts">
defineProps<{
lines: string[]
}>()
</script>
<style scoped>
.cites {
margin: 0;
padding: 0;
max-width: 46rem;
}
.cite {
margin: 0;
font-family: var(--font-display);
font-weight: 500;
font-size: clamp(1.15rem, 2.4vw, 1.55rem);
line-height: 1.3;
letter-spacing: -0.015em;
color: hsl(var(--color-text) / 0.62);
}
.cite + .cite {
margin-top: 0.3rem;
}
.cite--lead {
font-weight: 800;
font-size: clamp(1.6rem, 3.6vw, 2.3rem);
line-height: 1.1;
letter-spacing: -0.03em;
color: hsl(var(--color-text));
margin-bottom: 0.6rem;
}
</style>
+708
View File
@@ -0,0 +1,708 @@
<template>
<div
ref="root"
class="console"
:class="{ 'console--compact': compact, 'console--still': reduced, 'console--hand': engaged }"
@pointerenter="pointerIn = true"
@pointerleave="pointerIn = false"
@focusin="focusIn = true"
@focusout="onFocusOut"
>
<div class="console-board">
<!-- Scale, read bottom to top: from asservissement to émancipation -->
<div class="console-scale" aria-hidden="true">
<span class="console-scale-bottom">{{ bottomLabel }}</span>
<span class="console-scale-line" />
<span class="console-scale-top">{{ topLabel }}</span>
</div>
<div
class="console-faders"
role="tablist"
:aria-label="`Les trois axes — ${bottomLabel} ou ${topLabel}`"
@keydown="onKeydown"
>
<button
v-for="(axis, i) in axes"
:id="`fader-${uid}-${axis.key}`"
:key="axis.key"
ref="tabs"
type="button"
role="tab"
class="fader"
:class="{ 'fader--active': axis.key === active, 'fader--held': held.has(axis.key), 'fader--rising': rising.has(axis.key), 'fader--stopped': stopped.has(axis.key) }"
:style="{ '--hue': `var(${axis.hue})`, '--level': levels[axis.key] ?? 0, '--i': i }"
:data-axis="axis.key"
:aria-selected="axis.key === active"
:aria-controls="`panel-${uid}`"
:tabindex="axis.key === active ? 0 : -1"
@pointerdown="lastPointer = $event.pointerType"
@pointerenter="onEnter($event, axis.key)"
@pointerleave="hoverKey = null"
@focus="onFocus($event, axis.key)"
@click="onClick($event, axis.key)"
>
<span class="fader-track" aria-hidden="true">
<span class="fader-fill" />
<span class="fader-cap" />
</span>
<span class="fader-label">
<span class="fader-prefix">{{ prefix }}</span>
<span class="fader-name">{{ axis.short }}</span>
</span>
<span class="fader-lever">{{ axis.lever }}</span>
</button>
</div>
</div>
<div
v-if="current"
:id="`panel-${uid}`"
role="tabpanel"
class="console-panel"
:style="{ '--hue': `var(${current.hue})` }"
:aria-labelledby="`fader-${uid}-${current.key}`"
>
<Transition name="panel" mode="out-in">
<div :key="current.key" class="panel-inner">
<p class="panel-upstream">
<span class="panel-upstream-label">{{ upstreamLabel }}</span>
{{ current.lever }}
</p>
<h2 class="panel-title">{{ current.title }}</h2>
<p v-if="current.promise" class="panel-promise">{{ current.promise }}</p>
<ul class="panel-tools">
<li v-for="tool in current.items" :key="tool.label">
<NuxtLink v-if="tool.to" :to="tool.to" class="panel-tool">
<span class="panel-tool-name">{{ tool.label }}</span>
<span v-if="tool.presentation" class="panel-tool-app">{{ tool.presentation.title }}</span>
<span v-if="tool.status || tool.gestation" class="panel-tool-state">{{ (tool.status || 'En gestation').toLowerCase() }}</span>
</NuxtLink>
</li>
</ul>
<p v-if="current.key === 'numerique' && stacks?.length" class="panel-stacks">
<span class="panel-stacks-label">{{ stacksLabel }}</span>
<span v-for="s in stacks.slice(0, maxStacks)" :key="s.name" class="panel-stack">{{ s.name }}</span>
<NuxtLink v-if="stacks.length > maxStacks && stacksTo" :to="stacksTo" class="panel-stacks-more">
+{{ stacks.length - maxStacks }}
</NuxtLink>
</p>
<NuxtLink :to="current.to" class="panel-more">
Voir l'axe {{ current.short }}
<span class="i-lucide-arrow-right h-4 w-4" aria-hidden="true" />
</NuxtLink>
</div>
</Transition>
</div>
</div>
</template>
<script setup lang="ts">
import type { AxisKey, HomeAxis, HomeStack } from '~/composables/useHomeData'
const props = withDefaults(defineProps<{
axes: HomeAxis[]
prefix?: string
topLabel?: string
bottomLabel?: string
upstreamLabel?: string
stacks?: HomeStack[]
stacksLabel?: string
stacksTo?: string
maxStacks?: number
compact?: boolean
}>(), {
prefix: 'Autonomie',
topLabel: 'Émancipation',
bottomLabel: 'Asservissement',
maxStacks: 8,
upstreamLabel: 'en amont',
stacksLabel: 'En service',
compact: false,
})
const active = defineModel<AxisKey>({ default: 'numerique' })
const uid = useId()
const root = ref<HTMLElement | null>(null)
const tabs = ref<HTMLButtonElement[]>([])
const current = computed(() => props.axes.find(a => a.key === active.value) ?? props.axes[0])
// ── Motion ──────────────────────────────────────────────────────────────
// Yvv's instructions, word for word: docs/consignes-yvv.md (29/09 and 03/11).
//
// Before any gesture (29/09): the cursors move on their own, slowly; the low
// ones drift, and every few beats another axis is pushed up to its own
// graduation (03/11), the level the hand gives it.
// SSR renders every cursor at the bottom, so the first move is the rise.
//
// The visitor's hand takes over for good (03/11): from the first hover,
// keyboard focus or tap on a cursor, the rotation stops. The touched cursor
// replays its rise, from the bottom to its own graduation, and its panel
// shows. The others are never lowered by the hand (orch decision, 03/11
// 13h10): a cursor already touched stays at its graduation; a cursor never
// touched that the rotation was taking down stops where it is at the first
// gesture; one it was taking up finishes, gently, its rise to the level the
// rotation gave it, then stays there.
const BEAT_MS = 2600
const BEATS_PER_AXIS = 3
/** Graduation of each axis, from asservissement (0) to émancipation (1) */
const GRADUATION: Record<AxisKey, number> = { numerique: 3 / 4, economie: 1 / 2, politique: 2 / 3 }
/** The focus and the click of one tap, within this delay, give one rise */
const SAME_GESTURE_MS = 500
const levels = reactive<Partial<Record<AxisKey, number>>>({})
/** Cursors the hand has touched: they no longer glide with the rotation */
const held = reactive(new Set<AxisKey>())
/** Cursors replaying their rise (fast transition) */
const rising = reactive(new Set<AxisKey>())
/** Untouched cursors the first gesture stopped on their way down */
const stopped = reactive(new Set<AxisKey>())
const reduced = ref(false)
const visible = ref(true)
const engaged = ref(false)
const pointerIn = ref(false)
const focusIn = ref(false)
const hoverKey = ref<AxisKey | null>(null)
let lastPointer = ''
/** The tab the arrow keys are moving the focus to: its focus is the same gesture */
let keyFocus: AxisKey | null = null
/** When a keyboard focus last raised each cursor (to pair it with the click of a tap) */
const focusRiseAt: Partial<Record<AxisKey, number>> = {}
const riseRun: Partial<Record<AxisKey, number>> = {}
let beat = 0
let timer: ReturnType<typeof setInterval> | undefined
function place() {
props.axes.forEach((axis, i) => {
// The axis put forward goes up to its own graduation, as under the hand
if (axis.key === active.value) {
levels[axis.key] = GRADUATION[axis.key] ?? 0.75
return
}
levels[axis.key] = reduced.value ? 0.3 : 0.3 + 0.14 * Math.sin(beat * 0.9 + i * 2.1)
})
}
function faderEl(key: AxisKey) {
return root.value?.querySelector<HTMLElement>(`[data-axis="${key}"]`) ?? null
}
/** First gesture: the rotation stops for good. An untouched cursor on its way down stops
* where it is drawn; one on its way up finishes its glide to the target the rotation gave it.
* `touched` is the cursor of this gesture: it replays its rise anyway */
function engage(touched?: AxisKey) {
if (engaged.value) return
engaged.value = true
clearInterval(timer)
for (const axis of props.axes) {
const key = axis.key
if (key === touched || held.has(key)) continue
const el = faderEl(key)
const drawn = el ? Number.parseFloat(getComputedStyle(el).getPropertyValue('--level')) : Number.NaN
const target = levels[key] ?? 0
if (Number.isFinite(drawn) && drawn > target) {
stopped.add(key)
levels[key] = drawn
}
}
}
/** The touched cursor replays its rise: back to the bottom, then up to its graduation */
async function rise(key: AxisKey) {
held.add(key)
stopped.delete(key)
const target = GRADUATION[key] ?? 0.75
if (reduced.value) {
levels[key] = target
return
}
const run = (riseRun[key] ?? 0) + 1
riseRun[key] = run
rising.delete(key)
levels[key] = 0
await nextTick()
// Commit the bottom (no transition) before the rise starts from it
const el = faderEl(key)
if (el) getComputedStyle(el).getPropertyValue('--level')
if (riseRun[key] !== run) return
rising.add(key)
levels[key] = target
}
/** A cursor under the visitor's hand: it rises and its panel shows. Every rollover replays
* the rise, however soon after the previous one (Yvv, 03/11) */
function touch(key: AxisKey) {
engage(key)
active.value = key
rise(key)
}
/** The panel of a cursor already raised by this same gesture: no second rise */
function select(key: AxisKey) {
engage(key)
active.value = key
}
function onEnter(e: PointerEvent, key: AxisKey) {
// A finger scrolling over a cursor is not a rollover: taps go through the click
if (e.pointerType === 'touch') return
hoverKey.value = key
touch(key)
}
function isKeyboardFocus(el: HTMLElement) {
try {
return el.matches(':focus-visible')
}
catch {
return true
}
}
function onFocus(e: FocusEvent, key: AxisKey) {
// The arrow key that moved the focus here already raised the cursor
if (keyFocus === key) return
// Keyboard focus is a rollover; a focus from the mouse or a tap is handled elsewhere
if (hoverKey.value === key || !isKeyboardFocus(e.currentTarget as HTMLElement)) return
focusRiseAt[key] = Date.now()
touch(key)
}
function onClick(e: MouseEvent, key: AxisKey) {
const pointer = (e as PointerEvent).pointerType || lastPointer
lastPointer = ''
// A tap is a rollover: one rise per tap, even when the browser also gave it a keyboard focus
const tapFocused = Date.now() - (focusRiseAt[key] ?? 0) < SAME_GESTURE_MS
if (pointer === 'touch' && !tapFocused) return touch(key)
// A click with no hover nor focus before it (a screen reader, a script) raises the cursor
// with its panel; after a hover or a keyboard focus, the cursor is already up
if (hoverKey.value !== key && !held.has(key)) return touch(key)
select(key)
}
function onFocusOut(e: FocusEvent) {
focusIn.value = !!root.value?.contains(e.relatedTarget as Node | null)
}
function advance() {
const idx = props.axes.findIndex(a => a.key === active.value)
active.value = props.axes[(idx + 1) % props.axes.length]!.key
}
function onBeat() {
if (!visible.value || engaged.value) return
beat++
if (!pointerIn.value && !focusIn.value && beat % BEATS_PER_AXIS === 0) advance()
place()
}
watch(active, () => {
if (!engaged.value) place()
})
function onKeydown(e: KeyboardEvent) {
lastPointer = ''
const keys = ['ArrowRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown', 'Home', 'End']
if (!keys.includes(e.key)) return
e.preventDefault()
// From the tab that has the focus: a hover may have selected another axis meanwhile
const from = (e.target as HTMLElement | null)?.closest<HTMLElement>('[data-axis]')?.dataset.axis
const idx = props.axes.findIndex(a => a.key === (from ?? active.value))
const last = props.axes.length - 1
let next = idx
if (e.key === 'ArrowRight' || e.key === 'ArrowUp') next = idx === last ? 0 : idx + 1
if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') next = idx === 0 ? last : idx - 1
if (e.key === 'Home') next = 0
if (e.key === 'End') next = last
const key = props.axes[next]!.key
touch(key)
nextTick(() => {
// focus() fires the focus event at once: it is part of this key press, not a new rise
keyFocus = key
tabs.value[next]?.focus()
keyFocus = null
})
}
onMounted(() => {
reduced.value = window.matchMedia('(prefers-reduced-motion: reduce)').matches
requestAnimationFrame(place)
if (reduced.value) return
timer = setInterval(onBeat, BEAT_MS)
const io = new IntersectionObserver(([entry]) => { visible.value = !!entry?.isIntersecting })
if (root.value) io.observe(root.value)
onUnmounted(() => {
clearInterval(timer)
io.disconnect()
})
})
</script>
<style scoped>
.console {
--track-h: 11rem;
--cap-h: 1.25rem;
display: grid;
gap: 1.25rem;
}
.console--compact {
--track-h: 8rem;
}
/* ── Board ── */
.console-board {
display: grid;
grid-template-columns: auto 1fr;
gap: 0.9rem;
padding: 1.25rem 1.25rem 1rem;
border-radius: 16px;
background: hsl(var(--color-surface));
box-shadow:
inset 0 1px 0 hsl(var(--color-text) / 0.04),
0 18px 40px -24px hsl(var(--color-text) / 0.35);
}
/* Vertical scale, read from bottom to top */
.console-scale {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
height: var(--track-h);
writing-mode: vertical-rl;
transform: rotate(180deg);
font-family: var(--font-display);
font-size: 0.72rem;
letter-spacing: 0.02em;
white-space: nowrap;
}
.console-scale-bottom {
color: hsl(var(--color-text) / 0.45);
}
.console-scale-top {
font-weight: 800;
color: hsl(var(--color-text));
}
.console-scale-line {
flex: 1;
width: 1px;
background: linear-gradient(to bottom, hsl(var(--color-text) / 0.12), hsl(var(--color-text) / 0.45));
}
.console-faders {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
}
/* ── Fader ── */
.fader {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.55rem;
padding: 0 0.25rem 0.25rem;
border-radius: 12px;
cursor: pointer;
/* --level is a registered property (main.css): the cursors glide */
transition: --level 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95);
transition-delay: calc(var(--i) * 160ms);
}
/* A cursor the hand has touched no longer glides: it drops to the bottom at once, then
replays its rise. At the first gesture, an untouched cursor on its way down stops where it
is; one on its way up finishes its glide, then the rotation is over */
.fader--held,
.fader--stopped {
transition: none;
}
.fader--held.fader--rising {
transition: --level 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.fader:focus-visible {
outline: 2px solid hsl(var(--hue));
outline-offset: 2px;
}
.fader-track {
position: relative;
width: 0.5rem;
height: var(--track-h);
border-radius: 999px;
background: hsl(var(--color-text) / 0.1);
}
.fader-fill {
position: absolute;
inset: auto 0 0 0;
height: calc(var(--level) * (var(--track-h) - var(--cap-h)) + var(--cap-h) / 2);
border-radius: inherit;
background: hsl(var(--hue) / 0.45);
transition: background 0.6s ease;
}
.fader--active .fader-fill {
background: hsl(var(--hue));
}
.fader-cap {
position: absolute;
left: 50%;
bottom: 0;
width: 2.6rem;
height: var(--cap-h);
margin-left: -1.3rem;
border-radius: 6px;
background: hsl(var(--color-bg));
box-shadow:
0 1px 0 hsl(var(--color-text) / 0.08),
0 4px 10px -2px hsl(var(--color-text) / 0.3);
transform: translateY(calc(-1 * var(--level) * (var(--track-h) - var(--cap-h))));
}
/* Cap groove */
.fader-cap::after {
content: '';
position: absolute;
left: 0.45rem;
right: 0.45rem;
top: 50%;
height: 2px;
margin-top: -1px;
border-radius: 2px;
background: hsl(var(--hue));
}
.fader-label {
display: flex;
flex-direction: column;
align-items: center;
line-height: 1.1;
}
.fader-prefix {
font-family: var(--font-mono);
font-size: 0.6rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: hsl(var(--color-text) / 0.5);
}
.fader-name {
font-family: var(--font-display);
font-weight: 800;
font-size: 1.05rem;
letter-spacing: -0.01em;
color: hsl(var(--color-text) / 0.65);
transition: color 0.6s ease;
}
.fader--active .fader-name {
color: hsl(var(--hue));
}
.fader-lever {
padding: 0.2rem 0.55rem;
border-radius: 20px;
font-family: var(--font-display);
font-weight: 600;
font-size: 0.8rem;
line-height: 1.2;
text-align: center;
color: hsl(var(--color-text) / 0.8);
background: hsl(var(--hue) / 0.1);
transition: background 0.6s ease, color 0.6s ease;
}
.fader--active .fader-lever {
color: hsl(var(--color-bg));
background: hsl(var(--hue));
}
/* ── Panel ── */
.console-panel {
position: relative;
padding: 1.25rem 1.4rem 1.2rem;
border-radius: 16px;
background: hsl(var(--hue) / 0.08);
}
.panel-upstream {
margin: 0 0 0.35rem;
font-family: var(--font-mono);
font-size: 0.72rem;
color: hsl(var(--hue));
}
.panel-upstream-label {
color: hsl(var(--color-text) / 0.45);
}
.panel-upstream-label::after {
content: ' ↑ ';
}
.panel-title {
margin: 0;
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.35rem, 2.6vw, 1.7rem);
letter-spacing: -0.025em;
line-height: 1.1;
color: hsl(var(--color-text));
}
.panel-promise {
margin: 0.5rem 0 0;
font-size: 0.98rem;
line-height: 1.5;
color: hsl(var(--color-text) / 0.78);
}
.panel-tools {
list-style: none;
margin: 0.9rem 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.panel-tool {
display: inline-flex;
align-items: baseline;
gap: 0.4rem;
padding: 0.4rem 0.8rem;
border-radius: 20px;
background: hsl(var(--color-bg) / 0.7);
font-size: 0.85rem;
color: hsl(var(--color-text));
transition: transform 0.1s ease, background 0.2s ease;
}
.panel-tool:hover {
transform: translateY(-1px);
background: hsl(var(--color-bg));
}
.panel-tool:active {
transform: translateY(0);
}
.panel-tool-name {
font-weight: 700;
}
.panel-tool-app {
font-family: var(--font-mono);
font-size: 0.7rem;
color: hsl(var(--hue));
}
.panel-tool-state {
font-family: var(--font-mono);
font-size: 0.65rem;
color: hsl(var(--color-text) / 0.45);
}
.panel-stacks {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.25rem 0.6rem;
margin: 0.9rem 0 0;
font-size: 0.8rem;
color: hsl(var(--color-text) / 0.7);
}
.panel-stacks-label {
font-family: var(--font-mono);
font-size: 0.68rem;
color: hsl(var(--color-text) / 0.45);
}
.panel-stacks-more {
font-family: var(--font-mono);
font-size: 0.72rem;
color: hsl(var(--hue));
}
.panel-stack::before {
content: '';
display: inline-block;
width: 0.4rem;
height: 0.4rem;
margin-right: 0.3rem;
border-radius: 50%;
background: hsl(var(--hue));
vertical-align: 0.05em;
}
.panel-more {
display: inline-flex;
align-items: center;
gap: 0.35rem;
margin-top: 1rem;
font-family: var(--font-display);
font-weight: 700;
font-size: 0.92rem;
color: hsl(var(--hue));
}
.panel-more:hover span {
transform: translateX(2px);
}
.panel-more span {
transition: transform 0.12s ease;
}
.panel-enter-active,
.panel-leave-active {
transition: opacity 0.18s ease, transform 0.18s ease;
}
.panel-enter-from {
opacity: 0;
transform: translateY(6px);
}
.panel-leave-to {
opacity: 0;
transform: translateY(-4px);
}
@media (max-width: 480px) {
.console { --track-h: 8.5rem; }
.console-board { padding: 1rem 0.6rem 0.75rem; gap: 0.35rem; }
.console-scale { font-size: 0.62rem; }
.fader-cap { width: 2.2rem; margin-left: -1.1rem; }
.fader-name { font-size: 0.88rem; }
.fader-prefix { font-size: 0.52rem; letter-spacing: 0.08em; }
.fader-lever { font-size: 0.68rem; padding: 0.2rem 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
.fader,
.fader--held.fader--rising,
.fader-fill,
.fader-name,
.fader-lever,
.panel-enter-active,
.panel-leave-active {
transition: none;
}
}
</style>
+368
View File
@@ -0,0 +1,368 @@
<template>
<div class="format">
<header v-if="format && showHeader" class="format-head">
<!-- The accordion player at the end of the title, on its baseline: on the event card it stood
at the height of the reader, and its ground line touched the card's link (rules c, h) -->
<h2 class="format-title">{{ format.title }}<UiOiseauPose nom="accordeoniste" pose="perche" bout left="16px" :w="84" retourne ton="accent" :seuil="1024" /></h2>
<p class="format-text">{{ format.text }}</p>
</header>
<div class="format-grid">
<!-- Éditorial : le livre et les chansons -->
<article v-if="book" class="format-card format-card--book">
<!-- The reader peeks over the book card: only her head and book show -->
<UiOiseauPose nom="lectrice" pose="derriere" left="76%" bottom="calc(100% - 48px)" :w="104" />
<div
class="format-cover"
role="img"
:aria-label="book.coverAlt"
:style="{ backgroundImage: `url(${book.coverImage})` }"
/>
<div class="format-body">
<p class="format-kicker">{{ book.kicker }}</p>
<h3 class="format-card-title">{{ book.title }}</h3>
<p class="format-desc">{{ book.description }}</p>
<div class="format-actions">
<button type="button" class="fbtn fbtn--main" @click="$emit('open-player')">
<span class="i-lucide-play h-4 w-4" aria-hidden="true" />
{{ book.cta?.player }}
</button>
<button type="button" class="fbtn" @click="$emit('open-pdf')">
<span class="i-lucide-book-open h-4 w-4" aria-hidden="true" />
{{ book.cta?.pdf }}
</button>
<NuxtLink to="/economique/modele-eco" class="fbtn fbtn--quiet">
<span class="i-lucide-list h-4 w-4" aria-hidden="true" />
Présentation des chapitres
</NuxtLink>
<NuxtLink to="/economique/commande" class="fbtn fbtn--quiet">
<span class="i-lucide-shopping-bag h-4 w-4" aria-hidden="true" />
Commandez le livre
</NuxtLink>
</div>
</div>
</article>
<!-- Événementiel -->
<NuxtLink v-if="evenement" :to="evenement.to" class="format-card format-card--event">
<p class="format-kicker">
{{ evenement.teaser }}
<span v-if="evenement.gestation" class="format-state">en gestation</span>
</p>
<h3 class="format-card-title format-card-title--event">{{ evenement.subtitle }}</h3>
<p v-if="evenement.tagline" class="format-tagline">{{ evenement.tagline }}</p>
<ul v-if="evenement.config.length" class="format-config">
<li v-for="c in evenement.config" :key="c.label">
<span :class="`i-lucide-${c.icon}`" class="h-4 w-4" aria-hidden="true" />
<span>{{ c.label }}</span>
</li>
</ul>
<span class="format-more">
Voir l'événement
<span class="i-lucide-arrow-right h-4 w-4" aria-hidden="true" />
</span>
</NuxtLink>
</div>
<!-- Reproduction + à qui l'on s'adresse -->
<div v-if="evenement?.reproduction || hero?.addressees?.length" class="format-repro">
<p v-if="evenement?.reproduction" class="format-repro-line">
<span class="format-basins" aria-hidden="true"><i v-for="n in 5" :key="n" /></span>
{{ evenement.reproduction }}
</p>
<div v-if="hero?.addressees?.length" class="format-audience">
<p class="format-audience-label">{{ hero.audience }}</p>
<ul>
<li v-for="a in hero.addressees" :key="a.label">
<strong>{{ a.label }}</strong> {{ a.value }}
</li>
</ul>
</div>
</div>
</div>
</template>
<script setup lang="ts">
withDefaults(defineProps<{
format?: { title: string, text: string }
book?: any
evenement?: any
hero?: any
showHeader?: boolean
}>(), {
showHeader: true,
})
defineEmits<{
'open-player': []
'open-pdf': []
}>()
</script>
<style scoped>
.format {
display: grid;
gap: 1.5rem;
}
.format-head {
max-width: 44rem;
}
.format-title {
margin: 0;
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.75rem, 4.2vw, 2.75rem);
letter-spacing: -0.03em;
line-height: 1.05;
color: hsl(var(--color-text));
}
.format-text {
margin: 0.75rem 0 0;
font-size: 1.1rem;
line-height: 1.5;
color: hsl(var(--color-text) / 0.72);
}
.format-grid {
isolation: isolate;
display: grid;
gap: 1.25rem;
}
@media (min-width: 1024px) {
.format-grid { grid-template-columns: 1.35fr 1fr; }
}
.format-card {
position: relative;
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 1.5rem;
border-radius: 16px;
background: hsl(var(--color-surface));
}
.format-card--book {
flex-direction: row;
gap: 1.5rem;
}
.format-cover {
flex-shrink: 0;
width: clamp(6.5rem, 16vw, 10rem);
aspect-ratio: 1756 / 2480;
border-radius: 6px;
background-size: cover;
background-position: center;
box-shadow: 0 16px 30px -18px hsl(var(--color-text) / 0.6);
}
.format-body {
min-width: 0;
}
.format-kicker {
margin: 0;
font-family: var(--font-mono);
font-size: 0.72rem;
color: hsl(var(--axis-eco));
}
.format-card--event .format-kicker {
color: hsl(var(--axis-cit));
}
.format-state {
margin-left: 0.35rem;
color: hsl(var(--color-text) / 0.5);
}
.format-state::before {
content: '◌ ';
}
.format-card-title {
margin: 0.3rem 0 0;
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.3rem, 2.4vw, 1.6rem);
letter-spacing: -0.02em;
line-height: 1.12;
color: hsl(var(--color-text));
}
.format-card-title--event {
font-weight: 700;
}
.format-desc {
margin: 0.5rem 0 0;
font-size: 0.95rem;
line-height: 1.5;
color: hsl(var(--color-text) / 0.72);
}
.format-actions {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-top: 1rem;
}
.fbtn {
display: inline-flex;
align-items: center;
gap: 0.4rem;
min-height: 2.5rem;
padding: 0.45rem 1rem;
border-radius: 20px;
font-size: 0.86rem;
font-weight: 700;
color: hsl(var(--color-text) / 0.85);
background: hsl(var(--color-text) / 0.07);
transition: transform 0.1s ease, background 0.2s ease;
}
.fbtn:hover { transform: translateY(-1px); background: hsl(var(--axis-eco) / 0.14); }
.fbtn:active { transform: translateY(0); }
.fbtn--main {
color: hsl(var(--color-bg));
background: hsl(var(--axis-eco));
}
.fbtn--main:hover { background: hsl(var(--axis-eco) / 0.88); }
.fbtn--quiet {
font-weight: 400;
background: transparent;
}
.format-card--event {
color: hsl(var(--color-text));
transition: transform 0.12s ease;
}
.format-card--event:hover {
transform: translateY(-3px);
}
.format-tagline {
margin: 0.2rem 0 0;
font-family: var(--font-display);
font-size: 1.05rem;
color: hsl(var(--color-text) / 0.7);
}
.format-config {
list-style: none;
margin: 0.75rem 0 0;
padding: 0;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.5rem;
font-size: 0.85rem;
color: hsl(var(--color-text) / 0.78);
}
.format-config li {
display: flex;
align-items: center;
gap: 0.45rem;
}
.format-config li > span:first-child {
color: hsl(var(--axis-cit));
flex-shrink: 0;
}
.format-more {
display: inline-flex;
align-items: center;
gap: 0.35rem;
margin-top: auto;
padding-top: 1rem;
font-family: var(--font-display);
font-weight: 700;
color: hsl(var(--axis-cit));
}
/* Reproduction */
.format-repro {
display: grid;
gap: 1.25rem;
padding: 1.25rem 0 0;
}
@media (min-width: 768px) {
.format-repro {
grid-template-columns: 1fr 1fr;
align-items: start;
}
}
.format-repro-line {
margin: 0;
font-family: var(--font-display);
font-weight: 700;
font-size: clamp(1.15rem, 2.2vw, 1.4rem);
line-height: 1.25;
letter-spacing: -0.015em;
color: hsl(var(--color-text));
}
/* One basin, then its copies */
.format-basins {
display: flex;
gap: 0.35rem;
margin-bottom: 0.6rem;
}
.format-basins i {
display: block;
width: 0.8rem;
height: 0.8rem;
border-radius: 50%;
box-shadow: inset 0 0 0 1.5px hsl(var(--axis-cit) / 0.6);
}
.format-basins i:first-child {
background: hsl(var(--axis-cit));
box-shadow: none;
}
.format-audience-label {
margin: 0 0 0.5rem;
font-family: var(--font-mono);
font-size: 0.72rem;
color: hsl(var(--color-text) / 0.5);
}
.format-audience ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.3rem;
font-size: 0.95rem;
color: hsl(var(--color-text) / 0.7);
}
.format-audience strong {
color: hsl(var(--color-text));
}
@media (max-width: 640px) {
.format-card--book { flex-direction: column; }
.format-config { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.fbtn, .format-card--event { transition: none; }
}
</style>
+226
View File
@@ -0,0 +1,226 @@
<template>
<div class="va">
<!-- Hero : the headline, and the three cursors to push -->
<section class="va-hero">
<div class="container-content va-hero-grid">
<div class="va-intro">
<h1 class="va-h1">
<span class="va-h1-a">{{ heading[0] }}</span>
<span class="va-h1-b">{{ heading[1] }}</span>
</h1>
<p class="va-axes">
<template v-for="(seg, i) in axesLine" :key="i">
<span v-if="seg.hue" class="va-axes-word" :style="{ '--hue': `var(${seg.hue})` }">{{ seg.text }}</span>
<template v-else>{{ seg.text }}</template>
</template>
</p>
<p class="va-means">{{ heading[4] }}</p>
<p v-if="hero.approach" class="va-approach">{{ hero.approach }}</p>
</div>
<div class="va-console">
<p class="va-console-title">
{{ heading[2] }}
<!-- The DJ stands on the console board, looking at the faders -->
<UiOiseauPose nom="dj" pose="perche" right="2rem" bottom="-0.75rem" :w="80" retourne ton="accent" mobile />
</p>
<HomeConsole
v-model="active"
:axes="axes"
:prefix="consoleLabels?.prefix"
:top-label="consoleLabels?.top"
:bottom-label="consoleLabels?.bottom"
:stacks="bouquet?.inService"
:stacks-to="lpk?.to"
:stacks-label="lpk ? `En service chez ${lpk.name} :` : 'En service :'"
/>
</div>
</div>
</section>
<!-- Pourquoi -->
<section class="va-band">
<div class="container-content">
<HomeCitations :lines="hero.citations ?? []" />
</div>
</section>
<!-- Le format -->
<section class="va-section">
<div class="container-content">
<HomeFormat
:format="format"
:book="book"
:evenement="evenement"
:hero="hero"
@open-player="$emit('open-player')"
@open-pdf="$emit('open-pdf')"
/>
</div>
</section>
<!-- La boîte à outils -->
<section class="va-section va-section--tools">
<div class="container-content">
<h2 class="va-h2">{{ toolboxTitle }}</h2>
<HomeToolbox
:oiseaux="toolboxOiseaux"
:axes="axes"
:lpk="lpk"
:bouquet="bouquet"
:gratewizard="gratewizard"
anchors
@open-player="$emit('open-player')"
@open-pdf="$emit('open-pdf')"
/>
</div>
</section>
</div>
</template>
<script setup lang="ts">
import type { AxisKey } from '~/composables/useHomeData'
import type { OiseauPlace } from '~/utils/oiseauPose'
defineEmits<{
'open-player': []
'open-pdf': []
}>()
const { hero, axes, lpk, bouquet, evenement, book, format, gratewizard, consoleLabels, toolboxTitle } = await useHomeData()
const heading = computed<string[]>(() => hero.value.heading ?? [])
// « Autonomie numérique, économique, citoyenne. » — each axis word in its own hue
const AXIS_WORDS: Record<string, string> = {
numérique: '--axis-num',
économique: '--axis-eco',
citoyenne: '--axis-cit',
}
const axesLine = computed(() =>
(heading.value[3] ?? '')
.split(/(numérique|économique|citoyenne)/)
.filter(Boolean)
.map(text => ({ text, hue: AXIS_WORDS[text] })))
const active = ref<AxisKey>('numerique')
// The governance crew stands in the empty space under the citoyenne column of the toolbox
const toolboxOiseaux: Partial<Record<AxisKey, OiseauPlace[]>> = {
politique: [
{ nom: 'capitaine', pose: 'libre', left: 'calc(34% - 75px)', bottom: '-190px', w: 150, op: 0.24 },
{ nom: 'matelot', pose: 'libre', left: 'calc(80% - 40px)', bottom: '-300px', w: 80, op: 0.26, retourne: true },
],
}
</script>
<style scoped>
.va-hero {
position: relative;
overflow: hidden;
padding: clamp(2.5rem, 6vw, 5rem) 1rem clamp(2.5rem, 5vw, 4rem);
}
.va-hero-grid {
position: relative;
z-index: 1;
display: grid;
gap: 2.5rem;
align-items: center;
}
@media (min-width: 1024px) {
.va-hero-grid {
grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
gap: 4rem;
}
}
.va-h1 {
margin: 0;
display: flex;
flex-direction: column;
font-family: var(--font-display);
letter-spacing: -0.035em;
line-height: 0.98;
}
.va-h1-a {
font-weight: 800;
font-size: clamp(2.4rem, 6.4vw, 4.6rem);
color: hsl(var(--color-text));
}
.va-h1-b {
margin-top: 0.3rem;
font-weight: 400;
font-size: clamp(1.6rem, 3.8vw, 2.7rem);
letter-spacing: -0.025em;
color: hsl(var(--color-text) / 0.55);
}
.va-axes {
margin: 1.75rem 0 0;
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.3rem, 2.6vw, 1.85rem);
letter-spacing: -0.025em;
line-height: 1.15;
color: hsl(var(--color-text));
}
.va-axes-word {
color: hsl(var(--hue));
}
.va-means {
margin: 0.35rem 0 0;
font-family: var(--font-display);
font-style: italic;
font-size: 1.05rem;
color: hsl(var(--color-text) / 0.6);
}
.va-approach {
margin: 1.75rem 0 0;
max-width: 26rem;
font-size: 1rem;
line-height: 1.5;
color: hsl(var(--color-text) / 0.8);
}
.va-approach::after {
content: ' ↓';
color: hsl(var(--color-primary));
}
@media (min-width: 1024px) {
.va-approach::after { content: ' →'; }
}
.va-console-title {
position: relative;
margin: 0 0 0.75rem;
font-family: var(--font-display);
font-weight: 700;
font-size: 1.1rem;
color: hsl(var(--color-accent));
}
.va-band {
padding: clamp(2.5rem, 6vw, 4.5rem) 1rem;
background: hsl(var(--color-surface) / 0.55);
}
.va-section {
padding: clamp(3rem, 7vw, 5.5rem) 1rem 0;
}
.va-h2 {
margin: 0 0 1.5rem;
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.75rem, 4.2vw, 2.75rem);
letter-spacing: -0.03em;
line-height: 1.05;
color: hsl(var(--color-text));
}
</style>
+163 -51
View File
@@ -1,62 +1,80 @@
<template> <template>
<div class="mt-16"> <section class="messages-section">
<div class="container-content messages-grid">
<!-- Formulaire --> <!-- Formulaire -->
<UiScrollReveal :delay="500"> <UiScrollReveal>
<div class="message-form-card"> <div class="message-form-card">
<h3 class="font-display text-lg font-bold text-white mb-4">Laisser un message</h3> <!-- The postwoman stands on the message form -->
<UiOiseauPose nom="factrice" pose="perche" right="30px" :w="88" retourne :seuil="1200" />
<h3 class="font-display text-lg font-bold form-title mb-4">Laisser un message</h3>
<form v-if="!submitted" class="space-y-3" @submit.prevent="send"> <form v-if="!submitted" class="space-y-3" @submit.prevent="send">
<div class="grid gap-3 sm:grid-cols-2"> <input
<input v-model="form.author"
v-model="form.author" type="text"
type="text" placeholder="Votre nom"
placeholder="Votre nom *" class="msg-input"
required />
class="msg-input" <p class="hint-text text-xs -mt-1 px-1">Pour recevoir une réponse, laissez votre e-mail dans le message.</p>
/> <select v-model="form.type" class="msg-input msg-input--select">
<input <option value="question">Question</option>
v-model="form.email" <option value="suggestion">Suggestion</option>
type="email" <option value="retour">Retour d'expérience</option>
placeholder="Email (optionnel)" </select>
class="msg-input"
/>
</div>
<textarea <textarea
v-model="form.text" v-model="form.text"
placeholder="Votre message *" placeholder="Votre message"
required
rows="3" rows="3"
class="msg-input resize-none" class="msg-input resize-none"
/> />
<div class="flex justify-end"> <div class="flex justify-end">
<button type="submit" class="btn-primary text-sm" :disabled="sending"> <button type="submit" class="btn-primary text-sm" :disabled="sending || !canSend">
<div v-if="sending" class="i-lucide-loader-2 h-4 w-4 animate-spin mr-2" /> <div v-if="sending" class="i-lucide-loader-2 h-4 w-4 animate-spin mr-2" />
Envoyer Envoyer
</button> </button>
</div> </div>
</form> </form>
<div v-else class="text-center py-4"> <div v-else class="text-center py-6">
<div class="i-lucide-check-circle h-8 w-8 text-green-400 mx-auto mb-2" /> <div class="i-lucide-heart-handshake h-10 w-10 text-primary mx-auto mb-3" />
<p class="text-white/80">Merci pour votre message !</p> <p class="msg-confirm-title font-display text-lg font-semibold">Merci pour votre message !</p>
<p class="text-white/40 text-sm mt-1">Il sera visible après modération.</p> <p class="msg-confirm-sub text-sm mt-2 max-w-md mx-auto leading-relaxed">
Il sera lu et traité dans un délai... humainement raisonnable.
</p>
<p class="msg-confirm-note text-xs mt-4 italic">
Chaque message est un premier pas dans l'aventure.
</p>
</div> </div>
</div> </div>
</UiScrollReveal> </UiScrollReveal>
<!-- 2 derniers messages publiés --> <!-- 2 derniers messages publiés -->
<UiScrollReveal v-if="messages?.length" :delay="600"> <UiScrollReveal v-if="messages?.length" :delay="100">
<div class="mt-8 space-y-4"> <div class="space-y-4">
<h3 class="font-display text-lg font-bold text-white/80 text-center">Derniers messages</h3> <h3 class="font-display text-lg font-bold section-title">Derniers messages</h3>
<div v-for="msg in messages.slice(0, 2)" :key="msg.id" class="message-card"> <div v-for="msg in messages.slice(0, 2)" :key="msg.id" class="message-card">
<p class="text-white/80 text-sm leading-relaxed">{{ msg.text }}</p> <!-- En-tête auteur -->
<div class="mt-2 flex items-center gap-2 text-xs text-white/40"> <div class="flex items-center gap-2 mb-2">
<span class="font-semibold text-white/60">{{ msg.author }}</span> <span class="msg-author font-semibold text-sm">{{ msg.author }}</span>
<span>&middot;</span> <span class="type-pill">{{ typeLabel(msg.type) }}</span>
<span>{{ formatDate(msg.createdAt) }}</span> <span class="msg-date text-xs ml-auto">{{ formatDate(msg.createdAt) }}</span>
</div>
<!-- Texte du message -->
<p class="msg-text text-sm leading-relaxed">{{ msg.text }}</p>
<!-- Réponse -->
<div v-if="msg.reply?.text" class="reply-thread">
<div class="reply-connector" aria-hidden="true" />
<div class="reply-block">
<div class="flex items-center gap-1.5 mb-1">
<div class="i-lucide-corner-down-right h-3 w-3 reply-icon" />
<span class="reply-author text-xs font-semibold">Le Librodrome</span>
</div>
<p class="reply-text text-sm leading-relaxed italic">{{ msg.reply.text }}</p>
</div>
</div> </div>
</div> </div>
<div class="text-center"> <div>
<NuxtLink to="/messages" class="btn-ghost text-sm"> <NuxtLink to="/messages" class="btn-ghost text-sm">
Voir tous les messages Voir tous les messages
<div class="i-lucide-arrow-right ml-1 h-3.5 w-3.5" /> <div class="i-lucide-arrow-right ml-1 h-3.5 w-3.5" />
@@ -64,17 +82,32 @@
</div> </div>
</div> </div>
</UiScrollReveal> </UiScrollReveal>
</div> </div>
</section>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const { data: messages } = await useFetch('/api/messages') const { data: messages } = await useFetch('/api/messages')
const form = reactive({ author: '', email: '', text: '' }) const form = reactive({ author: '', text: '', type: 'question' })
const sending = ref(false) const sending = ref(false)
const submitted = ref(false) const submitted = ref(false)
const canSend = computed(() => form.text.trim().length > 0)
const TYPE_LABELS: Record<string, string> = {
reaction: 'Réaction',
question: 'Question',
suggestion: 'Suggestion',
retour: 'Retour',
}
function typeLabel(type: string) {
return TYPE_LABELS[type] ?? type
}
async function send() { async function send() {
if (!canSend.value) return
sending.value = true sending.value = true
try { try {
await $fetch('/api/messages', { method: 'POST', body: form }) await $fetch('/api/messages', { method: 'POST', body: form })
@@ -105,37 +138,116 @@ function formatDate(iso: string) {
</script> </script>
<style scoped> <style scoped>
/* ── Couleurs adaptatives (dark + light) ── */
.form-title { color: hsl(var(--color-text)); }
.hint-text { color: hsl(var(--color-text) / 0.35); }
.section-title { color: hsl(var(--color-text) / 0.85); }
.msg-author { color: hsl(var(--color-text) / 0.75); }
.msg-date { color: hsl(var(--color-text) / 0.38); }
.msg-text { color: hsl(var(--color-text) / 0.78); white-space: pre-line; }
.msg-confirm-title { color: hsl(var(--color-text) / 0.95); }
.msg-confirm-sub { color: hsl(var(--color-text) / 0.6); }
.msg-confirm-note { color: hsl(var(--color-primary) / 0.65); }
.reply-icon { color: hsl(var(--color-primary) / 0.5); }
.reply-author { color: hsl(var(--color-primary) / 0.8); }
.reply-text { color: hsl(var(--color-text) / 0.62); }
/* ── Mise en page ── */
.messages-section {
padding: clamp(3rem, 7vw, 5.5rem) 1rem 2rem;
}
.messages-grid {
display: grid;
gap: 2rem;
align-items: start;
}
@media (min-width: 1024px) {
.messages-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
/* ── Carte formulaire ── */
.message-form-card { .message-form-card {
background: hsl(20 8% 6%); position: relative;
border: 1px solid hsl(20 8% 14%); background: hsl(var(--color-surface));
border-radius: 0.75rem; border-radius: 16px;
padding: 1.5rem; padding: 1.5rem;
} }
.msg-input { .msg-input {
width: 100%; width: 100%;
padding: 0.5rem 0.75rem; min-height: 2.5rem;
border-radius: 0.5rem; padding: 0.55rem 0.85rem;
border: 1px solid hsl(20 8% 18%); border-radius: 12px;
background: hsl(20 8% 4%); border: none;
color: white; background: hsl(var(--color-bg));
font-size: 0.875rem; color: hsl(var(--color-text));
transition: border-color 0.2s; font-size: 0.95rem;
font-family: inherit;
transition: box-shadow 0.2s;
}
.msg-input--select {
width: auto;
cursor: pointer;
} }
.msg-input::placeholder { .msg-input::placeholder {
color: hsl(20 8% 40%); color: hsl(var(--color-text) / 0.35);
} }
.msg-input:focus { .msg-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); box-shadow: 0 0 0 2px hsl(var(--color-primary) / 0.5);
} }
/* ── Carte message ── */
.message-card { .message-card {
background: hsl(20 8% 6%); background: hsl(var(--color-surface));
border: 1px solid hsl(20 8% 14%); border-radius: 16px;
border-radius: 0.75rem;
padding: 1rem 1.25rem; padding: 1rem 1.25rem;
} }
.type-pill {
font-size: 0.6rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.1rem 0.45rem;
border-radius: 9999px;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary) / 0.7);
}
/* ── Réponse avec liaison graphique ── */
.reply-thread {
position: relative;
display: flex;
gap: 0;
margin-top: 0.75rem;
padding-left: 1.25rem;
}
.reply-connector {
position: absolute;
left: 0.5rem;
top: -0.5rem;
bottom: 0.5rem;
width: 2px;
background: linear-gradient(
to bottom,
hsl(var(--color-primary) / 0.35),
hsl(var(--color-primary) / 0.15)
);
border-radius: 2px;
}
.reply-block {
flex: 1;
background: hsl(var(--color-primary) / 0.05);
border-left: 2px solid hsl(var(--color-primary) / 0.25);
border-radius: 0 0.5rem 0.5rem 0;
padding: 0.6rem 0.875rem;
}
</style> </style>
+198
View File
@@ -0,0 +1,198 @@
<template>
<div class="tool" :class="{ 'tool--gestation': tool.gestation }">
<div class="tool-main">
<span class="tool-icon" aria-hidden="true">
<span v-if="tool.icon === 'g1'" class="tool-g1">Ğ1</span>
<span v-else :class="`i-lucide-${tool.icon}`" class="h-4 w-4" />
</span>
<div class="tool-text">
<component :is="tool.to ? NuxtLink : 'span'" :to="tool.to" class="tool-name">
{{ tool.label }}
</component>
<UiStatusBadge class="tool-status" :status="tool.status" :gestation="tool.gestation" :since="tool.since" />
<p class="tool-desc">{{ tool.description }}</p>
<p v-if="tool.presentation" class="tool-app">
<strong>{{ tool.presentation.title }}</strong> — {{ tool.presentation.text }}
</p>
</div>
</div>
<div v-if="tool.actions?.length" class="tool-actions">
<template v-for="action in tool.actions" :key="action.label">
<a
v-if="action.href"
:href="action.href"
target="_blank"
rel="noopener noreferrer"
class="tool-btn"
:class="{ 'tool-btn--main': action.highlight }"
>
<span :class="`i-lucide-${action.icon}`" class="h-3.5 w-3.5" aria-hidden="true" />
{{ action.label }}
</a>
<NuxtLink
v-else-if="action.to"
:to="action.to"
class="tool-btn"
:class="{ 'tool-btn--quiet': action.secondary }"
>
<span :class="`i-lucide-${action.icon}`" class="h-3.5 w-3.5" aria-hidden="true" />
{{ action.label }}
</NuxtLink>
<button
v-else
type="button"
class="tool-btn"
:class="{ 'tool-btn--main': action.highlight }"
@click="$emit('action', action.id)"
>
<span :class="`i-lucide-${action.icon}`" class="h-3.5 w-3.5" aria-hidden="true" />
{{ action.label }}
</button>
</template>
<span v-for="action in tool.actions.filter(a => a.note)" :key="`note-${action.label}`" class="tool-note">
{{ action.note }}
</span>
</div>
</div>
</template>
<script setup lang="ts">
import type { HomeTool } from '~/composables/useHomeData'
defineProps<{
tool: HomeTool
}>()
defineEmits<{
action: [id: string]
}>()
const NuxtLink = resolveComponent('NuxtLink')
</script>
<style scoped>
.tool {
padding: 0.85rem 0.9rem;
border-radius: 12px;
background: hsl(var(--color-bg) / 0.55);
}
.tool-main {
display: flex;
gap: 0.7rem;
}
.tool-icon {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 2rem;
height: 2rem;
border-radius: 10px;
background: hsl(var(--hue) / 0.12);
color: hsl(var(--hue));
}
.tool-g1 {
font-family: var(--font-display);
font-weight: 800;
font-size: 0.8rem;
}
.tool-text {
min-width: 0;
}
.tool-name {
font-family: var(--font-display);
font-weight: 700;
font-size: 1rem;
color: hsl(var(--color-text));
}
a.tool-name:hover {
color: hsl(var(--hue));
}
.tool-status {
margin-left: 0.4rem;
}
.tool-note {
align-self: center;
font-family: var(--font-mono);
font-size: 0.66rem;
color: hsl(var(--axis-cit));
}
.tool-desc {
margin: 0.2rem 0 0;
font-size: 0.85rem;
line-height: 1.45;
color: hsl(var(--color-text) / 0.68);
}
.tool-app {
margin: 0.35rem 0 0;
font-size: 0.78rem;
line-height: 1.4;
color: hsl(var(--color-text) / 0.6);
}
.tool-app strong {
font-family: var(--font-mono);
font-weight: 500;
color: hsl(var(--hue));
}
.tool-actions {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
margin-top: 0.7rem;
padding-left: 2.7rem;
}
.tool-btn {
display: inline-flex;
align-items: center;
gap: 0.35rem;
min-height: 2.25rem;
padding: 0.3rem 0.8rem;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 700;
color: hsl(var(--color-text) / 0.8);
background: hsl(var(--color-text) / 0.06);
transition: transform 0.1s ease, background 0.2s ease;
}
.tool-btn:hover {
transform: translateY(-1px);
background: hsl(var(--hue) / 0.14);
}
.tool-btn:active {
transform: translateY(0);
}
.tool-btn--main {
color: hsl(var(--color-bg));
background: hsl(var(--hue));
}
.tool-btn--main:hover {
background: hsl(var(--hue) / 0.88);
}
.tool-btn--quiet {
font-weight: 400;
background: transparent;
}
@media (prefers-reduced-motion: reduce) {
.tool-btn { transition: none; }
}
</style>
+251
View File
@@ -0,0 +1,251 @@
<template>
<div class="toolbox-wrap">
<div class="toolbox" :class="{ 'toolbox--single': axes.length === 1 }">
<section
v-for="axis in axes"
:id="anchors ? axis.to.slice(1) : undefined"
:key="axis.key"
class="toolbox-axis"
:style="{ '--hue': `var(${axis.hue})` }"
:aria-labelledby="`tb-${uid}-${axis.key}`"
>
<UiOiseauPose v-for="o in oiseaux?.[axis.key] ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" class="toolbox-oiseau" />
<header class="toolbox-head">
<p class="toolbox-lever">{{ axis.lever }}</p>
<h3 :id="`tb-${uid}-${axis.key}`" class="toolbox-title">
<NuxtLink :to="axis.to">{{ axis.title }}</NuxtLink>
</h3>
<p v-if="showPromise && axis.promise" class="toolbox-promise">{{ axis.promise }}</p>
</header>
<ul class="toolbox-tools">
<li v-for="tool in axis.items" :key="tool.label">
<HomeToolItem :tool="tool" @action="onAction" />
</li>
</ul>
<!-- Numérique : the stacks LaPlanK serves -->
<NuxtLink
v-if="axis.key === 'numerique' && lpk && bouquet"
:to="lpk.to"
class="toolbox-lpk"
>
<span class="toolbox-lpk-head">
<strong>{{ lpk.name }}</strong> <span>{{ lpk.text }}</span>
</span>
<span class="toolbox-lpk-stacks">
<span v-for="s in bouquet.inService" :key="s.name" class="toolbox-lpk-stack">{{ s.name }}</span>
</span>
<span class="toolbox-lpk-more">
{{ bouquet.title }} · {{ bouquet.stacks.length }}
<span class="i-lucide-arrow-right h-3.5 w-3.5" aria-hidden="true" />
</span>
</NuxtLink>
<!-- Économique : grateWizard -->
<button
v-if="axis.key === 'economie' && gratewizard"
type="button"
class="toolbox-gw"
@click="launch()"
>
<span class="i-lucide-sparkles h-4 w-4" aria-hidden="true" />
<span class="toolbox-gw-text">
<strong>{{ gratewizard.title }}</strong>
<span>{{ gratewizard.subtitle }}</span>
</span>
<span class="i-lucide-arrow-up-right h-4 w-4" aria-hidden="true" />
</button>
</section>
</div>
</div>
</template>
<script setup lang="ts">
import type { AxisKey, HomeAxis } from '~/composables/useHomeData'
import type { OiseauPlace } from '~/utils/oiseauPose'
withDefaults(defineProps<{
axes: HomeAxis[]
lpk?: { name: string, text: string, to: string }
bouquet?: { title: string, inService: { name?: string }[], stacks: unknown[] } | null
gratewizard?: { title: string, subtitle: string }
showPromise?: boolean
anchors?: boolean
/** Birds standing by an axis column (home page) */
oiseaux?: Partial<Record<AxisKey, OiseauPlace[]>>
}>(), {
showPromise: true,
anchors: false,
})
const emit = defineEmits<{
'open-player': []
'open-pdf': []
}>()
const uid = useId()
const { launch } = useGrateWizard()
function onAction(id: string) {
if (id === 'open-player') emit('open-player')
else if (id === 'open-pdf') emit('open-pdf')
}
</script>
<style scoped>
.toolbox-wrap {
container-type: inline-size;
}
.toolbox {
display: grid;
gap: 1.25rem;
}
@container (min-width: 60rem) {
.toolbox:not(.toolbox--single) {
grid-template-columns: repeat(3, minmax(0, 1fr));
align-items: start;
}
}
/* The birds under a column only make sense with the three columns side by side */
@container (max-width: 59.99rem) {
.toolbox-oiseau { display: none; }
}
.toolbox-axis {
position: relative;
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 1.25rem;
border-radius: 16px;
background: hsl(var(--color-surface));
box-shadow: inset 0 3px 0 hsl(var(--hue));
scroll-margin-top: calc(var(--header-height) + 1rem);
}
.toolbox-lever {
margin: 0;
font-family: var(--font-mono);
font-size: 0.7rem;
color: hsl(var(--hue));
}
.toolbox-title {
margin: 0.15rem 0 0;
font-family: var(--font-display);
font-weight: 800;
font-size: 1.3rem;
letter-spacing: -0.02em;
color: hsl(var(--color-text));
}
.toolbox-title a:hover {
color: hsl(var(--hue));
}
.toolbox-promise {
margin: 0.35rem 0 0;
font-size: 0.9rem;
line-height: 1.45;
color: hsl(var(--color-text) / 0.7);
}
.toolbox-tools {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
/* LaPlanK */
.toolbox-lpk {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0.9rem;
border-radius: 12px;
background: hsl(var(--hue) / 0.1);
color: hsl(var(--color-text));
transition: transform 0.12s ease;
}
.toolbox-lpk:hover {
transform: translateY(-3px);
}
.toolbox-lpk-head {
font-size: 0.82rem;
line-height: 1.4;
color: hsl(var(--color-text) / 0.7);
}
.toolbox-lpk-head strong {
font-family: var(--font-display);
font-size: 1rem;
color: hsl(var(--hue));
}
.toolbox-lpk-stacks {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
}
.toolbox-lpk-stack {
padding: 0.15rem 0.55rem;
border-radius: 20px;
font-size: 0.75rem;
background: hsl(var(--color-bg) / 0.75);
}
.toolbox-lpk-more {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-family: var(--font-mono);
font-size: 0.7rem;
color: hsl(var(--hue));
}
/* grateWizard */
.toolbox-gw {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
padding: 0.85rem 0.9rem;
border-radius: 12px;
text-align: left;
color: hsl(var(--hue));
background: hsl(var(--hue) / 0.1);
transition: transform 0.12s ease;
}
.toolbox-gw:hover {
transform: translateY(-3px);
}
.toolbox-gw-text {
flex: 1;
display: flex;
flex-direction: column;
font-size: 0.8rem;
color: hsl(var(--color-text) / 0.7);
}
.toolbox-gw-text strong {
font-family: var(--font-display);
font-size: 1rem;
color: hsl(var(--color-text));
}
@media (prefers-reduced-motion: reduce) {
.toolbox-lpk, .toolbox-gw { transition: none; }
}
</style>
+53 -1
View File
@@ -1,5 +1,37 @@
<template> <template>
<section class="section-padding bg-surface-600/50"> <section class="relative overflow-hidden section-padding bg-surface-600/50">
<!-- Shadok musician: round character playing a trumpet -->
<svg class="shadok-musician" viewBox="0 0 220 280" fill="none" aria-hidden="true">
<!-- Body (ovoid) -->
<ellipse cx="100" cy="150" rx="45" ry="55" fill="currentColor" opacity="0.85"/>
<!-- Head -->
<circle cx="100" cy="80" r="28" fill="currentColor" opacity="0.8"/>
<!-- Eyes -->
<circle cx="90" cy="74" r="5" fill="currentColor" opacity="0.2"/>
<circle cx="110" cy="74" r="5" fill="currentColor" opacity="0.2"/>
<circle cx="91" cy="73" r="2" fill="currentColor" opacity="0.5"/>
<circle cx="111" cy="73" r="2" fill="currentColor" opacity="0.5"/>
<!-- Mouth (blowing) -->
<circle cx="125" cy="86" r="4" fill="currentColor" opacity="0.3"/>
<!-- Trumpet -->
<line x1="128" y1="86" x2="185" y2="78" stroke="currentColor" stroke-width="5" stroke-linecap="round" opacity="0.7"/>
<path d="M185 68 Q200 78 185 88" stroke="currentColor" stroke-width="3" fill="currentColor" opacity="0.45"/>
<!-- Trumpet valves -->
<circle cx="155" cy="80" r="3" fill="currentColor" opacity="0.3"/>
<circle cx="165" cy="79" r="3" fill="currentColor" opacity="0.3"/>
<!-- Music notes floating -->
<circle cx="205" cy="60" r="4" fill="currentColor" opacity="0.4"/>
<line x1="209" y1="60" x2="209" y2="42" stroke="currentColor" stroke-width="1.5" opacity="0.4"/>
<circle cx="195" cy="45" r="3" fill="currentColor" opacity="0.3"/>
<line x1="198" y1="45" x2="198" y2="30" stroke="currentColor" stroke-width="1.5" opacity="0.3"/>
<!-- Legs -->
<line x1="82" y1="202" x2="72" y2="255" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<line x1="118" y1="202" x2="128" y2="255" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" opacity="0.6"/>
<!-- Feet -->
<path d="M72 255 L58 258 M72 255 L66 261" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>
<path d="M128 255 L114 258 M128 255 L122 261" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>
</svg>
<div class="container-content"> <div class="container-content">
<UiScrollReveal> <UiScrollReveal>
<div class="text-center mb-12"> <div class="text-center mb-12">
@@ -48,4 +80,24 @@ const featuredSongs = computed(() => bookData.getSongs().slice(0, 6))
.heading-section { .heading-section {
font-size: clamp(1.625rem, 4vw, 2.125rem); font-size: clamp(1.625rem, 4vw, 2.125rem);
} }
.shadok-musician {
position: absolute;
right: 2%;
top: 4%;
width: clamp(110px, 15vw, 210px);
opacity: 0.28;
pointer-events: none;
color: hsl(var(--color-accent));
animation: shadok-float-musician 8s ease-in-out infinite;
}
@keyframes shadok-float-musician {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@media (max-width: 768px) {
.shadok-musician { display: none; }
}
</style> </style>
+2 -2
View File
@@ -11,7 +11,7 @@
<Transition name="slide-menu"> <Transition name="slide-menu">
<nav <nav
v-if="open" v-if="open"
class="fixed inset-y-0 right-0 z-50 w-72 bg-surface-600 border-l border-white/8 p-6 shadow-2xl" class="fixed inset-y-0 right-0 z-50 w-72 bg-[hsl(var(--color-surface))] border-l border-[hsl(var(--color-text)/0.1)] p-6 shadow-2xl"
aria-label="Menu mobile" aria-label="Menu mobile"
> >
<div class="flex items-center justify-between mb-8"> <div class="flex items-center justify-between mb-8">
@@ -29,7 +29,7 @@
<li v-for="item in nav" :key="item.to"> <li v-for="item in nav" :key="item.to">
<NuxtLink <NuxtLink
:to="item.to" :to="item.to"
class="flex items-center gap-3 rounded-lg px-4 py-3 text-base font-medium transition-colors hover:bg-white/5" class="flex items-center gap-3 rounded-lg px-4 py-3 text-base font-medium text-[hsl(var(--color-text)/0.7)] transition-colors hover:bg-[hsl(var(--color-text)/0.06)] hover:text-[hsl(var(--color-text))]"
active-class="bg-primary/10 text-primary" active-class="bg-primary/10 text-primary"
@click="emit('update:open', false)" @click="emit('update:open', false)"
> >
+35 -6
View File
@@ -1,19 +1,21 @@
<template> <template>
<footer class="border-t border-white/8 bg-surface-600 pb-[var(--player-height)]"> <footer class="footer-wrap border-t border-[hsl(var(--color-text)/0.1)] bg-[hsl(var(--color-surface))]">
<div class="container-content px-4 py-8"> <!-- The frieze of the birds (studio DA), standing on the bottom edge -->
<UiOiseau nom="frise" class="footer-shadok-pattern" />
<div class="container-content px-4 py-8 relative z-1">
<div class="flex flex-col items-center gap-4 md:flex-row md:justify-between"> <div class="flex flex-col items-center gap-4 md:flex-row md:justify-between">
<!-- Credits --> <!-- Credits -->
<p class="text-sm text-white/40"> <p class="text-sm text-[hsl(var(--color-text)/0.4)]">
{{ site?.footer.credits }} {{ site?.footer.credits }}
</p> </p>
<!-- Links --> <!-- Links -->
<nav class="flex items-center gap-4" aria-label="Liens du pied de page"> <nav v-if="links.length" class="flex items-center gap-4" aria-label="Liens du pied de page">
<NuxtLink <NuxtLink
v-for="link in site?.footer.links" v-for="link in links"
:key="link.to" :key="link.to"
:to="link.to" :to="link.to"
class="text-sm text-white/40 transition-colors hover:text-white/70" class="text-sm text-[hsl(var(--color-text)/0.4)] transition-colors hover:text-[hsl(var(--color-text)/0.7)]"
> >
{{ link.label }} {{ link.label }}
</NuxtLink> </NuxtLink>
@@ -25,4 +27,31 @@
<script setup lang="ts"> <script setup lang="ts">
const { data: site } = await useSiteContent() const { data: site } = await useSiteContent()
const router = useRouter()
/** The footer links of site.yml, without those to a page the site does not have yet: the link
* to /mentions-legales (03/11: no such page, its text is still to be written) shows again by
* itself once the page exists */
interface FooterLink { label: string, to: string }
const links = computed<FooterLink[]>(() => (((site.value as any)?.footer?.links ?? []) as FooterLink[])
.filter(l => /^(https?:|mailto:)/.test(l.to) || router.resolve(l.to).matched.length > 0))
</script> </script>
<style scoped>
.footer-wrap {
position: relative;
overflow: hidden;
}
/* The whole frieze fits in the footer (mask: contain), never cropped; pale under the links */
.footer-shadok-pattern {
position: absolute;
top: 0.75rem;
left: 0;
width: 100%;
height: calc(100% - 0.75rem);
opacity: 0.12;
pointer-events: none;
color: hsl(var(--color-primary));
}
</style>
+106 -9
View File
@@ -1,23 +1,39 @@
<template> <template>
<header class="sticky top-0 z-40 border-b border-white/8 bg-surface-bg/80 backdrop-blur-xl"> <header class="sticky top-0 z-40 border-b border-[hsl(var(--color-text)/0.08)] bg-[hsl(var(--color-bg)/0.85)] backdrop-blur-xl">
<div class="container-content flex h-[var(--header-height)] items-center justify-between px-4"> <div class="container-content flex h-[var(--header-height)] items-center justify-between px-4">
<!-- Logo --> <!-- Logo -->
<NuxtLink to="/" class="flex items-center gap-2 font-display text-lg font-bold tracking-tight"> <NuxtLink to="/" class="logo-link flex items-center" :aria-label="site?.identity.name || 'Le librodrome'">
<div class="i-lucide-book-open h-6 w-6 text-primary" /> <UiLogotype class="logo-lockup" />
<span class="text-gradient">{{ site?.identity.name }}</span>
</NuxtLink> </NuxtLink>
<!-- Desktop navigation --> <!-- Desktop navigation -->
<nav class="hidden md:flex items-center gap-1" aria-label="Navigation principale"> <nav class="nav-main hidden md:flex items-center gap-1" aria-label="Navigation principale">
<!-- Autonomie : prefix + axis buttons -->
<span class="nav-prefix">Autonomie&thinsp;:</span>
<NuxtLink <NuxtLink
v-for="item in site?.navigation" v-for="(item, i) in axes"
:key="item.to" :key="item.to"
:to="item.to" :to="item.to"
class="btn-ghost text-sm" class="btn-ghost text-sm nav-axis"
active-class="text-white! bg-white/5" :style="{ '--hue': `var(${AXIS_HUES[i] ?? '--color-primary'})` }"
active-class="!text-[hsl(var(--color-text))] bg-[hsl(var(--color-text)/0.06)]"
> >
{{ item.label }} {{ item.label }}
</NuxtLink> </NuxtLink>
<!-- Separator + extra nav -->
<span class="nav-sep" />
<NuxtLink
v-for="item in extra"
:key="item.to"
:to="item.to"
class="btn-ghost btn-ghost--muted text-sm"
active-class="!text-[hsl(var(--color-text))] bg-[hsl(var(--color-text)/0.06)]"
>
{{ item.label }}
</NuxtLink>
<UiPaletteSelector />
</nav> </nav>
<!-- Mobile menu button --> <!-- Mobile menu button -->
@@ -31,11 +47,92 @@
</div> </div>
<!-- Mobile menu --> <!-- Mobile menu -->
<LayoutNavMobile v-model:open="isMobileMenuOpen" :nav="site?.navigation ?? []" /> <LayoutNavMobile v-model:open="isMobileMenuOpen" :nav="allNav" />
</header> </header>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const { data: site } = await useSiteContent() const { data: site } = await useSiteContent()
const isMobileMenuOpen = ref(false) const isMobileMenuOpen = ref(false)
const axes = computed(() => (site.value as any)?.navigation?.axes ?? [])
const extra = computed(() => (site.value as any)?.navigation?.extra ?? [])
const allNav = computed(() => [...axes.value, ...extra.value])
// Same order as navigation.axes in site.yml: numérique, économique, citoyenne
const AXIS_HUES = ['--axis-num', '--axis-eco', '--axis-cit']
</script> </script>
<style scoped>
.logo-link {
transition: opacity 0.2s;
}
.logo-link:hover {
opacity: 0.8;
}
/* The validated lockup (studio DA, 27/10): the Geste already leans 25°, no rotation on hover */
.logo-lockup {
height: 2.3rem;
width: auto;
flex-shrink: 0;
transition: transform 0.2s ease;
}
.logo-link:hover .logo-lockup {
transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
.logo-lockup { transition: none; }
}
.nav-prefix {
font-family: var(--font-display);
font-size: 0.92rem;
font-weight: 500;
font-style: italic;
letter-spacing: 0.03em;
color: hsl(var(--color-text) / 0.4);
margin-right: 0.125rem;
}
.nav-axis::before {
content: '';
width: 0.45rem;
height: 0.45rem;
margin-right: 0.45rem;
border-radius: 50%;
background: hsl(var(--hue));
}
.nav-sep {
display: block;
width: 1px;
height: 1.25rem;
background: hsl(var(--color-text) / 0.12);
margin: 0 0.375rem;
}
.btn-ghost--muted {
color: hsl(var(--color-text) / 0.45);
}
/* From 768 to 1023 px the kit's logotype (166 px) and the whole navigation share the bar:
tighter buttons instead of an overflow; the logotype of the studio DA kit stays as it is */
@media (max-width: 1023px) {
.nav-main {
gap: 0.125rem;
}
.nav-axis,
.btn-ghost--muted {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.nav-sep {
margin: 0 0.25rem;
}
}
</style>
+397 -67
View File
@@ -2,41 +2,43 @@
<Transition name="player-slide"> <Transition name="player-slide">
<div <div
v-if="store.currentSong" v-if="store.currentSong"
class="player-bar fixed inset-x-0 bottom-0 z-70 border-t border-white/8 bg-surface-600/80 backdrop-blur-xl" ref="widgetRef"
class="mini-player"
> >
<!-- Expanded panel --> <!-- ═══ EXPANDED PANEL ═══ -->
<Transition name="panel-expand"> <Transition name="panel-expand">
<div v-if="store.isExpanded" class="border-b border-white/8"> <div v-if="isExpanded" class="mini-panel">
<div class="container-content grid gap-4 p-4 md:grid-cols-2"> <!-- Track info + visualizer -->
<PlayerVisualizer /> <div class="panel-top">
<PlayerPlaylist /> <div class="panel-track">
<p class="panel-title">{{ store.currentSong.title }}</p>
<p class="panel-artist">{{ store.currentSong.artist }}</p>
</div>
<div class="panel-viz">
<KeepAlive>
<PlayerVisualizer />
</KeepAlive>
</div>
</div> </div>
</div>
</Transition>
<!-- Progress bar (top of player) --> <!-- Progress -->
<PlayerProgress /> <div class="panel-progress">
<PlayerProgress />
<div class="panel-times">
<span>{{ store.formattedCurrentTime }}</span>
<span>{{ store.formattedDuration }}</span>
</div>
</div>
<!-- Main player bar --> <!-- Controls -->
<div class="container-content flex items-center gap-4 px-4 py-2"> <div class="panel-controls">
<!-- Track info --> <PlayerControls />
<div class="flex-1 min-w-0"> </div>
<PlayerTrackInfo />
</div>
<!-- Controls -->
<div class="flex items-center gap-4">
<PlayerControls />
</div>
<!-- Right section: mode + volume + expand -->
<div class="hidden md:flex items-center gap-3 flex-shrink-0">
<PlayerModeToggle />
<!-- Volume --> <!-- Volume -->
<div class="flex items-center gap-2"> <div class="panel-volume-row">
<button class="btn-ghost !p-1" @click="toggleMute"> <button class="panel-vol-btn" @click="toggleMute">
<div :class="volumeIcon" class="h-4 w-4" /> <div :class="volumeIcon" class="h-3.5 w-3.5" />
</button> </button>
<input <input
type="range" type="range"
@@ -44,39 +46,101 @@
max="1" max="1"
step="0.01" step="0.01"
:value="store.volume" :value="store.volume"
class="volume-slider w-20" class="volume-slider"
@input="handleVolumeChange" @input="handleVolumeChange"
> >
</div> </div>
<!-- Time display --> <!-- Lyrics (collapsed by default, available for standalone use) -->
<span class="font-mono text-xs text-white/40 w-24 text-center"> <div v-if="store.currentSong.lyrics && showLyrics" class="panel-lyrics">
{{ store.formattedCurrentTime }} / {{ store.formattedDuration }} <pre class="panel-lyrics-text">{{ store.currentSong.lyrics }}</pre>
</span> </div>
<!-- Expand toggle -->
<button <button
class="btn-ghost !p-2" v-if="store.currentSong.lyrics"
:aria-label="store.isExpanded ? 'Réduire' : 'Développer'" class="panel-lyrics-toggle"
@click="store.toggleExpanded()" @click="showLyrics = !showLyrics"
> >
<div :class="store.isExpanded ? 'i-lucide-chevron-down' : 'i-lucide-chevron-up'" class="h-4 w-4" /> <div :class="showLyrics ? 'i-lucide-chevron-up' : 'i-lucide-text'" class="h-3 w-3" />
{{ showLyrics ? 'Masquer les paroles' : 'Paroles' }}
</button> </button>
<!-- Playlist -->
<div class="panel-playlist">
<PlayerPlaylist />
</div>
</div> </div>
</Transition>
<!-- ═══ COMPACT PILL ═══ -->
<div class="mini-pill" @click="toggleExpanded">
<!-- Progress ring -->
<div class="pill-ring">
<svg viewBox="0 0 36 36" class="pill-ring-svg">
<circle
cx="18" cy="18" r="16"
fill="none"
stroke="hsl(0 0% 100% / 0.06)"
stroke-width="2"
/>
<circle
cx="18" cy="18" r="16"
fill="none"
stroke="hsl(12 76% 48%)"
stroke-width="2"
stroke-linecap="round"
:stroke-dasharray="circumference"
:stroke-dashoffset="circumference - (circumference * store.progress / 100)"
class="pill-ring-progress"
/>
</svg>
</div>
<!-- Title -->
<span class="pill-title">{{ store.currentSong.title }}</span>
<!-- Play/Pause -->
<button
class="pill-play"
:aria-label="store.isPlaying ? 'Pause' : 'Lecture'"
@click.stop="togglePlayPause"
>
<div :class="store.isPlaying ? 'i-lucide-pause' : 'i-lucide-play'" class="h-4 w-4" />
</button>
<!-- Next -->
<button class="pill-next" aria-label="Suivant" @click.stop="playNext" :disabled="!store.hasNext">
<div class="i-lucide-skip-forward h-3.5 w-3.5" />
</button>
<!-- Expand -->
<button
class="pill-expand"
:aria-label="isExpanded ? 'Réduire' : 'Développer'"
@click.stop="toggleExpanded"
>
<div :class="isExpanded ? 'i-lucide-chevron-down' : 'i-lucide-chevron-up'" class="h-4 w-4" />
</button>
</div> </div>
</div> </div>
</Transition> </Transition>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onClickOutside } from '@vueuse/core'
const store = usePlayerStore() const store = usePlayerStore()
const { setVolume } = useAudioPlayer() const { setVolume, togglePlayPause, playNext } = useAudioPlayer()
// Initialize media session
useMediaSession() useMediaSession()
useKeyboardShortcuts()
const widgetRef = ref<HTMLElement>()
const isExpanded = ref(false)
const showLyrics = ref(false)
let previousVolume = 0.8 let previousVolume = 0.8
const circumference = 2 * Math.PI * 16
const volumeIcon = computed(() => { const volumeIcon = computed(() => {
if (store.volume === 0) return 'i-lucide-volume-x' if (store.volume === 0) return 'i-lucide-volume-x'
if (store.volume < 0.3) return 'i-lucide-volume' if (store.volume < 0.3) return 'i-lucide-volume'
@@ -98,62 +162,328 @@ function toggleMute() {
setVolume(previousVolume) setVolume(previousVolume)
} }
} }
function toggleExpanded() {
isExpanded.value = !isExpanded.value
}
onClickOutside(widgetRef, () => {
if (isExpanded.value) isExpanded.value = false
})
</script> </script>
<style scoped> <style scoped>
.player-slide-enter-active, /* ═══════════════════════════════════════
.player-slide-leave-active { POSITION
transition: transform 0.3s var(--ease-out-expo); ═══════════════════════════════════════ */
.mini-player {
position: fixed;
bottom: 1rem;
transition: bottom 0.3s ease;
right: max(1rem, calc((100vw - 80rem) / 2));
z-index: 70;
display: flex;
flex-direction: column;
align-items: flex-end;
} }
.player-slide-enter-from, /* Book player open: stay above its navigation bar */
.player-slide-leave-to { :global(html.book-player-open .mini-player) {
transform: translateY(100%); bottom: 5.5rem;
} }
.panel-expand-enter-active, /* ═══════════════════════════════════════
.panel-expand-leave-active { PILL
═══════════════════════════════════════ */
.mini-pill {
display: flex;
align-items: center;
gap: 0.625rem;
padding: 0.375rem 0.5rem 0.375rem 0.5rem;
border-radius: 9999px;
background: hsl(20 8% 7% / 0.92);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
cursor: pointer;
transition: all 0.3s var(--ease-out-expo); transition: all 0.3s var(--ease-out-expo);
box-shadow: 0 4px 20px hsl(0 0% 0% / 0.35);
}
.mini-pill:hover {
background: hsl(20 8% 9% / 0.96);
}
/* Progress ring */
.pill-ring {
width: 1.75rem;
height: 1.75rem;
flex-shrink: 0;
}
.pill-ring-svg {
width: 100%;
height: 100%;
transform: rotate(-90deg);
}
.pill-ring-progress {
transition: stroke-dashoffset 0.3s ease;
}
/* Title */
.pill-title {
font-size: 0.8rem;
font-weight: 500;
color: hsl(0 0% 100% / 0.8);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 160px;
}
/* Play/Pause — white circle */
.pill-play {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 50%;
background: white;
border: none;
color: hsl(20 8% 6%);
cursor: pointer;
transition: transform 0.15s var(--ease-out-expo);
flex-shrink: 0;
}
.pill-play:hover { transform: scale(1.08); }
.pill-play:active { transform: scale(0.94); }
/* Next */
.pill-next {
display: flex;
align-items: center;
justify-content: center;
width: 1.5rem;
height: 1.5rem;
border-radius: 50%;
background: transparent;
border: none;
color: hsl(0 0% 100% / 0.6);
cursor: pointer;
transition: all 0.15s;
flex-shrink: 0;
}
.pill-next:hover { color: white; }
.pill-next:disabled { opacity: 0.3; cursor: default; }
/* Expand chevron */
.pill-expand {
display: flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 50%;
background: hsl(0 0% 100% / 0.08);
border: none;
color: hsl(0 0% 100% / 0.5);
cursor: pointer;
transition: all 0.2s;
flex-shrink: 0;
}
.pill-expand:hover { color: hsl(0 0% 100% / 0.9); background: hsl(0 0% 100% / 0.15); }
/* ═══════════════════════════════════════
PANEL
═══════════════════════════════════════ */
.mini-panel {
width: 360px;
margin-bottom: 0.5rem;
border-radius: 1rem;
background: hsl(20 8% 6% / 0.94);
backdrop-filter: blur(32px);
-webkit-backdrop-filter: blur(32px);
box-shadow: 0 8px 40px hsl(0 0% 0% / 0.4);
overflow: hidden; overflow: hidden;
} }
.panel-expand-enter-from, /* ─── Track + visualizer ─── */
.panel-expand-leave-to { .panel-top {
max-height: 0; padding: 1rem 1.25rem 0.5rem;
opacity: 0; }
.panel-track {
margin-bottom: 0.5rem;
}
.panel-title {
font-size: 0.95rem;
font-weight: 600;
color: white;
line-height: 1.3;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.panel-artist {
font-size: 0.75rem;
color: hsl(0 0% 100% / 0.35);
margin-top: 0.125rem;
}
.panel-viz {
opacity: 0.6;
} }
.panel-expand-enter-to, /* ─── Progress ─── */
.panel-expand-leave-from { .panel-progress {
max-height: 400px; padding: 0.5rem 1.25rem 0;
opacity: 1;
} }
.panel-times {
display: flex;
justify-content: space-between;
margin-top: 0.25rem;
font-family: var(--font-mono, monospace);
font-size: 0.625rem;
color: hsl(0 0% 100% / 0.25);
letter-spacing: 0.02em;
}
/* ─── Controls ─── */
.panel-controls {
display: flex;
justify-content: center;
padding: 0.25rem 1.25rem 0.375rem;
}
/* ─── Volume ─── */
.panel-volume-row {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0 1.25rem 0.75rem;
}
.panel-vol-btn {
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
color: hsl(0 0% 100% / 0.35);
cursor: pointer;
padding: 0;
transition: color 0.2s;
}
.panel-vol-btn:hover { color: hsl(0 0% 100% / 0.7); }
.volume-slider { .volume-slider {
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
height: 4px; flex: 1;
background: hsl(0 0% 100% / 0.15); height: 3px;
background: hsl(0 0% 100% / 0.08);
border-radius: 2px; border-radius: 2px;
outline: none; outline: none;
} }
.volume-slider::-webkit-slider-thumb { .volume-slider::-webkit-slider-thumb {
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
width: 12px; width: 10px;
height: 12px; height: 10px;
background: white; background: hsl(0 0% 100% / 0.7);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
transition: transform 0.15s;
} }
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.volume-slider::-moz-range-thumb { .volume-slider::-moz-range-thumb {
width: 12px; width: 10px;
height: 12px; height: 10px;
background: white; background: hsl(0 0% 100% / 0.7);
border: none; border: none;
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
} }
/* ─── Lyrics ─── */
.panel-lyrics {
max-height: 160px;
overflow-y: auto;
padding: 0.75rem 1.25rem;
border-top: 1px solid hsl(0 0% 100% / 0.04);
}
.panel-lyrics-text {
font-family: var(--font-sans, sans-serif);
font-size: 0.75rem;
line-height: 1.6;
color: hsl(0 0% 100% / 0.4);
white-space: pre-wrap;
margin: 0;
}
/* ─── Lyrics toggle ─── */
.panel-lyrics-toggle {
display: flex;
align-items: center;
justify-content: center;
gap: 0.375rem;
width: 100%;
padding: 0.375rem;
border: none;
border-top: 1px solid hsl(0 0% 100% / 0.04);
background: none;
color: hsl(0 0% 100% / 0.25);
font-size: 0.65rem;
cursor: pointer;
transition: color 0.15s;
}
.panel-lyrics-toggle:hover {
color: hsl(0 0% 100% / 0.5);
}
/* ─── Playlist ─── */
.panel-playlist {
max-height: 200px;
overflow-y: auto;
border-top: 1px solid hsl(0 0% 100% / 0.04);
}
/* ═══════════════════════════════════════
TRANSITIONS
═══════════════════════════════════════ */
.player-slide-enter-active,
.player-slide-leave-active {
transition: transform 0.35s var(--ease-out-expo), opacity 0.35s var(--ease-out-expo);
}
.player-slide-enter-from,
.player-slide-leave-to {
transform: translateY(16px);
opacity: 0;
}
.panel-expand-enter-active,
.panel-expand-leave-active {
transition: all 0.35s var(--ease-out-expo);
overflow: hidden;
}
.panel-expand-enter-from,
.panel-expand-leave-to {
max-height: 0;
opacity: 0;
transform: translateY(8px);
}
.panel-expand-enter-to,
.panel-expand-leave-from {
max-height: 800px;
opacity: 1;
transform: translateY(0);
}
/* ═══════════════════════════════════════
MOBILE
═══════════════════════════════════════ */
@media (max-width: 768px) {
.mini-player {
right: 0.75rem;
left: 0.75rem;
align-items: stretch;
}
.mini-panel { width: auto; }
.pill-title { max-width: none; flex: 1; }
}
</style> </style>
+2 -2
View File
@@ -3,7 +3,7 @@
<span <span
v-for="song in songs" v-for="song in songs"
:key="song.id" :key="song.id"
class="inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary/70" class="inline-flex items-center gap-1 rounded-full border border-primary/20 bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary/80"
> >
<div class="i-lucide-music h-2.5 w-2.5" /> <div class="i-lucide-music h-2.5 w-2.5" />
{{ song.title }} {{ song.title }}
@@ -17,7 +17,7 @@ const props = defineProps<{
}>() }>()
const bookData = useBookData() const bookData = useBookData()
await bookData.init() bookData.init()
const songs = computed(() => bookData.getChapterSongs(props.chapterSlug)) const songs = computed(() => bookData.getChapterSongs(props.chapterSlug))
</script> </script>
+55 -28
View File
@@ -1,38 +1,45 @@
<template> <template>
<div <div class="song-item-wrapper">
class="card-surface flex cursor-pointer items-center gap-4"
:class="{ 'border-primary/40! shadow-primary/10!': isCurrent }"
@click="handlePlay"
>
<!-- Play indicator / cover -->
<div <div
class="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-surface-200" class="card-surface flex cursor-pointer items-center gap-4"
:class="{ 'animate-glow-pulse': isCurrent && store.isPlaying }" :class="{ 'border-primary/40! shadow-primary/10!': isCurrent }"
@click="handlePlay"
> >
<!-- Play indicator / cover -->
<div <div
v-if="isCurrent && store.isPlaying" class="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-surface-200"
class="i-lucide-volume-2 h-5 w-5 text-primary" :class="{ 'animate-glow-pulse': isCurrent && store.isPlaying }"
/> >
<div <div
v-else v-if="isCurrent && store.isPlaying"
class="i-lucide-play h-5 w-5 text-white/40 transition-colors group-hover:text-primary" class="i-lucide-volume-2 h-5 w-5 text-primary"
/> />
<div
v-else
class="i-lucide-play h-5 w-5 text-white/40 transition-colors group-hover:text-primary"
/>
</div>
<!-- Info -->
<div class="min-w-0 flex-1">
<p class="truncate text-sm font-medium" :class="isCurrent ? 'text-primary' : 'text-white'">
{{ song.title }}
</p>
<p class="truncate text-xs text-white/40">
{{ song.artist }}
</p>
</div>
<!-- Duration -->
<span class="font-mono text-xs text-white/30 flex-shrink-0">
{{ formatDuration(song.duration) }}
</span>
</div> </div>
<!-- Info --> <!-- Lyrics panel (always visible) -->
<div class="min-w-0 flex-1"> <div v-if="song.lyrics" class="lyrics-panel">
<p class="truncate text-sm font-medium" :class="isCurrent ? 'text-primary' : 'text-white'"> <pre class="lyrics-text">{{ song.lyrics }}</pre>
{{ song.title }}
</p>
<p class="truncate text-xs text-white/40">
{{ song.artist }}
</p>
</div> </div>
<!-- Duration -->
<span class="font-mono text-xs text-white/30 flex-shrink-0">
{{ formatDuration(song.duration) }}
</span>
</div> </div>
</template> </template>
@@ -63,3 +70,23 @@ function formatDuration(seconds: number): string {
return `${mins}:${secs.toString().padStart(2, '0')}` return `${mins}:${secs.toString().padStart(2, '0')}`
} }
</script> </script>
<style scoped>
.lyrics-panel {
margin-top: 0.25rem;
padding: 1rem 1.25rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.08);
max-height: 24rem;
overflow-y: auto;
}
.lyrics-text {
white-space: pre-wrap;
font-family: inherit;
font-size: 0.875rem;
line-height: 1.7;
color: hsl(var(--color-text) / 0.6);
}
</style>
+4 -38
View File
@@ -1,21 +1,9 @@
<template> <template>
<div v-if="song.lyrics" class="rounded-xl bg-surface p-6"> <div v-if="song.lyrics" class="rounded-xl bg-surface p-6">
<button <span class="font-display text-sm font-semibold text-white/70">Paroles</span>
class="flex w-full items-center justify-between text-left" <div class="mt-4 max-h-96 overflow-y-auto">
@click="isOpen = !isOpen" <pre class="whitespace-pre-wrap font-sans text-sm leading-relaxed text-white/60">{{ song.lyrics }}</pre>
> </div>
<span class="font-display text-sm font-semibold text-white/70">Paroles</span>
<div
:class="isOpen ? 'i-lucide-chevron-up' : 'i-lucide-chevron-down'"
class="h-4 w-4 text-white/40 transition-transform"
/>
</button>
<Transition name="lyrics-expand">
<div v-if="isOpen" class="mt-4">
<pre class="whitespace-pre-wrap font-sans text-sm leading-relaxed text-white/60">{{ song.lyrics }}</pre>
</div>
</Transition>
</div> </div>
</template> </template>
@@ -25,26 +13,4 @@ import type { Song } from '~/types/song'
defineProps<{ defineProps<{
song: Song song: Song
}>() }>()
const isOpen = ref(false)
</script> </script>
<style scoped>
.lyrics-expand-enter-active,
.lyrics-expand-leave-active {
transition: all 0.3s var(--ease-out-expo);
overflow: hidden;
}
.lyrics-expand-enter-from,
.lyrics-expand-leave-to {
max-height: 0;
opacity: 0;
}
.lyrics-expand-enter-to,
.lyrics-expand-leave-from {
max-height: 500px;
opacity: 1;
}
</style>
+21
View File
@@ -0,0 +1,21 @@
<script setup lang="ts">
// The librodrome lockup : the Geste (a brush-drawn §, 25° italic) and « Le librodrome » in Fraunces
// italic, outlined. One gradient primary -> accent across it, so it follows the four ambiances.
// Studio DA, /PROD/IMAGES, validated by Yvv on 2026-10-27.
const gradId = `lockup-grad-${useId()}`
</script>
<template>
<svg class="logotype" viewBox="-6.0 -106.0 638.7 142.0" role="img" aria-label="Le librodrome">
<defs>
<linearGradient :id="gradId" gradientUnits="userSpaceOnUse" x1="-6.0" y1="0" x2="632.7" y2="0">
<stop offset="0%" stop-color="hsl(var(--color-primary))" />
<stop offset="100%" stop-color="hsl(var(--color-accent))" />
</linearGradient>
</defs>
<g :fill="`url(#${gradId})`">
<path transform="translate(0,-100.00) scale(0.74963) translate(12.31,-13.46)" d="M64.56 77.84 L65.34 77.83 L65.78 77.65 L65.01 77.77 L64.47 77.84ZM-9.91 164.16 L-10.31 164.07 L-10.41 164.88 L-10.44 165.68 L-10.40 166.49 L-10.33 167.29 L-10.27 168.09 L-10.23 168.88 L-10.18 169.68 L-10.11 170.48 L-10.01 171.27 L-9.85 172.06 L-9.62 172.83 L-9.50 173.50 L-9.55 173.39 L-9.85 172.66 L-10.09 171.90 L-10.28 171.13 L-10.42 170.35 L-10.55 169.54 L-10.86 170.03 L-10.79 170.85 L-10.66 171.64 L-10.49 172.43 L-10.27 173.21 L-9.98 173.96 L-9.58 174.66 L-9.10 175.32 L-8.53 175.88 L-7.95 176.43 L-7.36 176.95 L-6.73 177.43 L-6.07 177.89 L-5.68 178.42 L-5.00 178.81 L-4.31 179.21 L-3.62 179.62 L-2.88 179.95 L-2.11 180.17 L-1.31 180.31 L-0.51 180.42 L0.28 180.55 L1.06 180.70 L1.84 180.87 L2.62 181.02 L3.41 181.15 L4.22 181.27 L3.67 181.50 L4.42 181.62 L5.21 181.75 L6.00 181.88 L6.79 182.02 L7.58 182.13 L8.37 182.21 L9.17 182.26 L9.97 182.28 L10.77 182.32 L11.57 182.40 L12.36 182.51 L13.16 182.61 L13.96 182.68 L14.76 182.69 L15.56 182.67 L16.36 182.66 L17.16 182.68 L17.96 182.75 L18.76 182.83 L19.51 182.87 L18.88 182.88 L18.08 182.91 L17.28 182.94 L16.48 182.94 L15.68 182.90 L14.88 182.84 L14.08 182.79 L13.28 182.79 L12.48 182.81 L11.68 182.84 L10.88 182.84 L10.08 182.81 L9.28 182.74 L8.50 182.67 L8.05 182.77 L8.74 182.85 L9.53 182.93 L10.33 183.02 L11.12 183.13 L11.91 183.23 L12.71 183.33 L13.51 183.40 L14.31 183.44 L15.11 183.45 L15.91 183.49 L16.70 183.56 L17.50 183.66 L18.26 183.76 L17.99 183.77 L17.19 183.83 L16.39 183.89 L15.59 183.90 L14.79 183.86 L13.99 183.81 L13.19 183.76 L12.39 183.72 L11.59 183.70 L10.79 183.68 L9.99 183.66 L9.19 183.62 L8.39 183.57 L7.59 183.50 L6.79 183.40 L6.00 183.30 L5.20 183.19 L4.41 183.07 L3.62 182.92 L2.84 182.77 L2.05 182.63 L1.25 182.51 L0.46 182.37 L-0.32 182.18 L-1.08 181.91 L-1.82 181.59 L-2.55 181.25 L-3.29 180.96 L-4.06 180.73 L-4.83 180.51 L-5.59 180.22 L-6.28 179.82 L-6.93 179.34 L-7.57 178.86 L-8.18 178.35 L-8.80 177.85 L-9.35 177.27 L-9.85 176.66 L-10.27 175.99 L-10.70 175.32 L-11.08 174.63 L-11.43 173.91 L-11.69 173.16 L-11.86 172.37 L-11.98 171.53 L-12.31 171.99 L-12.11 172.78 L-11.89 173.54 L-11.70 174.32 L-11.44 175.08 L-11.16 175.84 L-10.73 176.53 L-10.27 177.20 L-9.72 177.79 L-9.18 178.39 L-8.57 178.91 L-7.93 179.40 L-7.22 179.79 L-6.50 180.15 L-5.79 180.50 L-5.10 180.91 L-4.42 181.35 L-3.71 181.73 L-2.96 182.01 L-2.17 182.20 L-1.38 182.34 L-0.62 182.56 L0.14 182.78 L0.89 183.04 L1.65 183.30 L2.42 183.51 L3.21 183.67 L4.00 183.80 L4.79 183.91 L5.59 183.99 L6.38 184.07 L7.18 184.16 L7.97 184.26 L8.76 184.38 L9.55 184.51 L10.35 184.62 L11.14 184.70 L11.94 184.74 L12.74 184.75 L13.54 184.74 L14.34 184.74 L15.14 184.75 L15.98 184.80 L16.39 185.21 L17.16 185.31 L17.95 185.41 L18.75 185.50 L19.55 185.56 L20.35 185.59 L21.15 185.60 L21.95 185.60 L22.75 185.59 L23.55 185.60 L24.35 185.62 L25.16 185.61 L25.96 185.56 L26.75 185.47 L27.55 185.39 L28.35 185.34 L29.15 185.33 L29.95 185.33 L30.75 185.31 L31.56 185.29 L32.36 185.26 L33.16 185.20 L33.95 185.11 L34.74 184.98 L35.53 184.81 L36.31 184.64 L37.10 184.51 L37.90 184.44 L38.70 184.40 L39.51 184.34 L40.30 184.20 L41.07 183.97 L41.83 183.68 L42.58 183.42 L43.35 183.21 L44.14 183.05 L44.92 182.89 L45.69 182.65 L46.43 182.34 L47.16 182.01 L47.89 181.70 L48.65 181.44 L49.42 181.21 L50.19 180.98 L50.92 180.73 L50.77 180.82 L50.08 181.23 L49.39 181.65 L48.68 182.04 L47.94 182.35 L47.18 182.60 L46.39 182.79 L45.62 182.99 L44.86 183.25 L44.11 183.54 L43.35 183.81 L42.58 184.01 L41.78 184.12 L40.97 184.19 L40.18 184.29 L39.40 184.47 L38.63 184.69 L37.86 184.93 L37.08 185.11 L36.29 185.23 L35.48 185.28 L34.68 185.31 L33.88 185.35 L33.08 185.41 L32.29 185.50 L31.50 185.61 L30.70 185.72 L29.91 185.82 L29.12 185.92 L28.32 186.01 L27.52 186.05 L26.72 186.06 L25.92 186.06 L25.12 186.09 L24.32 186.13 L23.53 186.17 L22.69 186.19 L22.00 186.72 L22.93 186.86 L23.74 186.85 L24.54 186.86 L25.34 186.88 L26.14 186.87 L26.94 186.83 L27.74 186.80 L28.54 186.78 L29.34 186.76 L30.15 186.74 L30.95 186.71 L31.75 186.68 L32.55 186.63 L33.35 186.53 L34.14 186.38 L34.92 186.20 L35.71 186.02 L36.49 185.86 L37.28 185.76 L38.09 185.71 L38.89 185.68 L39.69 185.60 L40.48 185.44 L41.25 185.18 L42.00 184.90 L42.76 184.64 L43.54 184.45 L44.33 184.31 L45.12 184.15 L45.88 183.92 L46.62 183.60 L47.34 183.23 L48.05 182.87 L48.79 182.57 L49.56 182.33 L50.33 182.10 L51.10 181.87 L51.85 181.57 L52.57 181.22 L53.27 180.82 L53.95 180.40 L54.65 180.00 L55.35 179.62 L56.06 179.25 L56.75 178.84 L57.42 178.39 L58.06 177.92 L58.71 177.45 L59.39 177.02 L60.10 176.65 L60.81 176.27 L61.49 175.83 L62.11 175.33 L62.69 174.77 L63.26 174.20 L63.86 173.67 L64.48 173.16 L65.13 172.68 L65.73 172.14 L66.26 171.53 L66.73 170.87 L67.15 170.19 L67.60 169.52 L68.07 168.88 L68.58 168.26 L69.07 167.61 L69.46 166.91 L69.76 166.16 L69.95 165.38 L70.16 164.61 L70.39 163.85 L70.62 163.09 L70.88 162.33 L71.03 161.55 L71.13 160.75 L71.18 159.95 L71.17 159.15 L71.15 158.35 L71.11 157.56 L71.10 156.76 LLine truncated
<path transform="translate(115.90,0)" d="M30.108456420898438 0.0H3.1044769287109375Q1.4014923095703127 0.0 0.7862472534179689 -0.7372421264648438Q0.17100219726562502 -1.4744842529296875 0.17100219726562502 -2.590972900390625Q0.17100219726562502 -3.700460815429688 0.8897476196289064 -4.491203308105469Q1.6084930419921877 -5.2819458007812505 2.6234893798828125 -5.618441772460938L5.121002197265625 -6.190438842773438Q6.641506958007813 -6.5909362792968755 7.51226043701172 -7.483438110351562Q8.383013916015626 -8.37593994140625 8.883013916015626 -10.361441040039063Q9.262011718750001 -11.877432250976563 10.10101318359375 -14.98718719482422Q10.9400146484375 -18.096942138671874 12.067768859863282 -22.25145568847656Q13.195523071289063 -26.40596923828125 14.448028564453125 -31.06323699951172Q15.700534057617189 -35.72050476074219 16.963789367675783 -40.349272155761724Q18.227044677734376 -44.978039550781254 19.315548706054688 -49.04705200195313Q20.404052734375 -53.116064453125006 21.20380401611328 -56.07256774902344Q22.003555297851562 -59.02907104492188 22.325552368164065 -60.32406005859375Q22.675552368164062 -61.72406005859375 22.311302185058594 -62.61681060791015Q21.947052001953125 -63.509561157226564 20.883050537109376 -63.88155822753907L18.193533325195315 -64.58905639648438Q17.207037353515627 -65.01155090332031 16.73153991699219 -65.59104614257814Q16.25604248046875 -66.17054138183595 16.25604248046875 -67.1005340576172Q16.25604248046875 -68.43201904296875 17.118284606933592 -69.21600952148438Q17.980526733398438 -70.0 19.505010986328127 -70.0H38.99996337890625Q40.49644470214844 -70.0 41.08668975830078 -69.30550842285157Q41.676934814453126 -68.61101684570313 41.676934814453126 -67.52302856445313Q41.676934814453126 -66.37803955078125 40.97968902587891 -65.61229705810547Q40.28244323730469 -64.84655456542968 39.32444763183594 -64.48855895996094L36.21392822265625 -63.80956115722657Q34.928924560546875 -63.48056335449219 34.072172546386724 -62.634561157226564Q33.21542053222657 -61.78855895996094 32.72242126464844 -59.845062255859375Q32.2499267578125 -58.11958312988281 31.37842712402344 -54.897586059570315Q30.506927490234375 -51.67558898925782 29.375424194335938 -47.49882965087891Q28.2439208984375 -43.3220703125 26.99141540527344 -38.73255310058594Q25.738909912109378 -34.143035888671875 24.529403686523438 -29.636265563964844Q23.3198974609375 -25.129495239257814 22.2638916015625 -21.2509765625Q21.2078857421875 -17.37245788574219 20.497882080078128 -14.617695617675782Q19.787878417968752 -11.862933349609376 19.559378051757815 -10.805932617187501Q18.994879150390627 -7.968939208984375 20.06337585449219 -6.72593994140625Q21.131872558593752 -5.482940673828125 23.861367797851564 -5.482940673828125H31.475442504882814Q33.87544250488281 -5.482940673828125 35.860694885253906 -6.464692687988281Q37.845947265625 -7.446444702148438 39.61670074462891 -9.859700012207032Q41.387454223632815 -12.272955322265625 43.19395751953125 -16.499465942382812Q44.03144836425781 -18.360446166992187 44.88668975830078 -19.086689758300782Q45.74193115234375 -19.812933349609377 46.693423461914065 -19.812933349609377Q47.96040954589844 -19.812933349609377 48.52215423583985 -18.771942138671875Q49.083898925781256 -17.730950927734376 48.912896728515626 -15.935464477539064Q48.31438903808594 -12.220468139648439 47.143635559082036 -9.072724914550783Q45.97288208007813 -5.9249816894531255 44.37613372802735 -3.594989013671875Q42.77938537597657 -1.264996337890625 40.88864288330079 0.010998535156250044Q38.997900390625006 1.2869934082031251 36.930914306640624 1.2869934082031251Q35.865420532226565 1.2869934082031251 34.96092529296875 0.9652450561523438Q34.05643005371094 0.6434967041015626 32.944436645507814 0.3217483520507813Q31.832443237304688 0.0 30.108456420898438 0.0ZM56.730950927734376 -21.444989013671876Q56.730950927734376 -21.444989013671876 58.36270294189453 -22.019491577148436Q59.99445495605469 -22.593994140625 62.657958984375 -23.55024871826172Q65.32146301269532 -24.50650329589844 68.48821868896485 -25.684008789062503Q71.65497436523438 -26.861514282226565 74.7714813232422 -28.042520141601564Q77.88798828125 -29.223526000976562 80.3364959716797 -30.222531127929688L79.22050476074219 -28.04854431152344Q79.66400146484375 -29.221038818359375 79.81425018310547 -30.598028564453124Q79.9644989013672 -31.975018310546876 79.9644989013672 -33.698507690429686Q79.9644989013672 -36.30351867675781 78.78724212646485 -37.82002563476563Q77.6099853515625 -39.33653259277344 75.2624725341797 -39.33653259277344Q73.05046081542969 -39.33653259277344 70.87794799804688 -37.76203002929688Q68.70543518066407 -36.18752746582032 66.81492309570314 -33.31727142333985Q64.92441101074219 -30.447015380859376 63.633401489257814 -26.584754943847656Q62.34239196777344 -22.72249450683594 61.914886474609375 -18.16847839355469Q61.31637878417969 -11.995449829101563 63.56538391113282 -8.794187927246094Q65.81438903808595 -5.592926025390625 70.14089965820312 -5.592926025390625Q72.15440368652344 -5.59292602539062Line truncated
</g>
</svg>
</template>
+27
View File
@@ -0,0 +1,27 @@
<script setup lang="ts">
// One of the 61 birds (studio DA, validated 2026-10-28), drawn from /images/oiseaux/<nom>.svg as a
// mask filled with currentColor : it takes the colour the page gives it, like the shadoks did.
// The classes of the figure it replaces keep its place, size, opacity and animation.
import { OISEAUX } from '~/utils/oiseaux'
const props = defineProps<{ nom: string }>()
const o = computed(() => OISEAUX[props.nom])
</script>
<template>
<span
v-if="o"
class="oiseau"
aria-hidden="true"
:style="{ aspectRatio: o.ratio, '--oiseau': `url(/images/oiseaux/${props.nom}.svg)` }"
/>
</template>
<style scoped>
.oiseau {
display: block;
background-color: currentColor;
-webkit-mask: var(--oiseau) center / contain no-repeat;
mask: var(--oiseau) center / contain no-repeat;
}
</style>
+170
View File
@@ -0,0 +1,170 @@
<script setup lang="ts">
// A bird of the librodrome placed on its block (composition of 03/11, docs/consignes-yvv.md):
// it stands on a real edge of the page, next to the content its trade is about.
// The host block is the positioning context: position relative, overflow visible.
//
// Poses
// perche on the block's top edge (bottom: 100%), x with left / right
// marge-g beside the block, on its left; feet at the block's bottom, raised by `bottom`
// marge-d the same, on its right
// derriere large and pale, behind the block (z-index -1): only what sticks out shows.
// Needs a stacking context above the block (isolation: isolate) and a block
// that creates none itself (no z-index, transform, opacity, filter).
// libre placed only by left / right / top / bottom (an empty area next to its block)
//
// `bout`: a perched bird at the end (or the start) of a line of a title. The component is then a
// zero-size anchor in the text, at its baseline, written right after the text (the gap is `left`,
// 12 px by default) or right before it (the gap is `right`): the bird follows the end of the text
// at every width, wherever the line breaks (rule e, docs/da-oiseaux.md).
//
// Birds in the margin, behind a block or free need room around the column: they show from
// 1200 px wide, the perched ones from 768 px (`seuil` overrides, for instance 1024 for a perched
// bird whose block has no void above it until the grid splits in two); under 768 px, only a
// bird marked `mobile`.
// A perched bird needs, above its edge, a void at least as tall as itself (DA rule of 03/11);
// where blocks stand close, the bird goes in the margin or behind the block.
//
// Drawing rules of the studio DA (kit README, §2.5): one colour (currentColor), proportions
// intact and never cropped, 72 px wide at least, opacity 0.18-0.28 next to text and 0.10-0.14
// large behind a card, mirror allowed except for the calligraphe and the typographe.
// Birds standing on an edge do not move; only the one behind a card drifts a little (Yvv, 03/11).
import { OISEAUX } from '~/utils/oiseaux'
type Pose = 'perche' | 'marge-g' | 'marge-d' | 'derriere' | 'libre'
const props = withDefaults(defineProps<{
nom: string
pose?: Pose
/** Width in px: S 72-90, M 108-156, L 200-250 */
w?: number
left?: string
right?: string
top?: string
bottom?: string
/** Gap between the block and a bird in the margin */
ecart?: string
retourne?: boolean
/** Shown under 768 px (one bird per page at most) */
mobile?: boolean
/** Shown under 768 px only: the phone place of a bird placed elsewhere on wider screens */
mobileSeul?: boolean
/** Narrowest window (px) where the bird shows: 1200 by default for the margin, behind
* and free poses, 768 for a perched bird */
seuil?: 768 | 1024 | 1200
ton?: 'primary' | 'accent'
op?: number
/** At the end (or the start) of a line of text: written in the text, without a space */
bout?: boolean
}>(), { pose: 'perche', w: 80, ecart: '2.5rem', ton: 'primary' })
/** These two write and compose from left to right: never mirrored */
const NO_MIRROR = new Set(['calligraphe', 'typographe'])
const sol = computed(() => OISEAUX[props.nom]?.sol ?? 5)
const style = computed(() => {
const s: Record<string, string> = { 'width': `${Math.max(72, props.w)}px`, '--sol': `${sol.value}%` }
if (props.pose === 'perche') s.bottom = props.bout ? '0px' : '100%'
if (props.bout && props.left === undefined && props.right === undefined) s.left = '12px'
if (props.pose === 'marge-g') s.right = `calc(100% + ${props.ecart})`
if (props.pose === 'marge-d') s.left = `calc(100% + ${props.ecart})`
if (props.pose === 'marge-g' || props.pose === 'marge-d') s.bottom = '0px'
for (const k of ['left', 'right', 'top', 'bottom'] as const) {
if (props[k] !== undefined) s[k] = props[k]!
}
if (props.op !== undefined) s.opacity = String(props.op)
return s
})
const classes = computed(() => [
'oiseau-pose',
`oiseau-pose--${props.pose}`,
{
'oiseau-pose--retourne': props.retourne && !NO_MIRROR.has(props.nom),
'oiseau-pose--mobile': props.mobile || props.mobileSeul,
'oiseau-pose--mobile-seul': props.mobileSeul,
'oiseau-pose--large': (props.seuil ?? (props.pose === 'perche' ? 768 : 1200)) >= 1200,
'oiseau-pose--moyen': props.seuil === 1024,
'oiseau-pose--accent': props.ton === 'accent',
},
])
</script>
<template>
<span v-if="bout" class="oiseau-bout"><UiOiseau :nom="nom" :class="classes" :style="style" :data-oiseau="nom" :data-pose="pose" /></span>
<UiOiseau v-else :nom="nom" :class="classes" :style="style" :data-oiseau="nom" :data-pose="pose" />
</template>
<style scoped>
/* The anchor of a bird at the end of a line: no size, on the text's baseline */
.oiseau-bout {
position: relative;
display: inline-block;
width: 0;
height: 0;
vertical-align: baseline;
}
.oiseau-pose {
position: absolute;
z-index: 1;
pointer-events: none;
color: hsl(var(--color-primary));
opacity: 0.24;
/* The drawing's ground line lands on the edge */
transform: translateY(var(--sol));
}
.oiseau-pose--accent {
color: hsl(var(--color-accent));
}
.oiseau-pose--perche {
opacity: 0.28;
}
.oiseau-pose--derriere {
z-index: -1;
opacity: 0.12;
animation: oiseau-derive 12s ease-in-out infinite alternate;
}
.oiseau-pose--retourne {
scale: -1 1;
}
@keyframes oiseau-derive {
from { translate: 0 0; }
to { translate: 0 -6px; }
}
@media (max-width: 1199px) {
.oiseau-pose--large {
display: none;
}
}
@media (max-width: 1023px) {
.oiseau-pose--moyen {
display: none;
}
}
@media (min-width: 768px) {
.oiseau-pose--mobile-seul {
display: none;
}
}
@media (max-width: 767px) {
.oiseau-pose:not(.oiseau-pose--mobile) {
display: none;
}
}
@media (prefers-reduced-motion: reduce) {
.oiseau-pose--derriere {
animation: none;
}
}
</style>
+261
View File
@@ -0,0 +1,261 @@
<template>
<div class="settings-selector" ref="selectorRef">
<button
class="settings-trigger"
aria-label="Réglages d'affichage"
@click="isOpen = !isOpen"
>
<div class="i-lucide-settings h-5 w-5" />
</button>
<Transition name="settings-dropdown">
<div v-if="isOpen" class="settings-dropdown">
<h4 class="settings-title">Affichage</h4>
<!-- Palette grid : 4 saisons -->
<div class="settings-section">
<span class="settings-label">Ambiance</span>
<div class="settings-palette-grid">
<button
v-for="name in paletteNames"
:key="name"
class="settings-palette-btn"
:class="{
'settings-palette-btn--active': paletteStore.currentPalette === name,
'settings-palette-btn--light': paletteStore.palettes[name].isLight,
}"
:title="paletteStore.palettes[name].label"
@click="paletteStore.setPalette(name)"
>
<span class="settings-palette-preview">
<span class="settings-palette-dot" :style="{ background: `hsl(${paletteStore.palettes[name].primary})` }" />
<span class="settings-palette-dot" :style="{ background: `hsl(${paletteStore.palettes[name].accent})` }" />
</span>
<span class="settings-palette-info">
<span class="settings-palette-name">{{ paletteStore.palettes[name].label }}</span>
<span class="settings-palette-mode">{{ paletteStore.palettes[name].isLight ? 'Clair' : 'Sombre' }}</span>
</span>
</button>
</div>
</div>
<!-- Font size -->
<div class="settings-section">
<span class="settings-label">Taille texte</span>
<div class="settings-toggle-group">
<button
v-for="size in fontSizes"
:key="size.value"
class="settings-toggle"
:class="{ 'settings-toggle--active': currentFontSize === size.value }"
@click="setFontSize(size.value)"
>
{{ size.label }}
</button>
</div>
</div>
</div>
</Transition>
</div>
</template>
<script setup lang="ts">
import { onClickOutside } from '@vueuse/core'
import type { PaletteName } from '~/stores/palette'
const paletteStore = usePaletteStore()
const selectorRef = ref<HTMLElement>()
const isOpen = ref(false)
const paletteNames: PaletteName[] = ['automne', 'hiver', 'printemps', 'ete']
const currentFontSize = ref(
(import.meta.client && localStorage.getItem('fontSize')) || 'normal',
)
const fontSizes = [
{ label: 'A-', value: 'small' },
{ label: 'A', value: 'normal' },
{ label: 'A+', value: 'large' },
]
function setFontSize(size: string) {
currentFontSize.value = size
if (import.meta.client) {
localStorage.setItem('fontSize', size)
const root = document.documentElement
const map: Record<string, string> = { small: '14px', normal: '16px', large: '18px' }
root.style.fontSize = map[size] || '16px'
}
}
// Apply font size on mount
onMounted(() => {
const saved = localStorage.getItem('fontSize')
if (saved) setFontSize(saved)
})
onClickOutside(selectorRef, () => { isOpen.value = false })
</script>
<style scoped>
.settings-selector {
position: relative;
}
.settings-trigger {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border-radius: 0.5rem;
color: hsl(var(--color-text) / 0.7);
transition: all 0.2s;
}
.settings-trigger:hover {
color: hsl(var(--color-text));
background: hsl(var(--color-text) / 0.1);
}
.settings-dropdown {
position: absolute;
top: calc(100% + 0.5rem);
right: 0;
width: 260px;
padding: 0.75rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
backdrop-filter: blur(16px);
border: 1px solid hsl(var(--color-text) / 0.08);
box-shadow: 0 8px 32px hsl(0 0% 0% / 0.3);
display: flex;
flex-direction: column;
gap: 0.75rem;
z-index: 50;
}
.settings-title {
font-family: var(--font-display);
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: hsl(var(--color-text) / 0.4);
margin: 0;
}
.settings-section {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.settings-label {
font-size: 0.7rem;
font-weight: 600;
color: hsl(var(--color-text) / 0.5);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.settings-toggle-group {
display: flex;
gap: 0.25rem;
background: hsl(var(--color-text) / 0.04);
border-radius: 0.5rem;
padding: 0.125rem;
}
.settings-toggle {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 0.375rem;
padding: 0.375rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.75rem;
font-weight: 500;
color: hsl(var(--color-text) / 0.5);
transition: all 0.15s;
}
.settings-toggle:hover {
color: hsl(var(--color-text) / 0.8);
}
.settings-toggle--active {
background: hsl(var(--color-primary));
color: white;
box-shadow: 0 1px 4px hsl(var(--color-primary) / 0.3);
}
.settings-palette-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.375rem;
}
.settings-palette-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
border-radius: 0.5rem;
transition: all 0.2s;
color: hsl(var(--color-text) / 0.6);
background: hsl(var(--color-text) / 0.02);
}
.settings-palette-btn:hover {
background: hsl(var(--color-text) / 0.06);
color: hsl(var(--color-text) / 0.9);
}
.settings-palette-btn--active {
background: hsl(var(--color-text) / 0.1);
color: hsl(var(--color-text));
box-shadow: inset 0 0 0 1.5px hsl(var(--color-primary) / 0.5);
}
.settings-palette-preview {
display: flex;
gap: 0.125rem;
flex-shrink: 0;
}
.settings-palette-dot {
width: 0.75rem;
height: 0.75rem;
border-radius: 50%;
box-shadow: 0 1px 3px hsl(0 0% 0% / 0.25);
}
.settings-palette-info {
display: flex;
flex-direction: column;
gap: 0;
min-width: 0;
}
.settings-palette-name {
font-size: 0.75rem;
font-weight: 600;
line-height: 1.2;
}
.settings-palette-mode {
font-size: 0.6rem;
opacity: 0.5;
line-height: 1.2;
}
.settings-dropdown-enter-active {
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.settings-dropdown-leave-active {
transition: all 0.15s ease;
}
.settings-dropdown-enter-from,
.settings-dropdown-leave-to {
opacity: 0;
transform: translateY(-4px) scale(0.96);
}
</style>
+17
View File
@@ -0,0 +1,17 @@
<script setup lang="ts">
// The Geste : the librodrome's §, drawn with a brush, 25° italic (studio DA, validated 2026-10-27).
// Same use as before : <UiSectionSign class="…" />, gradient primary -> accent.
const gradId = `sect-grad-${useId()}`
</script>
<template>
<svg class="section-sign" viewBox="-16.3 9.5 133.3 181.4" aria-hidden="true">
<defs>
<linearGradient :id="gradId" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="hsl(var(--color-primary))" />
<stop offset="100%" stop-color="hsl(var(--color-accent))" />
</linearGradient>
</defs>
<path :fill="`url(#${gradId})`" d="M64.56 77.84 L65.34 77.83 L65.78 77.65 L65.01 77.77 L64.47 77.84ZM-9.91 164.16 L-10.31 164.07 L-10.41 164.88 L-10.44 165.68 L-10.40 166.49 L-10.33 167.29 L-10.27 168.09 L-10.23 168.88 L-10.18 169.68 L-10.11 170.48 L-10.01 171.27 L-9.85 172.06 L-9.62 172.83 L-9.50 173.50 L-9.55 173.39 L-9.85 172.66 L-10.09 171.90 L-10.28 171.13 L-10.42 170.35 L-10.55 169.54 L-10.86 170.03 L-10.79 170.85 L-10.66 171.64 L-10.49 172.43 L-10.27 173.21 L-9.98 173.96 L-9.58 174.66 L-9.10 175.32 L-8.53 175.88 L-7.95 176.43 L-7.36 176.95 L-6.73 177.43 L-6.07 177.89 L-5.68 178.42 L-5.00 178.81 L-4.31 179.21 L-3.62 179.62 L-2.88 179.95 L-2.11 180.17 L-1.31 180.31 L-0.51 180.42 L0.28 180.55 L1.06 180.70 L1.84 180.87 L2.62 181.02 L3.41 181.15 L4.22 181.27 L3.67 181.50 L4.42 181.62 L5.21 181.75 L6.00 181.88 L6.79 182.02 L7.58 182.13 L8.37 182.21 L9.17 182.26 L9.97 182.28 L10.77 182.32 L11.57 182.40 L12.36 182.51 L13.16 182.61 L13.96 182.68 L14.76 182.69 L15.56 182.67 L16.36 182.66 L17.16 182.68 L17.96 182.75 L18.76 182.83 L19.51 182.87 L18.88 182.88 L18.08 182.91 L17.28 182.94 L16.48 182.94 L15.68 182.90 L14.88 182.84 L14.08 182.79 L13.28 182.79 L12.48 182.81 L11.68 182.84 L10.88 182.84 L10.08 182.81 L9.28 182.74 L8.50 182.67 L8.05 182.77 L8.74 182.85 L9.53 182.93 L10.33 183.02 L11.12 183.13 L11.91 183.23 L12.71 183.33 L13.51 183.40 L14.31 183.44 L15.11 183.45 L15.91 183.49 L16.70 183.56 L17.50 183.66 L18.26 183.76 L17.99 183.77 L17.19 183.83 L16.39 183.89 L15.59 183.90 L14.79 183.86 L13.99 183.81 L13.19 183.76 L12.39 183.72 L11.59 183.70 L10.79 183.68 L9.99 183.66 L9.19 183.62 L8.39 183.57 L7.59 183.50 L6.79 183.40 L6.00 183.30 L5.20 183.19 L4.41 183.07 L3.62 182.92 L2.84 182.77 L2.05 182.63 L1.25 182.51 L0.46 182.37 L-0.32 182.18 L-1.08 181.91 L-1.82 181.59 L-2.55 181.25 L-3.29 180.96 L-4.06 180.73 L-4.83 180.51 L-5.59 180.22 L-6.28 179.82 L-6.93 179.34 L-7.57 178.86 L-8.18 178.35 L-8.80 177.85 L-9.35 177.27 L-9.85 176.66 L-10.27 175.99 L-10.70 175.32 L-11.08 174.63 L-11.43 173.91 L-11.69 173.16 L-11.86 172.37 L-11.98 171.53 L-12.31 171.99 L-12.11 172.78 L-11.89 173.54 L-11.70 174.32 L-11.44 175.08 L-11.16 175.84 L-10.73 176.53 L-10.27 177.20 L-9.72 177.79 L-9.18 178.39 L-8.57 178.91 L-7.93 179.40 L-7.22 179.79 L-6.50 180.15 L-5.79 180.50 L-5.10 180.91 L-4.42 181.35 L-3.71 181.73 L-2.96 182.01 L-2.17 182.20 L-1.38 182.34 L-0.62 182.56 L0.14 182.78 L0.89 183.04 L1.65 183.30 L2.42 183.51 L3.21 183.67 L4.00 183.80 L4.79 183.91 L5.59 183.99 L6.38 184.07 L7.18 184.16 L7.97 184.26 L8.76 184.38 L9.55 184.51 L10.35 184.62 L11.14 184.70 L11.94 184.74 L12.74 184.75 L13.54 184.74 L14.34 184.74 L15.14 184.75 L15.98 184.80 L16.39 185.21 L17.16 185.31 L17.95 185.41 L18.75 185.50 L19.55 185.56 L20.35 185.59 L21.15 185.60 L21.95 185.60 L22.75 185.59 L23.55 185.60 L24.35 185.62 L25.16 185.61 L25.96 185.56 L26.75 185.47 L27.55 185.39 L28.35 185.34 L29.15 185.33 L29.95 185.33 L30.75 185.31 L31.56 185.29 L32.36 185.26 L33.16 185.20 L33.95 185.11 L34.74 184.98 L35.53 184.81 L36.31 184.64 L37.10 184.51 L37.90 184.44 L38.70 184.40 L39.51 184.34 L40.30 184.20 L41.07 183.97 L41.83 183.68 L42.58 183.42 L43.35 183.21 L44.14 183.05 L44.92 182.89 L45.69 182.65 L46.43 182.34 L47.16 182.01 L47.89 181.70 L48.65 181.44 L49.42 181.21 L50.19 180.98 L50.92 180.73 L50.77 180.82 L50.08 181.23 L49.39 181.65 L48.68 182.04 L47.94 182.35 L47.18 182.60 L46.39 182.79 L45.62 182.99 L44.86 183.25 L44.11 183.54 L43.35 183.81 L42.58 184.01 L41.78 184.12 L40.97 184.19 L40.18 184.29 L39.40 184.47 L38.63 184.69 L37.86 184.93 L37.08 185.11 L36.29 185.23 L35.48 185.28 L34.68 185.31 L33.88 185.35 L33.08 185.41 L32.29 185.50 L31.50 185.61 L30.70 185.72 L29.91 185.82 L29.12 185.92 L28.32 186.01 L27.52 186.05 L26.72 186.06 L25.92 186.06 L25.12 186.09 L24.32 186.13 L23.53 186.17 L22.69 186.19 L22.00 186.72 L22.93 186.86 L23.74 186.85 L24.54 186.86 L25.34 186.88 L26.14 186.87 L26.94 186.83 L27.74 186.80 L28.54 186.78 L29.34 186.76 L30.15 186.74 L30.95 186.71 L31.75 186.68 L32.55 186.63 L33.35 186.53 L34.14 186.38 L34.92 186.20 L35.71 186.02 L36.49 185.86 L37.28 185.76 L38.09 185.71 L38.89 185.68 L39.69 185.60 L40.48 185.44 L41.25 185.18 L42.00 184.90 L42.76 184.64 L43.54 184.45 L44.33 184.31 L45.12 184.15 L45.88 183.92 L46.62 183.60 L47.34 183.23 L48.05 182.87 L48.79 182.57 L49.56 182.33 L50.33 182.10 L51.10 181.87 L51.85 181.57 L52.57 181.22 L53.27 180.82 L53.95 180.40 L54.65 180.00 L55.35 179.62 L56.06 179.25 L56.75 178.84 L57.42 178.39 L58.06 177.92 L58.71 177.45 L59.39 177.02 L60.10 176.65 L60.81 176.27 L61.49 175.83 L62.11 175.33 L62.69 174.77 L63.26 174.20 L63.86 173.67 L64.48 173.16 L65.13 172.68 L65.73 172.14 L66.26 171.53 L66.73 170.87 L67.15 170.19 L67.60 169.52 L68.07 168.88 L68.58 168.26 L69.07 167.61 L69.46 166.91 L69.76 166.16 L69.95 165.38 L70.16 164.61 L70.39 163.85 L70.62 163.09 L70.88 162.33 L71.03 161.55 L71.13 160.75 L71.18 159.95 L71.17 159.15 L71.15 158.35 L71.11 157.56 L71.10 156.76 L71.07 155.95 L71.02 155.14 L70.88 154.35 L70.71 Line truncated
</svg>
</template>
+69
View File
@@ -0,0 +1,69 @@
<template>
<span v-if="label" class="status" :class="`status--${tone}`">
<span class="status-dot" aria-hidden="true" />
<span>{{ label }}</span>
<span v-if="since" class="status-since">· {{ since }}</span>
</span>
</template>
<script setup lang="ts">
// Project maturity, as written in YAML: `status: En production` (+ `since`),
// `status: En développement`, or the legacy `gestation: true`.
const props = defineProps<{
status?: string
gestation?: boolean
since?: string
}>()
const label = computed(() => props.status || (props.gestation ? 'En gestation' : ''))
const tone = computed(() => {
const s = label.value.toLowerCase()
if (s.includes('production')) return 'prod'
if (s.includes('développement') || s.includes('developpement')) return 'dev'
return 'gest'
})
</script>
<style scoped>
.status {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.15rem 0.6rem;
border-radius: 20px;
font-family: var(--font-mono);
font-size: 0.68rem;
font-weight: 500;
line-height: 1.5;
white-space: nowrap;
vertical-align: middle;
color: hsl(var(--color-text) / 0.75);
background: hsl(var(--color-text) / 0.06);
}
.status-dot {
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
flex-shrink: 0;
}
/* En production : plein */
.status--prod .status-dot { background: hsl(var(--axis-cit)); }
.status--prod { color: hsl(var(--axis-cit)); background: hsl(var(--axis-cit) / 0.1); }
/* En développement : demi-plein */
.status--dev .status-dot {
background: linear-gradient(to top, hsl(var(--axis-eco)) 50%, transparent 50%);
box-shadow: inset 0 0 0 1.5px hsl(var(--axis-eco));
}
.status--dev { color: hsl(var(--axis-eco)); background: hsl(var(--axis-eco) / 0.1); }
/* En gestation : cercle */
.status--gest .status-dot { box-shadow: inset 0 0 0 1.5px hsl(var(--color-text) / 0.45); }
.status-since {
opacity: 0.75;
}
</style>
+25 -25
View File
@@ -2,9 +2,12 @@ import type { Song } from '~/types/song'
let audio: HTMLAudioElement | null = null let audio: HTMLAudioElement | null = null
let animationFrameId: number | null = null let animationFrameId: number | null = null
// Track which milestones have been fired for the current song
const firedMilestones = new Set<number>()
export function useAudioPlayer() { export function useAudioPlayer() {
const store = usePlayerStore() const store = usePlayerStore()
const { trackAudioPlay, trackAudioComplete, trackAudioProgress } = useTracking()
function getAudio(): HTMLAudioElement { function getAudio(): HTMLAudioElement {
if (!audio) { if (!audio) {
@@ -17,6 +20,10 @@ export function useAudioPlayer() {
}) })
audio.addEventListener('ended', () => { audio.addEventListener('ended', () => {
if (store.currentSong) {
trackAudioComplete(store.currentSong.id, store.currentSong.title)
}
firedMilestones.clear()
const next = store.nextSong() const next = store.nextSong()
if (next) { if (next) {
loadAndPlay(next) loadAndPlay(next)
@@ -36,6 +43,16 @@ export function useAudioPlayer() {
const update = () => { const update = () => {
if (audio && !audio.paused) { if (audio && !audio.paused) {
store.setCurrentTime(audio.currentTime) store.setCurrentTime(audio.currentTime)
// Track progress milestones (25 / 50 / 75 %)
if (audio.duration > 0 && store.currentSong) {
const pct = (audio.currentTime / audio.duration) * 100
for (const milestone of [25, 50, 75] as const) {
if (pct >= milestone && !firedMilestones.has(milestone)) {
firedMilestones.add(milestone)
trackAudioProgress(store.currentSong.id, milestone)
}
}
}
} }
animationFrameId = requestAnimationFrame(update) animationFrameId = requestAnimationFrame(update)
} }
@@ -52,32 +69,21 @@ export function useAudioPlayer() {
async function loadAndPlay(song: Song) { async function loadAndPlay(song: Song) {
const el = getAudio() const el = getAudio()
store.setSong(song) store.setSong(song)
firedMilestones.clear()
// Try OGG first, fall back to MP3 // Only MP3 files are published (no .ogg on disk nor in production):
const oggPath = song.file.replace(/\.mp3$/, '.ogg') // asking for OGG first cost a 404 and a delay on every track.
const canOgg = el.canPlayType('audio/ogg; codecs=vorbis') el.src = song.file
el.src = canOgg ? oggPath : song.file
el.volume = store.volume el.volume = store.volume
try { try {
await el.play() await el.play()
store.play() store.play()
startTimeUpdate() startTimeUpdate()
trackAudioPlay(song.id, song.title)
} }
catch { catch (err) {
// If OGG failed, try MP3 console.error('Playback failed:', err)
if (el.src !== song.file) {
el.src = song.file
try {
await el.play()
store.play()
startTimeUpdate()
}
catch (err) {
console.error('Playback failed:', err)
}
}
} }
} }
@@ -124,13 +130,7 @@ export function useAudioPlayer() {
function playPrev() { function playPrev() {
const song = store.prevSong() const song = store.prevSong()
if (song) { if (song) {
if (song === store.currentSong && store.currentTime <= 3) { loadAndPlay(song)
// prevSong already reset time
seek(0)
}
else {
loadAndPlay(song)
}
} }
} }
+23 -4
View File
@@ -1,23 +1,23 @@
import yaml from 'yaml'
import type { Song } from '~/types/song' import type { Song } from '~/types/song'
import type { ChapterSongLink, BookConfig } from '~/types/book' import type { ChapterSongLink, ChapterPageLink, BookConfig } from '~/types/book'
let _configCache: BookConfig | null = null let _configCache: BookConfig | null = null
async function loadConfig(): Promise<BookConfig> { async function loadConfig(): Promise<BookConfig> {
if (_configCache) return _configCache if (_configCache) return _configCache
const raw = await import('~/data/librodrome.config.yml?raw').then(m => m.default) const parsed = await $fetch<any>('/api/content/config')
const parsed = yaml.parse(raw)
_configCache = { _configCache = {
title: parsed.book.title, title: parsed.book.title,
author: parsed.book.author, author: parsed.book.author,
description: parsed.book.description, description: parsed.book.description,
coverImage: parsed.book.coverImage, coverImage: parsed.book.coverImage,
pdfFile: parsed.book.pdfFile,
chapters: [], chapters: [],
songs: parsed.songs as Song[], songs: parsed.songs as Song[],
chapterSongs: parsed.chapterSongs as ChapterSongLink[], chapterSongs: parsed.chapterSongs as ChapterSongLink[],
chapterPages: (parsed.chapterPages ?? []) as ChapterPageLink[],
defaultPlaylistOrder: parsed.defaultPlaylistOrder as string[], defaultPlaylistOrder: parsed.defaultPlaylistOrder as string[],
} }
@@ -70,6 +70,22 @@ export function useBookData() {
.filter((s): s is Song => !!s) .filter((s): s is Song => !!s)
} }
function getChapterForSong(songId: string): string | undefined {
if (!config.value) return undefined
const link = config.value.chapterSongs.find(
cs => cs.songId === songId && cs.primary,
)
return link?.chapterSlug
}
function getChapterPage(chapterSlug: string): number | undefined {
return config.value?.chapterPages.find(cp => cp.chapterSlug === chapterSlug)?.page
}
function getPdfUrl(): string {
return config.value?.pdfFile || '/pdf/une-economie-du-don.pdf'
}
function getBookMeta() { function getBookMeta() {
if (!config.value) return null if (!config.value) return null
return { return {
@@ -89,7 +105,10 @@ export function useBookData() {
getChapterSongs, getChapterSongs,
getPrimarySong, getPrimarySong,
getChapterSongLinks, getChapterSongLinks,
getChapterForSong,
getPlaylistOrder, getPlaylistOrder,
getBookMeta, getBookMeta,
getChapterPage,
getPdfUrl,
} }
} }
+5 -10
View File
@@ -1,16 +1,11 @@
export function useGrateWizard() { export function useGrateWizard() {
const appConfig = useAppConfig() const appConfig = useAppConfig()
const { url } = appConfig.gratewizard as { url: string; popup: { width: number; height: number } }
function launch() { function launch(e?: Event) {
const { url, popup } = appConfig.gratewizard as { url: string; popup: { width: number; height: number } } window.open(url, '_blank', 'noopener,noreferrer')
const left = Math.round((window.screen.width - popup.width) / 2) e?.preventDefault()
const top = Math.round((window.screen.height - popup.height) / 2)
window.open(
url,
'GrateWizard',
`width=${popup.width},height=${popup.height},left=${left},top=${top},scrollbars=yes,resizable=yes`,
)
} }
return { launch } return { url, launch }
} }
+151
View File
@@ -0,0 +1,151 @@
// Normalised view of the home content, shared by the three home variants.
// Everything comes from YAML (site/pages/home.yml, site/site.yml,
// site/pages/evenement.yml, site/pages/numerique/cloud-libre.yml) — no copy here.
export type AxisKey = 'numerique' | 'economie' | 'politique'
export type StackStatus = 'service' | 'catalogue' | 'avenir'
export interface HomeAction {
id: string
label: string
icon: string
highlight?: boolean
secondary?: boolean
to?: string
href?: string
/** Short status line shown under the button (e.g. the v1 in production) */
note?: string
}
export interface HomeTool {
label: string
description: string
to?: string
href?: string
gestation?: boolean
/** « En production », « En développement »… — wins over `gestation` */
status?: string
since?: string
icon?: string
presentation?: { title: string, text: string }
actions?: HomeAction[]
}
export interface HomeStack {
role: string
name?: string
status: StackStatus
url?: string
}
export interface HomeAxis {
key: AxisKey
/** Short label as used in the navigation ("numérique", "économique", "citoyenne") */
short: string
title: string
icon: string
to: string
/** What is "le plus en amont" on this axis (hero.axes) */
lever: string
promise: string
/** CSS custom property holding the axis hue */
hue: string
items: HomeTool[]
}
const AXIS_META: Record<AxisKey, { heroLabel: string, to: string, hue: string, short: string }> = {
numerique: { heroLabel: 'numérique', to: '/numerique', hue: '--axis-num', short: 'numérique' },
economie: { heroLabel: 'économie', to: '/economique', hue: '--axis-eco', short: 'économique' },
politique: { heroLabel: 'citoyenne', to: '/citoyenne', hue: '--axis-cit', short: 'citoyenne' },
}
export const AXIS_ORDER: AxisKey[] = ['numerique', 'economie', 'politique']
export async function useHomeData() {
const [{ data: home }, { data: site }, { data: event }, { data: cloud }] = await Promise.all([
usePageContent('home'),
useSiteContent(),
usePageContent('evenement'),
usePageContent('numerique/cloud-libre'),
])
const hero = computed(() => (home.value as any)?.hero ?? {})
const axes = computed<HomeAxis[]>(() => {
const raw = (home.value as any)?.axes ?? {}
const levers: { label: string, value: string }[] = hero.value.axes ?? []
return AXIS_ORDER.filter(k => raw[k]).map((key) => {
const meta = AXIS_META[key]
return {
key,
short: meta.short,
title: raw[key].title,
icon: raw[key].icon,
to: meta.to,
lever: levers.find(l => l.label === meta.heroLabel)?.value ?? '',
promise: raw[key].promise ?? '',
hue: meta.hue,
items: raw[key].items ?? [],
}
})
})
const lpk = computed(() => (site.value as any)?.lpk as
{ name: string, text: string, role: string, to: string } | undefined)
/** Bouquet sweetHome, flattened — the stacks served by LaPlanK */
const bouquet = computed(() => {
const section = ((cloud.value as any)?.sections ?? []).find((s: any) => s.type === 'territoire')
const b = section?.bouquet
if (!b) return null
const stacks: (HomeStack & { category: string })[] = []
for (const cat of b.categories ?? []) {
for (const item of cat.items ?? []) {
if (typeof item === 'string') continue
stacks.push({ ...item, category: cat.label })
}
}
return {
title: b.title as string,
statuses: (b.statuses ?? {}) as Record<StackStatus, string>,
categories: (b.categories ?? []) as { label: string, icon: string, items: HomeStack[] }[],
stacks,
inService: stacks.filter(s => s.status === 'service' && s.name),
}
})
const evenement = computed(() => {
const e = event.value as any
const teaser = (home.value as any)?.evenement
if (!e && !teaser) return null
const politique = (e?.axes ?? []).find((a: any) => a.label === 'Politique')
return {
to: teaser?.to ?? '/evenement',
title: e?.title ?? teaser?.title,
teaser: teaser ? `${teaser.title} ${teaser.subtitle}` : '',
subtitle: e?.subtitle ?? '',
tagline: e?.tagline ?? '',
leitmotiv: e?.leitmotiv ?? '',
description: e?.description ?? '',
gestation: e?.gestation ?? teaser?.gestation,
config: (e?.config ?? []) as { icon: string, label: string, detail: string }[],
espaces: (e?.espaces ?? []) as { icon: string, label: string, desc: string }[],
/** "Autonomie d'un bassin de vie — accessible et reproductible" */
reproduction: (politique?.items?.[0] as string) ?? '',
}
})
return {
home,
hero,
axes,
lpk,
bouquet,
evenement,
book: computed(() => (home.value as any)?.book),
format: computed(() => (home.value as any)?.format as { title: string, text: string } | undefined),
toolboxTitle: computed(() => (home.value as any)?.toolbox?.title as string | undefined),
consoleLabels: computed(() => (home.value as any)?.console as { prefix: string, top: string, bottom: string } | undefined),
gratewizard: computed(() => (home.value as any)?.gratewizard),
}
}
+41
View File
@@ -0,0 +1,41 @@
export function useKeyboardShortcuts() {
const store = usePlayerStore()
const { togglePlayPause, playNext, playPrev } = useAudioPlayer()
function isInputFocused(): boolean {
const el = document.activeElement
if (!el) return false
const tag = el.tagName.toLowerCase()
if (tag === 'input' || tag === 'textarea' || tag === 'select') return true
if ((el as HTMLElement).isContentEditable) return true
return false
}
function onKeyDown(e: KeyboardEvent) {
if (isInputFocused()) return
if (!store.currentSong) return
switch (e.code) {
case 'Space':
e.preventDefault()
togglePlayPause()
break
case 'ArrowRight':
e.preventDefault()
playNext()
break
case 'ArrowLeft':
e.preventDefault()
playPrev()
break
}
}
onMounted(() => {
window.addEventListener('keydown', onKeyDown)
})
onUnmounted(() => {
window.removeEventListener('keydown', onKeyDown)
})
}
+55
View File
@@ -0,0 +1,55 @@
/**
* Tracks scroll depth milestones (25 / 50 / 75 / 100 %) on each page.
* Also intercepts external link clicks and tracks them.
*
* Usage: call once in default.vue layout.
*/
export function useScrollTracking() {
const route = useRoute()
const { trackScrollDepth, trackExternalLink } = useTracking()
// ── Scroll depth ────────────────────────────────────────────────────────
const fired = new Set<number>()
function onScroll() {
const el = document.documentElement
const scrolled = el.scrollTop + el.clientHeight
const total = el.scrollHeight
if (total <= el.clientHeight) return
const pct = (scrolled / total) * 100
for (const milestone of [25, 50, 75, 100] as const) {
if (pct >= milestone && !fired.has(milestone)) {
fired.add(milestone)
trackScrollDepth(route.path, milestone)
}
}
}
// Reset fired milestones on route change
watch(() => route.path, () => fired.clear())
// ── External link tracking ───────────────────────────────────────────────
function onLinkClick(e: MouseEvent) {
const target = (e.target as HTMLElement).closest('a')
if (!target) return
const href = target.getAttribute('href') || ''
if (!href.startsWith('http') && !href.startsWith('//')) return
try {
const url = new URL(href)
if (url.hostname === 'librodrome.org') return
trackExternalLink(href, target.textContent?.trim() || '')
}
catch { /* invalid URL, ignore */ }
}
onMounted(() => {
window.addEventListener('scroll', onScroll, { passive: true })
document.addEventListener('click', onLinkClick)
})
onUnmounted(() => {
window.removeEventListener('scroll', onScroll)
document.removeEventListener('click', onLinkClick)
})
}
+52
View File
@@ -0,0 +1,52 @@
/**
* Applique toutes les balises SEO (og:*, Twitter Cards, canonical, description)
* à partir du contenu YAML d'une page.
*
* Usage dans les pages :
* useSeoPage({ title: content.value?.meta?.title, description: content.value?.description })
*
* L'og:image par défaut est /og-default.png (logo §).
* Chaque section peut surcharger avec son propre image via le champ seo.image du YAML.
*/
export function useSeoPage(opts: {
title?: string | null
description?: string | null
image?: string | null
type?: 'website' | 'article' | 'book'
}) {
const config = useRuntimeConfig()
const route = useRoute()
const siteUrl = (config.public.siteUrl as string) || 'https://librodrome.org'
const title = opts.title || 'Le Librodrome'
const description = opts.description
|| 'Autonomie numérique, économique et citoyenne. Un livre et des chansons sur l\'économie du don.'
const rawImage = opts.image || '/og-default.png?v=3'
const image = rawImage.startsWith('http') ? rawImage : `${siteUrl}${rawImage}`
const canonical = `${siteUrl}${route.path}`
const type = opts.type || 'website'
useSeoMeta({
// Open Graph
ogTitle: title,
ogDescription: description,
ogImage: image,
ogImageWidth: 1200,
ogImageHeight: 630,
ogUrl: canonical,
ogType: type,
ogSiteName: 'Le Librodrome',
ogLocale: 'fr_FR',
// Twitter Cards
twitterCard: 'summary_large_image',
twitterTitle: title,
twitterDescription: description,
twitterImage: image,
// Standard
description,
})
useHead({
link: [{ rel: 'canonical', href: canonical }],
})
}
+6
View File
@@ -14,6 +14,12 @@ interface SiteContent {
credits: string credits: string
links: NavItem[] links: NavItem[]
} }
lpk?: {
name: string
text: string
role: string
to: string
}
gratewizard: { gratewizard: {
url: string url: string
popup: { popup: {
+96
View File
@@ -0,0 +1,96 @@
/**
* Umami analytics wrapper — safe server-side, no-op when not configured.
*
* Events convention:
* audio:play | audio:pause | audio:complete | audio:progress
* pdf:open | pdf:close
* player:open | player:chapter | player:mode
* scroll:depth
* link:external
* cta:click
*/
export function useTracking() {
const runtimeConfig = useRuntimeConfig()
const enabled = !!runtimeConfig.public.umamiWebsiteId
// ── Core ────────────────────────────────────────────────────────────────
function track(event: string, data?: Record<string, unknown>) {
if (!import.meta.client || !enabled) return
const umami = (window as Record<string, unknown>).umami as
| { track: (event: string, data?: unknown) => void }
| undefined
umami?.track(event, data)
}
// ── Audio ────────────────────────────────────────────────────────────────
function trackAudioPlay(songId: string, songTitle: string, context?: string) {
track('audio:play', { song_id: songId, song_title: songTitle, context })
}
function trackAudioPause(songId: string, progressPct: number) {
track('audio:pause', { song_id: songId, progress_pct: progressPct })
}
function trackAudioComplete(songId: string, songTitle: string) {
track('audio:complete', { song_id: songId, song_title: songTitle })
}
/** Fired at 25 / 50 / 75 % milestones */
function trackAudioProgress(songId: string, milestone: 25 | 50 | 75) {
track('audio:progress', { song_id: songId, milestone })
}
// ── PDF ──────────────────────────────────────────────────────────────────
function trackPdfOpen(trigger?: string) {
track('pdf:open', { trigger })
}
function trackPdfClose(pagesVisited: number, durationMs: number) {
track('pdf:close', { pages_visited: pagesVisited, duration_ms: durationMs })
}
// ── BookPlayer ───────────────────────────────────────────────────────────
function trackPlayerOpen(trigger?: string) {
track('player:open', { trigger })
}
function trackPlayerChapter(chapterSlug: string) {
track('player:chapter', { chapter_slug: chapterSlug })
}
function trackPlayerMode(mode: 'guided' | 'scroll') {
track('player:mode', { mode })
}
// ── Navigation & UX ──────────────────────────────────────────────────────
function trackScrollDepth(page: string, depth: 25 | 50 | 75 | 100) {
track('scroll:depth', { page, depth })
}
function trackExternalLink(url: string, label?: string) {
const route = useRoute()
track('link:external', { url, label, from_page: route.path })
}
function trackCta(label: string, target?: string) {
const route = useRoute()
track('cta:click', { label, target, from_page: route.path })
}
return {
track,
enabled,
trackAudioPlay,
trackAudioPause,
trackAudioComplete,
trackAudioProgress,
trackPdfOpen,
trackPdfClose,
trackPlayerOpen,
trackPlayerChapter,
trackPlayerMode,
trackScrollDepth,
trackExternalLink,
trackCta,
}
}
-180
View File
@@ -1,180 +0,0 @@
book:
title: "Une économie du don — enfin concevable"
author: "Yvv"
description: "Un livre et 9 chansons pour explorer ensemble les fondements d'une économie fondée sur le don."
coverImage: "/images/book-cover.jpg"
license: "CC-BY-NC"
isbn: "979-1-042-45206-3"
songs:
- id: chanson-01
title: "1. Ce livre est une façon"
artist: Yvv
file: /audio/chanson-01.mp3
duration: 718
lyrics: ""
tags: [introduction, livre, don]
- id: chanson-02
title: "2. Un don qui se mesure"
artist: Yvv
file: /audio/chanson-02.mp3
duration: 589
lyrics: ""
tags: [don, mesure, valeur]
- id: chanson-03
title: "3. Les asymétries"
artist: Yvv
file: /audio/chanson-03.mp3
duration: 727
lyrics: ""
tags: [asymétrie, communauté, philosophie]
- id: chanson-04
title: "4. Inverser les flux"
artist: Yvv
file: /audio/chanson-04.mp3
duration: 610
lyrics: ""
tags: [flux, économie, production]
- id: chanson-05
title: "5. Ainsi soit-il"
artist: Yvv
file: /audio/chanson-05.mp3
duration: 545
lyrics: ""
tags: [action, engagement, avenir]
- id: chanson-06
title: "6. La croissance, une option ?"
artist: Yvv
file: /audio/chanson-06.mp3
duration: 510
lyrics: ""
tags: [croissance, monnaie, questionnement]
- id: chanson-07
title: "7. Monnaie libre essence"
artist: Yvv
file: /audio/chanson-07.mp3
duration: 475
lyrics: ""
tags: [monnaie libre, TRM, June]
- id: chanson-08
title: "8. Des cercles qui se croisent"
artist: Yvv
file: /audio/chanson-08.mp3
duration: 496
lyrics: ""
tags: [échange, réseau, cercles]
- id: chanson-09
title: "9. Coder la liberté"
artist: Yvv
file: /audio/chanson-09.mp3
duration: 376
lyrics: ""
tags: [logiciel libre, code, liberté]
chapterSongs:
# Chapitre 1 — Introduction
- chapterSlug: introduction
songId: chanson-01
primary: true
- chapterSlug: introduction
songId: chanson-02
primary: false
# Chapitre 2 — De quel don parlons-nous ?
- chapterSlug: de-quel-don-parlons-nous
songId: chanson-03
primary: true
- chapterSlug: de-quel-don-parlons-nous
songId: chanson-01
primary: false
# Chapitre 3 — La mesure du don
- chapterSlug: la-mesure-du-don
songId: chanson-02
primary: true
- chapterSlug: la-mesure-du-don
songId: chanson-03
primary: false
# Chapitre 4 — Raison d'être d'une monnaie
- chapterSlug: raison-d-etre-d-une-monnaie
songId: chanson-06
primary: true
- chapterSlug: raison-d-etre-d-une-monnaie
songId: chanson-07
primary: false
# Chapitre 5 — La TRM
- chapterSlug: la-trm
songId: chanson-07
primary: true
- chapterSlug: la-trm
songId: chanson-06
primary: false
# Chapitre 6 — Créer une économie ?
- chapterSlug: creer-une-economie
songId: chanson-04
primary: true
- chapterSlug: creer-une-economie
songId: chanson-07
primary: false
# Chapitre 7 — Échanger
- chapterSlug: echanger
songId: chanson-08
primary: true
- chapterSlug: echanger
songId: chanson-04
primary: false
# Chapitre 8 — Relation institutionnelle
- chapterSlug: relation-institutionnelle
songId: chanson-05
primary: false
- chapterSlug: relation-institutionnelle
songId: chanson-08
primary: false
# Chapitre 9 — Autres greffes
- chapterSlug: autres-greffes
songId: chanson-04
primary: false
- chapterSlug: autres-greffes
songId: chanson-08
primary: false
# Chapitre 10 — Et maintenant ?
- chapterSlug: et-maintenant
songId: chanson-05
primary: true
- chapterSlug: et-maintenant
songId: chanson-09
primary: false
# Chapitre 11 — Annexes
- chapterSlug: annexes
songId: chanson-09
primary: true
- chapterSlug: annexes
songId: chanson-07
primary: false
defaultPlaylistOrder:
- chanson-01
- chanson-02
- chanson-03
- chanson-04
- chanson-05
- chanson-06
- chanson-07
- chanson-08
- chanson-09
+35 -1
View File
@@ -1,15 +1,49 @@
<template> <template>
<div class="app-layout grid grid-cols-1 min-h-dvh"> <div class="app-layout grid grid-cols-1 min-h-dvh">
<LayoutTheHeader /> <LayoutTheHeader />
<main class="pb-[var(--player-height)]"> <main class="app-main">
<slot /> <slot />
<!-- 益 Yì (Increase, #42) — sceau hexagramme (traits épais, coins nets, ~carré) -->
<svg class="app-seal" viewBox="0 0 112 105" fill="currentColor" aria-hidden="true">
<!-- Line 6 (top) — yang -->
<rect x="6" y="6" width="100" height="8"/>
<!-- Line 5 — yang -->
<rect x="6" y="23" width="100" height="8"/>
<!-- Line 4 — yin -->
<rect x="6" y="40" width="42" height="8"/>
<rect x="64" y="40" width="42" height="8"/>
<!-- Line 3 — yin -->
<rect x="6" y="57" width="42" height="8"/>
<rect x="64" y="57" width="42" height="8"/>
<!-- Line 2 — yin -->
<rect x="6" y="74" width="42" height="8"/>
<rect x="64" y="74" width="42" height="8"/>
<!-- Line 1 (bottom) — yang -->
<rect x="6" y="91" width="100" height="8"/>
</svg>
</main> </main>
<LayoutTheFooter /> <LayoutTheFooter />
</div> </div>
</template> </template>
<script setup lang="ts">
useScrollTracking()
</script>
<style scoped> <style scoped>
.app-layout { .app-layout {
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
} }
/* === Seal — 益 Yì (Increase) === */
.app-seal {
display: block;
width: 44px;
margin: 2rem 1.5rem 1rem auto;
color: hsl(var(--color-accent));
opacity: 0.28;
filter: drop-shadow(1px 1px 0.5px rgba(0,0,0,0.25))
drop-shadow(-0.5px -0.5px 0.5px rgba(255,255,255,0.15));
}
</style> </style>
+2 -2
View File
@@ -1,7 +1,7 @@
<template> <template>
<div class="app-layout grid grid-cols-1 min-h-dvh"> <div class="app-layout grid grid-cols-1 min-h-dvh">
<LayoutTheHeader /> <LayoutTheHeader />
<div class="reading-layout pb-[var(--player-height)]"> <div class="reading-layout">
<aside class="chapter-sidebar hidden lg:block"> <aside class="chapter-sidebar hidden lg:block">
<BookChapterNav /> <BookChapterNav />
</aside> </aside>
@@ -35,7 +35,7 @@
top: var(--header-height); top: var(--header-height);
height: calc(100dvh - var(--header-height)); height: calc(100dvh - var(--header-height));
overflow-y: auto; overflow-y: auto;
border-right: 1px solid hsl(0 0% 100% / 0.08); border-right: 1px solid hsl(var(--color-text) / 0.08);
padding: 1.5rem; padding: 1.5rem;
} }
+22 -4
View File
@@ -1,7 +1,14 @@
<template> <template>
<div class="section-padding"> <div class="relative overflow-hidden section-padding">
<div class="container-content mx-auto max-w-3xl"> <div class="container-content relative mx-auto max-w-3xl">
<!-- In the margins, at the height of « La vision » and of the economic proposal -->
<UiOiseauPose nom="philosophe" pose="libre" left="calc(100% + 50px)" top="470px" :w="120" retourne />
<UiOiseauPose nom="penseur" pose="libre" right="calc(100% + 60px)" top="720px" :w="100" />
<ContentRenderer v-if="page" :value="page" class="prose" /> <ContentRenderer v-if="page" :value="page" class="prose" />
<!-- Credit of the mascot (Yvv, word for word, 27/10) -->
<p class="oiseaux-credit">
N'ayant pas les moyens d'acquérir des droits, le personnage mascotte est une création qui fait un clin d'œil aux shadoks, avec respect et une grande affection, petit hommage en passant.
</p>
</div> </div>
</div> </div>
</template> </template>
@@ -11,11 +18,22 @@ definePageMeta({
layout: 'default', layout: 'default',
}) })
useHead({ useSeoPage({
title: 'À propos', title: 'À propos — Le Librodrome',
description: 'Le Librodrome : l\'histoire du projet, la démarche et les personnes derrière le livre et les outils d\'autonomie.',
}) })
const { data: page } = await useAsyncData('about', () => const { data: page } = await useAsyncData('about', () =>
queryCollection('pages').path('/pages/about').first(), queryCollection('pages').path('/pages/about').first(),
) )
</script> </script>
<style scoped>
.oiseaux-credit {
margin: 3rem 0 0;
font-size: 0.8rem;
line-height: 1.5;
color: hsl(var(--color-text) / 0.5);
}
</style>
+232 -30
View File
@@ -6,24 +6,66 @@
← Chapitres ← Chapitres
</NuxtLink> </NuxtLink>
<h1 class="font-display text-2xl font-bold text-white mt-1"> <h1 class="font-display text-2xl font-bold text-white mt-1">
{{ chapter?.slug }} {{ chapterTitle || slug }}
</h1> </h1>
<span class="text-xs text-white/30 font-mono">{{ slug }}</span>
</div>
<div class="flex items-center gap-3">
<span v-if="wordCount" class="text-xs text-white/30">{{ wordCount }} mots</span>
<AdminSaveButton :saving="saving" :saved="saved" @save="save" />
</div> </div>
<AdminSaveButton :saving="saving" :saved="saved" @save="save" />
</div> </div>
<template v-if="chapter"> <template v-if="chapter">
<AdminFormSection title="Frontmatter" open> <AdminFormSection title="Métadonnées">
<textarea <div class="grid gap-3 sm:grid-cols-2">
v-model="frontmatter" <div>
class="fm-textarea" <label class="field-label">Titre</label>
rows="6" <input v-model="title" class="field-input" placeholder="Titre du chapitre" />
spellcheck="false" </div>
/> <div>
<label class="field-label">Temps de lecture</label>
<input v-model="readingTime" class="field-input" placeholder="15 min" />
</div>
<div class="sm:col-span-2">
<label class="field-label">Description</label>
<input v-model="description" class="field-input" placeholder="Description courte pour le SEO" />
</div>
</div>
</AdminFormSection> </AdminFormSection>
<AdminFormSection title="Contenu Markdown" open> <AdminFormSection title="Morceaux associés">
<AdminMarkdownEditor v-model="body" :rows="30" /> <p class="text-xs text-white/40 mb-3">
Cliquez pour associer/dissocier. Cliquez sur l'étoile pour définir le morceau principal.
</p>
<div class="flex flex-wrap gap-2">
<div
v-for="song in allSongs"
:key="song.id"
class="song-tag"
:class="{
'song-tag--active': isLinked(song.id),
'song-tag--primary': isPrimary(song.id),
}"
>
<button
v-if="isLinked(song.id)"
class="song-star"
:class="{ 'song-star--active': isPrimary(song.id) }"
@click="setPrimary(song.id)"
aria-label="Définir comme principal"
>
<div class="i-lucide-star h-3 w-3" />
</button>
<button class="song-tag-label" @click="toggleSong(song.id)">
{{ song.title }}
</button>
</div>
</div>
</AdminFormSection>
<AdminFormSection title="Contenu" open>
<AdminMarkdownEditor v-model="body" :rows="35" />
</AdminFormSection> </AdminFormSection>
</template> </template>
</div> </div>
@@ -39,17 +81,80 @@ const route = useRoute()
const slug = computed(() => route.params.slug as string) const slug = computed(() => route.params.slug as string)
const { data: chapter } = await useFetch(() => `/api/admin/chapters/${slug.value}`) const { data: chapter } = await useFetch(() => `/api/admin/chapters/${slug.value}`)
const { data: bookConfig } = await useFetch<any>('/api/content/config')
const frontmatter = ref('') const title = ref('')
const description = ref('')
const readingTime = ref('')
const body = ref('') const body = ref('')
const chapterTitle = computed(() => title.value)
const wordCount = computed(() => {
if (!body.value) return 0
return body.value.trim().split(/\s+/).filter(Boolean).length
})
watch(chapter, (val) => { watch(chapter, (val) => {
if (val) { if (val) {
frontmatter.value = val.frontmatter ?? '' const fm = val.frontmatter ?? ''
title.value = extractFmField(fm, 'title')
description.value = extractFmField(fm, 'description')
readingTime.value = extractFmField(fm, 'readingTime')
body.value = val.body ?? '' body.value = val.body ?? ''
} }
}, { immediate: true }) }, { immediate: true })
function extractFmField(fm: string, field: string): string {
const match = fm.match(new RegExp(`^${field}:\\s*"?([^"\\n]*)"?`, 'm'))
return match ? match[1].trim() : ''
}
// ── Morceaux associés ──
const allSongs = computed(() => bookConfig.value?.songs ?? [])
const linkedSongIds = ref<Set<string>>(new Set())
const primarySongId = ref<string | null>(null)
watch(bookConfig, (val) => {
if (!val) return
const links = (val.chapterSongs ?? []).filter(
(cs: any) => cs.chapterSlug === slug.value,
)
linkedSongIds.value = new Set(links.map((l: any) => l.songId))
const primary = links.find((l: any) => l.primary)
primarySongId.value = primary?.songId ?? null
}, { immediate: true })
function isLinked(songId: string) {
return linkedSongIds.value.has(songId)
}
function isPrimary(songId: string) {
return primarySongId.value === songId
}
function toggleSong(songId: string) {
const next = new Set(linkedSongIds.value)
if (next.has(songId)) {
next.delete(songId)
if (primarySongId.value === songId) primarySongId.value = null
}
else {
next.add(songId)
if (!primarySongId.value) primarySongId.value = songId
}
linkedSongIds.value = next
}
function setPrimary(songId: string) {
if (!linkedSongIds.value.has(songId)) {
const next = new Set(linkedSongIds.value)
next.add(songId)
linkedSongIds.value = next
}
primarySongId.value = songId
}
// ── Save ──
const saving = ref(false) const saving = ref(false)
const saved = ref(false) const saved = ref(false)
@@ -57,13 +162,40 @@ async function save() {
saving.value = true saving.value = true
saved.value = false saved.value = false
try { try {
// 1. Sauvegarder le contenu du chapitre
const order = chapter.value?.frontmatter?.match(/order:\s*(\d+)/)?.[1] ?? '1'
const frontmatter = [
`title: "${title.value}"`,
`description: "${description.value}"`,
`order: ${order}`,
`readingTime: "${readingTime.value}"`,
].join('\n')
await $fetch(`/api/admin/chapters/${slug.value}`, { await $fetch(`/api/admin/chapters/${slug.value}`, {
method: 'PUT', method: 'PUT',
body: { body: { frontmatter, body: body.value },
frontmatter: frontmatter.value,
body: body.value,
},
}) })
// 2. Sauvegarder les liaisons morceaux dans la config
if (bookConfig.value) {
const otherLinks = (bookConfig.value.chapterSongs ?? []).filter(
(cs: any) => cs.chapterSlug !== slug.value,
)
const newLinks = [...linkedSongIds.value].map(songId => ({
chapterSlug: slug.value,
songId,
primary: songId === primarySongId.value,
}))
const updatedConfig = {
...bookConfig.value,
chapterSongs: [...otherLinks, ...newLinks],
}
await $fetch('/api/admin/content/config', {
method: 'PUT',
body: updatedConfig,
})
}
saved.value = true saved.value = true
setTimeout(() => { saved.value = false }, 2000) setTimeout(() => { saved.value = false }, 2000)
} }
@@ -74,21 +206,91 @@ async function save() {
</script> </script>
<style scoped> <style scoped>
.fm-textarea { .field-label {
width: 100%; display: block;
padding: 0.75rem; font-size: 0.75rem;
border: 1px solid hsl(20 8% 18%); color: hsl(var(--color-text-muted));
border-radius: 0.5rem; margin-bottom: 0.25rem;
background: hsl(20 8% 4%);
color: hsl(36 80% 76%);
font-family: var(--font-mono, monospace);
font-size: 0.85rem;
line-height: 1.7;
resize: vertical;
} }
.fm-textarea:focus { .field-input {
width: 100%;
padding: 0.5rem 0.625rem;
border-radius: 0.375rem;
border: 1px solid hsl(var(--color-surface-light));
background: hsl(var(--color-bg));
color: hsl(var(--color-text));
font-size: 0.85rem;
}
.field-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
}
/* ── Song tags ── */
.song-tag {
display: inline-flex;
align-items: center;
border-radius: 9999px;
border: 1px solid hsl(var(--color-surface-light));
transition: all 0.15s;
overflow: hidden;
}
.song-tag:hover {
border-color: hsl(var(--color-primary) / 0.4);
}
.song-tag--active {
border-color: hsl(var(--color-primary) / 0.6);
background: hsl(var(--color-primary) / 0.08);
}
.song-tag--primary {
border-color: hsl(var(--color-accent));
background: hsl(var(--color-accent) / 0.08);
}
.song-tag-label {
padding: 0.375rem 0.75rem;
background: none;
border: none;
color: hsl(var(--color-text-muted));
font-size: 0.8rem;
cursor: pointer;
transition: color 0.15s;
}
.song-tag--active .song-tag-label {
color: hsl(var(--color-primary));
}
.song-tag--primary .song-tag-label {
color: hsl(var(--color-accent));
}
.song-tag-label:hover {
color: hsl(var(--color-text));
}
.song-star {
display: flex;
align-items: center;
justify-content: center;
padding: 0.375rem 0 0.375rem 0.625rem;
background: none;
border: none;
color: hsl(var(--color-text-muted));
cursor: pointer;
transition: color 0.15s;
}
.song-star:hover {
color: hsl(var(--color-accent));
}
.song-star--active {
color: hsl(var(--color-accent));
} }
</style> </style>
+383 -16
View File
@@ -1,18 +1,105 @@
<template> <template>
<div> <div>
<h1 class="font-display text-2xl font-bold text-white mb-6">Chapitres</h1> <div class="flex items-center justify-between mb-6">
<h1 class="font-display text-2xl font-bold text-white">Livre &amp; chapitres</h1>
<AdminSaveButton :saving="saving" :saved="saved" @save="saveOrder" />
</div>
<!-- PDF config -->
<div class="pdf-section">
<h2 class="font-display text-sm font-semibold text-white/60 mb-3">PDF du livre</h2>
<div class="flex items-end gap-3">
<div class="flex-1">
<label class="block text-xs text-white/40 mb-1">Chemin du fichier PDF</label>
<input
v-model="pdfPath"
class="admin-input w-full font-mono text-xs"
placeholder="/pdf/une-economie-du-don.pdf"
/>
</div>
<button class="save-pdf-btn" @click="savePdfConfig" :disabled="savingPdf">
<div v-if="savingPdf" class="i-lucide-loader-2 h-3.5 w-3.5 animate-spin" />
<div v-else-if="savedPdf" class="i-lucide-check h-3.5 w-3.5" />
<div v-else class="i-lucide-save h-3.5 w-3.5" />
{{ savedPdf ? 'Enregistré' : 'Enregistrer' }}
</button>
</div>
<p class="text-xs text-white/30 mt-2">
Uploadez le PDF via Médias, puis renseignez le chemin ici.
</p>
</div>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<NuxtLink <div
v-for="chapter in chapters" v-for="(chapter, i) in chapters"
:key="chapter.slug" :key="chapter.slug"
:to="`/admin/book/${chapter.slug}`"
class="chapter-item" class="chapter-item"
draggable="true"
@dragstart="onDragStart(i, $event)"
@dragover.prevent="onDragOver(i)"
@dragend="onDragEnd"
:class="{ 'chapter-item--dragging': dragIdx === i, 'chapter-item--over': dropIdx === i && dropIdx !== dragIdx }"
> >
<span class="chapter-order">{{ String(chapter.order ?? 0).padStart(2, '0') }}</span> <div class="drag-handle" aria-label="Réordonner">
<span class="chapter-title">{{ chapter.title }}</span> <div class="i-lucide-grip-vertical h-4 w-4" />
<div class="i-lucide-chevron-right h-4 w-4 text-white/20" /> </div>
</NuxtLink> <span class="chapter-order">{{ String(i + 1).padStart(2, '0') }}</span>
<div class="chapter-info">
<NuxtLink
:to="`/admin/book/${chapter.slug}`"
class="chapter-title"
>
{{ chapter.title }}
</NuxtLink>
<div v-if="getChapterSongNames(chapter.slug).length" class="chapter-songs">
<span
v-for="name in getChapterSongNames(chapter.slug)"
:key="name"
class="song-badge"
>{{ name }}</span>
</div>
</div>
<select
v-if="pdfOutline.length"
class="page-select"
:value="getChapterPage(chapter.slug) ?? ''"
@change="setChapterPage(chapter.slug, ($event.target as HTMLSelectElement).value)"
>
<option value="">— Page PDF —</option>
<option
v-for="entry in pdfOutline"
:key="`${entry.page}-${entry.title}`"
:value="entry.page"
>{{ '\u00A0\u00A0'.repeat(entry.level) }}{{ entry.title }} (p.{{ entry.page }})</option>
</select>
<span v-else class="text-xs text-white/30">…</span>
<button
class="delete-btn"
@click="removeChapter(chapter.slug)"
aria-label="Supprimer"
>
<div class="i-lucide-trash-2 h-4 w-4" />
</button>
<NuxtLink :to="`/admin/book/${chapter.slug}`">
<div class="i-lucide-chevron-right h-4 w-4 text-white/20" />
</NuxtLink>
</div>
</div>
<!-- Add chapter -->
<div class="mt-6 flex items-end gap-3">
<div class="flex-1">
<label class="block text-xs text-white/40 mb-1">Titre</label>
<input v-model="newTitle" class="admin-input w-full" placeholder="Nouveau chapitre" />
</div>
<div>
<label class="block text-xs text-white/40 mb-1">Slug</label>
<input v-model="newSlug" class="admin-input w-full font-mono text-xs" placeholder="12-slug" />
</div>
<button class="add-btn" @click="addChapter" :disabled="!newTitle || !newSlug">
<div class="i-lucide-plus h-4 w-4" />
Ajouter
</button>
</div> </div>
</div> </div>
</template> </template>
@@ -23,37 +110,317 @@ definePageMeta({
middleware: 'admin', middleware: 'admin',
}) })
const { data: chapters } = await useFetch('/api/admin/chapters') const { data: chapters, refresh } = await useFetch<any[]>('/api/admin/chapters')
const { data: bookConfig } = await useFetch<any>('/api/content/config')
function getChapterSongNames(chapterSlug: string): string[] {
if (!bookConfig.value) return []
const links = (bookConfig.value.chapterSongs ?? []).filter(
(cs: any) => cs.chapterSlug === chapterSlug,
)
return links.map((link: any) => {
const song = bookConfig.value.songs.find((s: any) => s.id === link.songId)
return song?.title ?? link.songId
})
}
const saving = ref(false)
const saved = ref(false)
const newTitle = ref('')
const newSlug = ref('')
// PDF path + outline
const pdfPath = ref(bookConfig.value?.book?.pdfFile ?? '/pdf/une-economie-du-don.pdf')
const savingPdf = ref(false)
const savedPdf = ref(false)
const pdfOutline = ref<Array<{ title: string; page: number; level: number }>>([])
const chapterPageMap = ref<Record<string, number | undefined>>({})
if (bookConfig.value?.chapterPages) {
for (const cp of bookConfig.value.chapterPages) {
chapterPageMap.value[cp.chapterSlug] = cp.page
}
}
function getChapterPage(slug: string): number | undefined {
return chapterPageMap.value[slug]
}
function setChapterPage(slug: string, val: string) {
const num = parseInt(val, 10)
if (num > 0) chapterPageMap.value[slug] = num
else delete chapterPageMap.value[slug]
}
// Charger le sommaire PDF côté client via l'API serveur
onMounted(() => {
$fetch<Array<{ title: string; page: number; level: number }>>('/api/admin/pdf-outline')
.then((data) => { pdfOutline.value = data })
.catch((err) => { console.warn('PDF outline load failed:', err) })
})
async function savePdfConfig() {
if (!bookConfig.value) return
savingPdf.value = true
savedPdf.value = false
try {
bookConfig.value.book.pdfFile = pdfPath.value
bookConfig.value.chapterPages = Object.entries(chapterPageMap.value)
.filter(([, page]) => page != null)
.map(([chapterSlug, page]) => ({ chapterSlug, page }))
await $fetch('/api/admin/content/config', {
method: 'PUT',
body: bookConfig.value,
})
savedPdf.value = true
setTimeout(() => { savedPdf.value = false }, 2000)
} finally {
savingPdf.value = false
}
}
// Drag & drop state
const dragIdx = ref<number | null>(null)
const dropIdx = ref<number | null>(null)
function onDragStart(i: number, e: DragEvent) {
dragIdx.value = i
if (e.dataTransfer) {
e.dataTransfer.effectAllowed = 'move'
}
}
function onDragOver(i: number) {
dropIdx.value = i
}
function onDragEnd() {
if (dragIdx.value !== null && dropIdx.value !== null && dragIdx.value !== dropIdx.value && chapters.value) {
const [moved] = chapters.value.splice(dragIdx.value, 1)
chapters.value.splice(dropIdx.value, 0, moved)
}
dragIdx.value = null
dropIdx.value = null
}
async function saveOrder() {
if (!chapters.value) return
saving.value = true
saved.value = false
try {
const orderedChapters = chapters.value.map((ch: any, i: number) => ({
slug: ch.slug,
order: i + 1,
}))
await $fetch('/api/admin/chapters', {
method: 'PUT',
body: { chapters: orderedChapters },
})
saved.value = true
setTimeout(() => { saved.value = false }, 2000)
}
finally {
saving.value = false
}
}
async function addChapter() {
if (!newTitle.value || !newSlug.value) return
const order = (chapters.value?.length ?? 0) + 1
await $fetch('/api/admin/chapters', {
method: 'POST',
body: { slug: newSlug.value, title: newTitle.value, order },
})
newTitle.value = ''
newSlug.value = ''
await refresh()
}
async function removeChapter(slug: string) {
if (!confirm(`Supprimer le chapitre "${slug}" ?`)) return
await $fetch(`/api/admin/chapters/${slug}`, { method: 'DELETE' })
await refresh()
}
</script> </script>
<style scoped> <style scoped>
.pdf-section {
margin-bottom: 1.5rem;
padding: 1rem;
border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem;
background: hsl(var(--color-bg));
}
.save-pdf-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: 1px solid hsl(var(--color-surface-light));
background: none;
color: hsl(var(--color-text-muted));
font-size: 0.8rem;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}
.save-pdf-btn:hover:not(:disabled) {
border-color: hsl(var(--color-primary) / 0.5);
color: hsl(var(--color-primary));
}
.save-pdf-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.chapter-item { .chapter-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.75rem; gap: 0.75rem;
padding: 0.75rem 1rem; padding: 0.75rem 1rem;
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
text-decoration: none;
transition: all 0.2s; transition: all 0.2s;
} }
.chapter-item:hover { .chapter-item:hover {
border-color: hsl(12 76% 48% / 0.3); border-color: hsl(var(--color-primary) / 0.3);
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
}
.chapter-item--dragging {
opacity: 0.4;
}
.chapter-item--over {
border-top: 2px solid hsl(var(--color-primary));
}
.drag-handle {
cursor: grab;
padding: 0.25rem;
color: hsl(var(--color-text-muted));
flex-shrink: 0;
}
.drag-handle:active {
cursor: grabbing;
} }
.chapter-order { .chapter-order {
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
font-size: 0.85rem; font-size: 0.85rem;
color: hsl(12 76% 48% / 0.5); color: hsl(var(--color-primary) / 0.5);
font-weight: 600; font-weight: 600;
width: 1.75rem; width: 1.75rem;
} }
.chapter-title { .chapter-info {
flex: 1; flex: 1;
color: white; min-width: 0;
}
.chapter-title {
display: block;
color: hsl(var(--color-text));
font-weight: 500; font-weight: 500;
text-decoration: none;
}
.chapter-title:hover {
color: hsl(var(--color-primary));
}
.chapter-songs {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-top: 0.25rem;
}
.song-badge {
font-size: 0.65rem;
padding: 0.1rem 0.5rem;
border-radius: 9999px;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
border: 1px solid hsl(var(--color-primary) / 0.2);
}
.page-select {
flex-shrink: 0;
max-width: 14rem;
padding: 0.25rem 0.4rem;
border-radius: 0.375rem;
border: 1px solid hsl(var(--color-surface-light));
background: hsl(var(--color-bg));
color: hsl(var(--color-text-muted));
font-size: 0.7rem;
cursor: pointer;
}
.page-select:focus {
outline: none;
border-color: hsl(var(--color-primary) / 0.5);
}
.delete-btn {
flex-shrink: 0;
padding: 0.375rem;
border-radius: 0.375rem;
color: hsl(0 60% 50%);
background: none;
border: none;
cursor: pointer;
transition: background 0.15s;
}
.delete-btn:hover {
background: hsl(0 60% 50% / 0.1);
}
.admin-input {
padding: 0.375rem 0.5rem;
border-radius: 0.375rem;
border: 1px solid hsl(var(--color-surface-light));
background: hsl(var(--color-bg));
color: hsl(var(--color-text));
font-size: 0.8rem;
}
.admin-input:focus {
outline: none;
border-color: hsl(var(--color-primary) / 0.5);
}
.add-btn {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: 1px solid hsl(var(--color-surface-light));
background: none;
color: hsl(var(--color-text-muted));
font-size: 0.85rem;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}
.add-btn:hover:not(:disabled) {
border-color: hsl(var(--color-primary) / 0.5);
color: hsl(var(--color-primary));
}
.add-btn:disabled {
opacity: 0.3;
cursor: not-allowed;
} }
</style> </style>
+12 -6
View File
@@ -9,8 +9,8 @@
<p class="text-sm text-white/50">Identité, navigation, footer</p> <p class="text-sm text-white/50">Identité, navigation, footer</p>
</NuxtLink> </NuxtLink>
<NuxtLink to="/admin/pages/home" class="dash-card"> <NuxtLink to="/admin/pages" class="dash-card">
<div class="i-lucide-home h-8 w-8 text-primary mb-2" /> <div class="i-lucide-file-text h-8 w-8 text-primary mb-2" />
<h2 class="text-lg font-semibold text-white">Pages</h2> <h2 class="text-lg font-semibold text-white">Pages</h2>
<p class="text-sm text-white/50">Contenus des pages publiques</p> <p class="text-sm text-white/50">Contenus des pages publiques</p>
</NuxtLink> </NuxtLink>
@@ -27,6 +27,12 @@
<p class="text-sm text-white/50">Métadonnées des pistes</p> <p class="text-sm text-white/50">Métadonnées des pistes</p>
</NuxtLink> </NuxtLink>
<NuxtLink to="/admin/messages" class="dash-card">
<div class="i-lucide-message-square h-8 w-8 text-accent mb-2" />
<h2 class="text-lg font-semibold text-white">Messages</h2>
<p class="text-sm text-white/50">Modération des messages visiteurs</p>
</NuxtLink>
<NuxtLink to="/admin/media" class="dash-card"> <NuxtLink to="/admin/media" class="dash-card">
<div class="i-lucide-image h-8 w-8 text-accent mb-2" /> <div class="i-lucide-image h-8 w-8 text-accent mb-2" />
<h2 class="text-lg font-semibold text-white">Médias</h2> <h2 class="text-lg font-semibold text-white">Médias</h2>
@@ -47,14 +53,14 @@ definePageMeta({
.dash-card { .dash-card {
padding: 1.5rem; padding: 1.5rem;
border-radius: 0.75rem; border-radius: 0.75rem;
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
text-decoration: none; text-decoration: none;
transition: all 0.2s; transition: all 0.2s;
} }
.dash-card:hover { .dash-card:hover {
border-color: hsl(12 76% 48% / 0.3); border-color: hsl(var(--color-primary) / 0.3);
background: hsl(20 8% 8%); background: hsl(var(--color-surface));
} }
</style> </style>
+35 -10
View File
@@ -22,6 +22,10 @@
<div v-if="loading" class="i-lucide-loader-2 h-4 w-4 animate-spin" /> <div v-if="loading" class="i-lucide-loader-2 h-4 w-4 animate-spin" />
Se connecter Se connecter
</button> </button>
<p v-if="devHint" class="dev-hint">
Dev : <code>{{ devHint }}</code>
</p>
</form> </form>
</div> </div>
</template> </template>
@@ -34,6 +38,13 @@ definePageMeta({
const password = ref('') const password = ref('')
const error = ref('') const error = ref('')
const loading = ref(false) const loading = ref(false)
const devHint = ref('')
if (import.meta.dev) {
$fetch('/api/admin/auth/hint').then((res: any) => {
devHint.value = res.password
}).catch(() => {})
}
async function login() { async function login() {
error.value = '' error.value = ''
@@ -61,16 +72,16 @@ async function login() {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: hsl(20 8% 3.5%); background: hsl(var(--color-bg));
} }
.login-form { .login-form {
width: 100%; width: 100%;
max-width: 24rem; max-width: 24rem;
padding: 2.5rem; padding: 2.5rem;
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 1rem; border-radius: 1rem;
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
} }
.login-error { .login-error {
@@ -86,7 +97,7 @@ async function login() {
display: block; display: block;
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 500; font-weight: 500;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
margin-bottom: 0.375rem; margin-bottom: 0.375rem;
} }
@@ -94,16 +105,16 @@ async function login() {
width: 100%; width: 100%;
padding: 0.625rem 0.75rem; padding: 0.625rem 0.75rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 4%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.9rem; font-size: 0.9rem;
margin-bottom: 1.25rem; margin-bottom: 1.25rem;
} }
.login-input:focus { .login-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
.login-btn { .login-btn {
@@ -115,7 +126,7 @@ async function login() {
padding: 0.625rem; padding: 0.625rem;
border-radius: 0.5rem; border-radius: 0.5rem;
border: none; border: none;
background: hsl(12 76% 48%); background: hsl(var(--color-primary));
color: white; color: white;
font-weight: 600; font-weight: 600;
font-size: 0.9rem; font-size: 0.9rem;
@@ -124,11 +135,25 @@ async function login() {
} }
.login-btn:hover:not(:disabled) { .login-btn:hover:not(:disabled) {
background: hsl(12 76% 42%); background: hsl(var(--color-primary));
} }
.login-btn:disabled { .login-btn:disabled {
opacity: 0.7; opacity: 0.7;
cursor: wait; cursor: wait;
} }
.dev-hint {
margin-top: 1rem;
text-align: center;
font-size: 0.75rem;
color: hsl(var(--color-text-muted));
}
.dev-hint code {
color: hsl(var(--color-primary));
background: hsl(var(--color-surface));
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
}
</style> </style>
+161 -33
View File
@@ -5,7 +5,7 @@
<span class="text-sm text-white/40">{{ messages?.length || 0 }} message(s)</span> <span class="text-sm text-white/40">{{ messages?.length || 0 }} message(s)</span>
</div> </div>
<div v-if="messages?.length" class="space-y-3"> <div v-if="messages?.length" class="space-y-4">
<div <div
v-for="msg in messages" v-for="msg in messages"
:key="msg.id" :key="msg.id"
@@ -17,6 +17,9 @@
<div class="flex items-center gap-2 min-w-0"> <div class="flex items-center gap-2 min-w-0">
<span class="font-semibold text-white text-sm truncate">{{ msg.author }}</span> <span class="font-semibold text-white text-sm truncate">{{ msg.author }}</span>
<span v-if="msg.email" class="text-white/30 text-xs truncate">{{ msg.email }}</span> <span v-if="msg.email" class="text-white/30 text-xs truncate">{{ msg.email }}</span>
<span class="type-badge" :class="`type-badge--${msg.type || 'reaction'}`">
{{ typeLabel(msg.type) }}
</span>
</div> </div>
<div class="flex items-center gap-2 shrink-0"> <div class="flex items-center gap-2 shrink-0">
<span class="text-xs text-white/30">{{ formatDate(msg.createdAt) }}</span> <span class="text-xs text-white/30">{{ formatDate(msg.createdAt) }}</span>
@@ -29,23 +32,54 @@
</div> </div>
</div> </div>
<!-- Texte éditable --> <!-- Texte du message -->
<div v-if="editing === msg.id" class="mb-3"> <div v-if="editing === msg.id" class="mb-3 space-y-2">
<input <input v-model="editForm.author" class="admin-input w-full" placeholder="Auteur" />
v-model="editForm.author" <select v-model="editForm.type" class="admin-input w-full">
class="admin-input mb-2 w-full" <option value="question">Question</option>
placeholder="Auteur" <option value="suggestion">Suggestion</option>
/> <option value="retour">Retour d'expérience</option>
<textarea </select>
v-model="editForm.text" <textarea v-model="editForm.text" class="admin-input w-full" rows="3" />
class="admin-input w-full" </div>
rows="3" <p v-else class="msg-text text-sm leading-relaxed mb-3">{{ msg.text }}</p>
/>
<!-- Réponse existante -->
<div v-if="msg.reply && replyEditing !== msg.id" class="reply-block mb-3">
<div class="flex items-center justify-between mb-1">
<span class="text-xs font-semibold text-primary/80">Réponse publiée</span>
<span class="text-xs text-white/30">{{ formatDate(msg.reply.publishedAt) }}</span>
</div>
<p class="text-white/60 text-sm leading-relaxed">{{ msg.reply.text }}</p>
<button class="action-btn mt-2 text-xs" @click="startReply(msg)">
<div class="i-lucide-pencil h-3 w-3" />
Modifier la réponse
</button>
</div>
<!-- Formulaire réponse -->
<div v-if="replyEditing === msg.id" class="reply-form mb-3">
<textarea
v-model="replyText"
class="admin-input w-full text-sm"
rows="3"
placeholder="Votre réponse..."
/>
<div class="flex gap-2 mt-2">
<button class="action-btn action-btn--save" @click="saveReply(msg)">
<div class="i-lucide-check h-3.5 w-3.5" />
Publier la réponse
</button>
<button v-if="msg.reply" class="action-btn action-btn--danger" @click="removeReply(msg)">
<div class="i-lucide-x h-3.5 w-3.5" />
Supprimer la réponse
</button>
<button class="action-btn" @click="replyEditing = null">Annuler</button>
</div>
</div> </div>
<p v-else class="text-white/70 text-sm leading-relaxed mb-3">{{ msg.text }}</p>
<!-- Actions --> <!-- Actions -->
<div class="flex items-center gap-2"> <div class="flex items-center gap-2 flex-wrap">
<button class="action-btn" @click="togglePublished(msg)"> <button class="action-btn" @click="togglePublished(msg)">
<div :class="msg.published ? 'i-lucide-eye-off' : 'i-lucide-eye'" class="h-3.5 w-3.5" /> <div :class="msg.published ? 'i-lucide-eye-off' : 'i-lucide-eye'" class="h-3.5 w-3.5" />
{{ msg.published ? 'Dépublier' : 'Publier' }} {{ msg.published ? 'Dépublier' : 'Publier' }}
@@ -56,15 +90,18 @@
<div class="i-lucide-check h-3.5 w-3.5" /> <div class="i-lucide-check h-3.5 w-3.5" />
Valider Valider
</button> </button>
<button class="action-btn" @click="editing = null"> <button class="action-btn" @click="editing = null">Annuler</button>
Annuler
</button>
</template> </template>
<button v-else class="action-btn" @click="startEdit(msg)"> <button v-else class="action-btn" @click="startEdit(msg)">
<div class="i-lucide-pencil h-3.5 w-3.5" /> <div class="i-lucide-pencil h-3.5 w-3.5" />
Modifier Modifier
</button> </button>
<button v-if="replyEditing !== msg.id && !msg.reply" class="action-btn action-btn--reply" @click="startReply(msg)">
<div class="i-lucide-reply h-3.5 w-3.5" />
Répondre
</button>
<button class="action-btn action-btn--danger ml-auto" @click="remove(msg)"> <button class="action-btn action-btn--danger ml-auto" @click="remove(msg)">
<div class="i-lucide-trash-2 h-3.5 w-3.5" /> <div class="i-lucide-trash-2 h-3.5 w-3.5" />
Supprimer Supprimer
@@ -86,18 +123,33 @@ definePageMeta({
const { data: messages, refresh } = await useFetch<any[]>('/api/admin/messages') const { data: messages, refresh } = await useFetch<any[]>('/api/admin/messages')
const editing = ref<number | null>(null) const editing = ref<number | null>(null)
const editForm = reactive({ author: '', text: '' }) const editForm = reactive({ author: '', text: '', type: 'question' })
const replyEditing = ref<number | null>(null)
const replyText = ref('')
const TYPE_LABELS: Record<string, string> = {
reaction: 'Réaction',
question: 'Question',
suggestion: 'Suggestion',
retour: 'Retour',
}
function typeLabel(type: string) {
return TYPE_LABELS[type] ?? type
}
function startEdit(msg: any) { function startEdit(msg: any) {
editing.value = msg.id editing.value = msg.id
editForm.author = msg.author editForm.author = msg.author
editForm.text = msg.text editForm.text = msg.text
editForm.type = TYPE_LABELS[msg.type] ? msg.type : 'question'
} }
async function saveEdit(msg: any) { async function saveEdit(msg: any) {
await $fetch(`/api/admin/messages/${msg.id}`, { await $fetch(`/api/admin/messages/${msg.id}`, {
method: 'PUT', method: 'PUT',
body: { author: editForm.author, text: editForm.text }, body: { author: editForm.author, text: editForm.text, type: editForm.type },
}) })
editing.value = null editing.value = null
await refresh() await refresh()
@@ -111,6 +163,29 @@ async function togglePublished(msg: any) {
await refresh() await refresh()
} }
function startReply(msg: any) {
replyEditing.value = msg.id
replyText.value = msg.reply?.text ?? ''
}
async function saveReply(msg: any) {
await $fetch(`/api/admin/messages/${msg.id}`, {
method: 'PUT',
body: { reply: replyText.value.trim() || null },
})
replyEditing.value = null
await refresh()
}
async function removeReply(msg: any) {
await $fetch(`/api/admin/messages/${msg.id}`, {
method: 'PUT',
body: { reply: null },
})
replyEditing.value = null
await refresh()
}
async function remove(msg: any) { async function remove(msg: any) {
if (!confirm(`Supprimer le message de "${msg.author}" ?`)) return if (!confirm(`Supprimer le message de "${msg.author}" ?`)) return
await $fetch(`/api/admin/messages/${msg.id}`, { method: 'DELETE' }) await $fetch(`/api/admin/messages/${msg.id}`, { method: 'DELETE' })
@@ -130,14 +205,14 @@ function formatDate(iso: string) {
<style scoped> <style scoped>
.msg-row { .msg-row {
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
border: 1px solid hsl(20 8% 14%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.75rem; border-radius: 0.75rem;
padding: 1rem 1.25rem; padding: 1rem 1.25rem;
} }
.msg-row--draft { .msg-row--draft {
border-left: 3px solid hsl(36 80% 52%); border-left: 3px solid hsl(var(--color-accent));
} }
.status-badge { .status-badge {
@@ -155,22 +230,61 @@ function formatDate(iso: string) {
} }
.status-badge--draft { .status-badge--draft {
background: hsl(36 80% 52% / 0.15); background: hsl(var(--color-accent) / 0.15);
color: hsl(36 80% 66%); color: hsl(var(--color-accent));
}
.type-badge {
font-size: 0.6rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.1rem 0.45rem;
border-radius: 9999px;
background: hsl(var(--color-primary) / 0.12);
color: hsl(var(--color-primary) / 0.7);
}
.type-badge--question {
background: hsl(220 70% 50% / 0.12);
color: hsl(220 70% 65%);
}
.type-badge--suggestion {
background: hsl(280 60% 55% / 0.12);
color: hsl(280 60% 70%);
}
.type-badge--retour {
background: hsl(35 70% 50% / 0.12);
color: hsl(35 70% 65%);
}
.reply-block {
background: hsl(var(--color-primary) / 0.06);
border-left: 2px solid hsl(var(--color-primary) / 0.3);
border-radius: 0 0.5rem 0.5rem 0;
padding: 0.75rem 1rem;
}
.reply-form {
background: hsl(var(--color-surface) / 0.5);
border-radius: 0.5rem;
padding: 0.75rem;
} }
.admin-input { .admin-input {
padding: 0.375rem 0.5rem; padding: 0.375rem 0.5rem;
border-radius: 0.375rem; border-radius: 0.375rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.8rem; font-size: 0.8rem;
} }
.admin-input:focus { .admin-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
.action-btn { .action-btn {
@@ -180,16 +294,16 @@ function formatDate(iso: string) {
padding: 0.3rem 0.6rem; padding: 0.3rem 0.6rem;
border-radius: 0.375rem; border-radius: 0.375rem;
font-size: 0.75rem; font-size: 0.75rem;
color: hsl(20 8% 60%); color: hsl(var(--color-text-muted));
background: none; background: none;
border: 1px solid hsl(20 8% 16%); border: 1px solid hsl(var(--color-surface-light));
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
} }
.action-btn:hover { .action-btn:hover {
background: hsl(20 8% 10%); background: hsl(var(--color-surface));
color: white; color: hsl(var(--color-text));
} }
.action-btn--save { .action-btn--save {
@@ -201,6 +315,20 @@ function formatDate(iso: string) {
background: hsl(142 70% 40% / 0.1); background: hsl(142 70% 40% / 0.1);
} }
.action-btn--reply {
border-color: hsl(var(--color-primary) / 0.3);
color: hsl(var(--color-primary) / 0.8);
}
.action-btn--reply:hover {
background: hsl(var(--color-primary) / 0.08);
}
.msg-text {
color: hsl(var(--color-text) / 0.72);
white-space: pre-line;
}
.action-btn--danger:hover { .action-btn--danger:hover {
background: hsl(0 70% 40% / 0.1); background: hsl(0 70% 40% / 0.1);
border-color: hsl(0 70% 40% / 0.3); border-color: hsl(0 70% 40% / 0.3);
@@ -2,11 +2,11 @@
<div> <div>
<div class="flex items-center justify-between mb-6"> <div class="flex items-center justify-between mb-6">
<div> <div>
<NuxtLink to="/admin" class="text-sm text-white/40 hover:text-white/60 transition-colors"> <NuxtLink to="/admin/pages" class="text-sm text-white/40 hover:text-white/60 transition-colors">
← Dashboard ← Pages
</NuxtLink> </NuxtLink>
<h1 class="font-display text-2xl font-bold text-white mt-1"> <h1 class="font-display text-2xl font-bold text-white mt-1">
Page : {{ pageName }} Page : {{ pagePath }}
</h1> </h1>
</div> </div>
<AdminSaveButton :saving="saving" :saved="saved" @save="save" /> <AdminSaveButton :saving="saving" :saved="saved" @save="save" />
@@ -40,9 +40,12 @@ definePageMeta({
}) })
const route = useRoute() const route = useRoute()
const pageName = computed(() => route.params.name as string) const pagePath = computed(() => {
const p = route.params.path
return Array.isArray(p) ? p.join('/') : p
})
const { data, error } = await useFetch(() => `/api/content/pages/${pageName.value}`) const { data, error } = await useFetch(() => `/api/content/pages/${pagePath.value}`)
const yamlContent = ref('') const yamlContent = ref('')
@@ -60,7 +63,7 @@ async function save() {
saved.value = false saved.value = false
try { try {
const parsed = yaml.parse(yamlContent.value) const parsed = yaml.parse(yamlContent.value)
await $fetch(`/api/admin/content/pages/${pageName.value}`, { await $fetch(`/api/admin/content/pages/${pagePath.value}`, {
method: 'PUT', method: 'PUT',
body: parsed, body: parsed,
}) })
@@ -80,10 +83,10 @@ async function save() {
.yaml-textarea { .yaml-textarea {
width: 100%; width: 100%;
padding: 1rem; padding: 1rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
border-radius: 0.5rem; border-radius: 0.5rem;
background: hsl(20 8% 4%); background: hsl(var(--color-bg));
color: hsl(36 80% 76%); color: hsl(var(--color-accent));
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
font-size: 0.85rem; font-size: 0.85rem;
line-height: 1.7; line-height: 1.7;
@@ -93,6 +96,6 @@ async function save() {
.yaml-textarea:focus { .yaml-textarea:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
</style> </style>
+97
View File
@@ -0,0 +1,97 @@
<template>
<div>
<div class="flex items-center justify-between mb-6">
<div>
<NuxtLink to="/admin" class="text-sm text-white/40 hover:text-white/60 transition-colors">
← Dashboard
</NuxtLink>
<h1 class="font-display text-2xl font-bold text-white mt-1">Pages</h1>
</div>
</div>
<div v-if="pages" class="flex flex-col gap-6">
<!-- Root pages -->
<div v-if="rootPages.length">
<h2 class="font-display text-lg font-semibold text-white/80 mb-3">Pages principales</h2>
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
<NuxtLink
v-for="page in rootPages"
:key="page.path"
:to="`/admin/pages/${page.path}`"
class="page-card"
>
<div class="i-lucide-file-text h-5 w-5 text-primary mb-1" />
<span class="font-mono text-sm text-white">{{ page.label }}</span>
</NuxtLink>
</div>
</div>
<!-- Section pages -->
<div v-for="[section, sectionPages] in sections" :key="section">
<h2 class="font-display text-lg font-semibold text-white/80 mb-3">
<span class="i-lucide-folder h-4 w-4 inline-block mr-1 text-accent" />
{{ section }}
</h2>
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
<NuxtLink
v-for="page in sectionPages"
:key="page.path"
:to="`/admin/pages/${page.path}`"
class="page-card"
>
<div class="i-lucide-file-text h-5 w-5 text-primary/60 mb-1" />
<span class="font-mono text-sm text-white">{{ page.label }}</span>
</NuxtLink>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'admin',
middleware: 'admin',
})
interface PageEntry {
path: string
label: string
section?: string
}
const { data: pages } = await useFetch<PageEntry[]>('/api/admin/content/pages')
const rootPages = computed(() =>
(pages.value ?? []).filter(p => !p.section),
)
const sections = computed(() => {
const map = new Map<string, PageEntry[]>()
for (const p of pages.value ?? []) {
if (p.section) {
if (!map.has(p.section)) map.set(p.section, [])
map.get(p.section)!.push(p)
}
}
return Array.from(map.entries())
})
</script>
<style scoped>
.page-card {
display: flex;
flex-direction: column;
padding: 1rem;
border-radius: 0.5rem;
border: 1px solid hsl(var(--color-surface-light));
background: hsl(var(--color-bg));
text-decoration: none;
transition: all 0.2s;
}
.page-card:hover {
border-color: hsl(var(--color-primary) / 0.3);
background: hsl(var(--color-surface));
}
</style>
+5 -5
View File
@@ -65,7 +65,7 @@
</AdminFieldList> </AdminFieldList>
</AdminFormSection> </AdminFormSection>
<AdminFormSection title="GrateWizard"> <AdminFormSection title="grateWizard">
<AdminFieldText v-model="data.gratewizard.url" label="URL de l'application" /> <AdminFieldText v-model="data.gratewizard.url" label="URL de l'application" />
</AdminFormSection> </AdminFormSection>
</template> </template>
@@ -103,14 +103,14 @@ async function save() {
.admin-input { .admin-input {
padding: 0.375rem 0.5rem; padding: 0.375rem 0.5rem;
border-radius: 0.375rem; border-radius: 0.375rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.8rem; font-size: 0.8rem;
} }
.admin-input:focus { .admin-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
} }
</style> </style>
+175 -12
View File
@@ -6,14 +6,22 @@
</div> </div>
<template v-if="config"> <template v-if="config">
<AdminFormSection title="Métadonnées des chansons" open> <AdminFormSection title="Morceaux" open>
<div <div
v-for="(song, i) in config.songs" v-for="(song, i) in config.songs"
:key="i" :key="song.id"
class="song-row" class="song-row"
draggable="true"
@dragstart="onDragStart(i, $event)"
@dragover.prevent="onDragOver(i)"
@dragend="onDragEnd"
:class="{ 'song-row--dragging': dragIdx === i, 'song-row--over': dropIdx === i && dropIdx !== dragIdx }"
> >
<div class="drag-handle" aria-label="Réordonner">
<div class="i-lucide-grip-vertical h-4 w-4" />
</div>
<span class="song-num">{{ i + 1 }}</span> <span class="song-num">{{ i + 1 }}</span>
<div class="flex-1 grid gap-2 sm:grid-cols-2"> <div class="flex-1 grid gap-2 sm:grid-cols-3">
<input <input
v-model="song.title" v-model="song.title"
class="admin-input" class="admin-input"
@@ -24,8 +32,33 @@
class="admin-input" class="admin-input"
placeholder="/audio/fichier.mp3" placeholder="/audio/fichier.mp3"
/> />
<input
v-model="song.id"
class="admin-input font-mono text-xs"
placeholder="identifiant-slug"
/>
</div> </div>
<div class="flex-1">
<textarea
v-model="song.lyrics"
class="admin-input lyrics-textarea"
placeholder="Paroles..."
rows="2"
/>
</div>
<button
class="delete-btn"
@click="removeSong(i)"
aria-label="Supprimer"
>
<div class="i-lucide-trash-2 h-4 w-4" />
</button>
</div> </div>
<button class="add-btn" @click="addSong">
<div class="i-lucide-plus h-4 w-4" />
Ajouter un morceau
</button>
</AdminFormSection> </AdminFormSection>
</template> </template>
</div> </div>
@@ -37,14 +70,80 @@ definePageMeta({
middleware: 'admin', middleware: 'admin',
}) })
const { data: config } = await useFetch('/api/content/config') const { data: config } = await useFetch<any>('/api/content/config')
const saving = ref(false) const saving = ref(false)
const saved = ref(false) const saved = ref(false)
// Drag & drop state
const dragIdx = ref<number | null>(null)
const dropIdx = ref<number | null>(null)
function onDragStart(i: number, e: DragEvent) {
dragIdx.value = i
if (e.dataTransfer) {
e.dataTransfer.effectAllowed = 'move'
}
}
function onDragOver(i: number) {
dropIdx.value = i
}
function onDragEnd() {
if (dragIdx.value !== null && dropIdx.value !== null && dragIdx.value !== dropIdx.value && config.value) {
const songs = config.value.songs
const [moved] = songs.splice(dragIdx.value, 1)
songs.splice(dropIdx.value, 0, moved)
// Sync defaultPlaylistOrder
config.value.defaultPlaylistOrder = songs.map((s: any) => s.id)
}
dragIdx.value = null
dropIdx.value = null
}
function addSong() {
if (!config.value) return
const newSong = {
id: `nouveau-morceau-${Date.now()}`,
title: '',
artist: 'Yvv',
file: '/audio/',
duration: 0,
lyrics: '',
tags: [],
}
config.value.songs.push(newSong)
config.value.defaultPlaylistOrder.push(newSong.id)
}
function removeSong(i: number) {
if (!config.value) return
const songId = config.value.songs[i].id
config.value.songs.splice(i, 1)
// Remove from defaultPlaylistOrder
const orderIdx = config.value.defaultPlaylistOrder.indexOf(songId)
if (orderIdx !== -1) config.value.defaultPlaylistOrder.splice(orderIdx, 1)
// Clean chapterSongs
config.value.chapterSongs = config.value.chapterSongs.filter((cs: any) => cs.songId !== songId)
}
async function save() { async function save() {
saving.value = true saving.value = true
saved.value = false saved.value = false
try { try {
// Regenerate IDs from titles for new songs
for (const song of config.value!.songs) {
if (song.id.startsWith('nouveau-morceau-')) {
song.id = song.title
.toLowerCase()
.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-|-$/g, '')
}
}
// Sync playlist order
config.value!.defaultPlaylistOrder = config.value!.songs.map((s: any) => s.id)
await $fetch('/api/admin/content/config', { await $fetch('/api/admin/content/config', {
method: 'PUT', method: 'PUT',
body: config.value, body: config.value,
@@ -61,32 +160,96 @@ async function save() {
<style scoped> <style scoped>
.song-row { .song-row {
display: flex; display: flex;
align-items: center; align-items: flex-start;
gap: 0.75rem; gap: 0.75rem;
padding: 0.5rem; padding: 0.75rem 0.5rem;
border-bottom: 1px solid hsl(20 8% 10%); border-bottom: 1px solid hsl(var(--color-surface));
transition: background 0.15s;
}
.song-row--dragging {
opacity: 0.4;
}
.song-row--over {
border-top: 2px solid hsl(var(--color-primary));
}
.drag-handle {
cursor: grab;
padding: 0.25rem;
color: hsl(var(--color-text-muted));
flex-shrink: 0;
margin-top: 0.25rem;
}
.drag-handle:active {
cursor: grabbing;
} }
.song-num { .song-num {
font-family: var(--font-mono, monospace); font-family: var(--font-mono, monospace);
font-size: 0.8rem; font-size: 0.8rem;
color: hsl(20 8% 40%); color: hsl(var(--color-text-muted));
width: 1.25rem; width: 1.25rem;
text-align: right; text-align: right;
flex-shrink: 0;
margin-top: 0.375rem;
} }
.admin-input { .admin-input {
padding: 0.375rem 0.5rem; padding: 0.375rem 0.5rem;
border-radius: 0.375rem; border-radius: 0.375rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-surface-light));
background: hsl(20 8% 6%); background: hsl(var(--color-bg));
color: white; color: hsl(var(--color-text));
font-size: 0.8rem; font-size: 0.8rem;
width: 100%; width: 100%;
} }
.admin-input:focus { .admin-input:focus {
outline: none; outline: none;
border-color: hsl(12 76% 48% / 0.5); border-color: hsl(var(--color-primary) / 0.5);
}
.lyrics-textarea {
resize: vertical;
min-height: 2.5rem;
}
.delete-btn {
flex-shrink: 0;
padding: 0.375rem;
border-radius: 0.375rem;
color: hsl(0 60% 50%);
background: none;
border: none;
cursor: pointer;
transition: background 0.15s;
margin-top: 0.25rem;
}
.delete-btn:hover {
background: hsl(0 60% 50% / 0.1);
}
.add-btn {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 1rem;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: 1px dashed hsl(var(--color-surface-light));
background: none;
color: hsl(var(--color-text-muted));
font-size: 0.85rem;
cursor: pointer;
transition: all 0.15s;
}
.add-btn:hover {
border-color: hsl(var(--color-primary) / 0.5);
color: hsl(var(--color-primary));
} }
</style> </style>
+400
View File
@@ -0,0 +1,400 @@
<template>
<div class="axis-scope axis-scope--cit section-padding">
<div class="container-content">
<!-- Header -->
<div class="mx-auto max-w-2xl text-center mb-8">
<div class="section-icon mx-auto mb-6">
<div :class="`i-lucide-${content?.icon ?? 'landmark'}`" class="h-12 w-12" />
</div>
<p class="mb-2 font-mono text-sm tracking-widest text-primary uppercase text-center">
{{ content?.kicker }}
</p>
<h1 class="font-display text-3xl font-bold mb-4" style="color: hsl(var(--color-text))">
{{ content?.title ?? slug }}
</h1>
<p class="text-lg leading-relaxed" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
</div>
<!-- Navigation prev / index / next -->
<nav class="ctx-nav mx-auto max-w-2xl mb-10">
<NuxtLink v-if="prevItem?.to" :to="prevItem.to" class="ctx-nav-btn ctx-nav-prev">
<div class="i-lucide-arrow-left h-4 w-4 shrink-0" />
<span>{{ prevItem.label }}</span>
</NuxtLink>
<div v-else class="ctx-nav-spacer" />
<NuxtLink to="/citoyenne" class="ctx-nav-btn ctx-nav-index">
<div class="i-lucide-layout-grid h-4 w-4" />
<span>Citoyenne</span>
</NuxtLink>
<NuxtLink v-if="nextItem?.to" :to="nextItem.to" class="ctx-nav-btn ctx-nav-next">
<span>{{ nextItem.label }}</span>
<div class="i-lucide-arrow-right h-4 w-4 shrink-0" />
</NuxtLink>
<div v-else class="ctx-nav-spacer" />
</nav>
<!-- Zone sections — relative pour ancrer le sidebar -->
<div class="sections-area">
<!-- Sidebar sommaire -->
<aside v-if="sommaire.length > 1" class="page-sidebar">
<nav class="sommaire-sidebar">
<p class="sommaire-sidebar-title">Sur cette page</p>
<ol class="sommaire-sidebar-list">
<li v-for="(entry, ei) in sommaire" :key="ei">
<a :href="`#${entry.id}`" class="sommaire-sidebar-link">
<span class="sommaire-n">{{ ei + 1 }}</span>
<span>{{ entry.title }}</span>
</a>
</li>
</ol>
</nav>
</aside>
<!-- Features grid -->
<div
v-if="content?.features"
id="section-features"
class="relative grid gap-4 sm:grid-cols-2 mb-12 max-w-2xl mx-auto section-anchor"
>
<UiOiseauPose v-for="o in oiseaux.fonctions ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<div v-for="feature in content.features" :key="feature.title" class="feature-card">
<div class="feature-icon">
<div :class="`i-lucide-${feature.icon} h-5 w-5`" />
</div>
<h3 class="font-display font-semibold mb-1" style="color: hsl(var(--color-text))">{{ feature.title }}</h3>
<p class="text-sm leading-relaxed" style="color: hsl(var(--color-text-muted))">{{ feature.text }}</p>
</div>
</div>
<!-- Project card -->
<div
v-if="content?.project"
id="section-project"
class="project-card mb-8 max-w-2xl mx-auto section-anchor"
>
<UiOiseauPose v-for="o in oiseaux.projet ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<div class="project-icon">
<div class="i-lucide-rocket h-5 w-5" />
</div>
<h2 class="font-display text-xl font-semibold mb-2" style="color: hsl(var(--color-text))">
{{ content.project.name }}
</h2>
<p style="color: hsl(var(--color-text-muted))" class="leading-relaxed">
{{ content.project.text }}
</p>
<UiStatusBadge class="mt-3" :status="content?.status" :gestation="content?.gestation" />
</div>
<!-- Extended content -->
<div
v-if="content?.content"
id="section-content"
class="prose-block relative mb-10 max-w-2xl mx-auto section-anchor"
>
<UiOiseauPose v-for="o in oiseaux.texte ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<p class="leading-relaxed whitespace-pre-line" style="color: hsl(var(--color-text-muted))">
{{ content.content }}
</p>
</div>
<!-- Actions -->
<div class="text-center flex flex-col items-center gap-3 sm:flex-row sm:justify-center mb-4">
<UiBaseButton v-if="slug === 'decision'" :href="decisionUrl" target="_blank">
<div class="i-lucide-external-link mr-2 h-4 w-4" />
Ouvrir libreDecision
</UiBaseButton>
<UiBaseButton v-if="slug === 'tarifs-eau'" :href="sejeteral0Url" target="_blank">
<div class="i-lucide-external-link mr-2 h-4 w-4" />
Lancer SejeteralO
</UiBaseButton>
</div>
</div><!-- /sections-area -->
</div>
</div>
</template>
<script setup lang="ts">
import type { OiseauPlace } from '~/utils/oiseauPose'
const route = useRoute()
const slug = route.params.slug as string
// Birds of each page: by the features grid, the project card and the text block
interface OiseauxPage { fonctions?: OiseauPlace[], projet?: OiseauPlace[], texte?: OiseauPlace[] }
const OISEAUX_PAGE: Record<string, OiseauxPage> = {
'decision': {
fonctions: [
{ nom: 'mime', pose: 'marge-g', ecart: '48px', w: 104 },
// on the line under the first row of cards (16 px gap between the rows)
{ nom: 'avocate', pose: 'marge-d', ecart: '44px', bottom: 'calc(50% + 8px)', w: 96, retourne: true },
// above the grid's left corner the page is empty (the links row starts at its middle)
{ nom: 'tisserand', pose: 'perche', left: '24px', w: 84 },
],
},
'tarifs-eau': {
// the summary stands right of the project card: the actor stands on the card, where the
// links row above leaves the page empty
projet: [{ nom: 'comedien', pose: 'perche', right: '24px', w: 100, retourne: true }],
texte: [{ nom: 'potier', pose: 'marge-g', ecart: '52px', w: 112 }],
},
}
const oiseaux = computed<OiseauxPage>(() => OISEAUX_PAGE[slug] ?? {})
const [{ data: content }, { data: homeData }] = await Promise.all([
usePageContent(`citoyenne/${slug}`),
usePageContent('home'),
])
const appConfig = useAppConfig()
const decisionUrl = (appConfig.libredecision as { url: string })?.url ?? '#'
const sejeteral0Url = (appConfig.sejeteral0 as { url: string })?.url ?? '#'
// Sommaire
const sommaire = computed(() => {
const entries: { title: string; id: string }[] = []
if ((content.value?.features as unknown[])?.length) entries.push({ title: 'Fonctionnalités', id: 'section-features' })
if (content.value?.project) entries.push({ title: (content.value.project as { name: string }).name, id: 'section-project' })
if (content.value?.content) entries.push({ title: 'En savoir plus', id: 'section-content' })
return entries
})
// Prev / next dans la section citoyenne
interface AxisItem { label: string; to?: string; icon?: string }
const politiqueItems = computed<AxisItem[]>(
() => (homeData.value as Record<string, unknown> | null)?.axes?.politique?.items as AxisItem[] ?? [],
)
const currentPath = `/citoyenne/${slug}`
const currentIdx = computed(() => politiqueItems.value.findIndex(i => i.to === currentPath))
const prevItem = computed(() => currentIdx.value > 0 ? politiqueItems.value[currentIdx.value - 1] : null)
const nextItem = computed(() => currentIdx.value < politiqueItems.value.length - 1 ? politiqueItems.value[currentIdx.value + 1] : null)
useSeoPage({
title: content.value?.meta?.title ?? slug,
description: content.value?.description as string ?? undefined,
})
</script>
<style scoped>
.section-icon {
display: flex;
align-items: center;
justify-content: center;
width: 5rem;
height: 5rem;
border-radius: 1rem;
background: hsl(var(--color-primary) / 0.1);
border: 1px solid hsl(var(--color-primary) / 0.2);
color: hsl(var(--color-primary));
}
.feature-card {
padding: 1.25rem;
border-radius: 0.75rem;
border: 1px solid hsl(var(--color-text) / 0.08);
background: hsl(var(--color-surface));
}
.feature-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
margin-bottom: 0.75rem;
}
.project-card {
position: relative;
padding: 1.5rem;
border-radius: 0.75rem;
border: 1px solid hsl(var(--color-primary) / 0.15);
background: hsl(var(--color-surface));
}
.project-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
margin-bottom: 1rem;
}
.gestation-badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
background: hsl(var(--color-accent) / 0.12);
color: hsl(var(--color-accent));
font-size: 0.7rem;
font-weight: 500;
font-family: var(--font-mono);
}
.prose-block {
padding: 1.5rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
}
.section-anchor {
scroll-margin-top: 5.5rem;
}
/* ── Navigation prev/next ── */
.ctx-nav {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 0.5rem;
align-items: center;
}
.ctx-nav-spacer { min-width: 0; }
.ctx-nav-btn {
display: flex;
align-items: center;
gap: 0.45rem;
padding: 0.5rem 0.875rem;
border-radius: 20px;
text-decoration: none;
font-size: 0.8rem;
font-weight: 500;
color: hsl(var(--color-text-muted));
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.08);
transition: all 0.15s;
min-width: 0;
}
.ctx-nav-btn:hover {
color: hsl(var(--color-primary));
border-color: hsl(var(--color-primary) / 0.25);
background: hsl(var(--color-primary) / 0.05);
}
.ctx-nav-prev { justify-content: flex-start; }
.ctx-nav-next { justify-content: flex-end; }
.ctx-nav-prev span,
.ctx-nav-next span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ctx-nav-index {
justify-content: center;
background: hsl(var(--color-primary) / 0.08);
border-color: hsl(var(--color-primary) / 0.15);
color: hsl(var(--color-primary));
font-size: 0.75rem;
padding: 0.45rem 0.75rem;
white-space: nowrap;
flex-shrink: 0;
}
.ctx-nav-index:hover { background: hsl(var(--color-primary) / 0.15); }
@media (max-width: 480px) {
.ctx-nav { grid-template-columns: auto 1fr auto; }
.ctx-nav-prev span, .ctx-nav-next span { display: none; }
.ctx-nav-prev, .ctx-nav-next { padding: 0.5rem; }
}
/* ── Zone sections ── */
.sections-area {
position: relative;
}
/* ── Sidebar sommaire ── */
.page-sidebar {
display: none;
position: absolute;
top: 0;
right: 0;
width: 10.5rem;
height: 100%;
}
@media (min-width: 1300px) {
.page-sidebar { display: block; }
}
.sommaire-sidebar {
position: sticky;
top: 5.5rem;
padding: 0.875rem;
border-radius: 14px;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.07);
}
.sommaire-sidebar-title {
font-family: var(--font-mono);
font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: hsl(var(--color-text-muted));
margin: 0 0 0.6rem;
}
.sommaire-sidebar-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.sommaire-sidebar-link {
display: flex;
align-items: baseline;
gap: 0.45rem;
padding: 0.28rem 0.4rem;
border-radius: 8px;
text-decoration: none;
font-size: 0.75rem;
color: hsl(var(--color-text-muted));
line-height: 1.4;
transition: color 0.12s, background 0.12s;
}
.sommaire-sidebar-link:hover {
color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.06);
}
.sommaire-n {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.2rem;
height: 1.2rem;
border-radius: 50%;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
font-family: var(--font-mono);
font-size: 0.6rem;
font-weight: 700;
flex-shrink: 0;
}
</style>
+205
View File
@@ -0,0 +1,205 @@
<template>
<div class="axis-scope axis-scope--cit oiseaux-scene relative overflow-hidden section-padding">
<div class="container-content">
<header class="mb-12 text-center">
<p class="relative mb-2 font-mono text-sm tracking-widest text-primary uppercase">
<!-- Phone: the title fills the width; the bird stands at the end of this line, on its baseline -->
{{ content?.kicker }}<UiOiseauPose nom="vigie" pose="perche" bout :w="72" retourne mobile-seul />
</p>
<h1 class="page-title relative font-display font-bold tracking-tight" style="color: hsl(var(--color-text))">
<!-- At the end of the title, on its baseline (rule e, docs/da-oiseaux.md) -->
{{ content?.title }}<UiOiseauPose nom="vigie" pose="perche" bout left="16px" :w="96" retourne :seuil="1200" />
</h1>
<p class="mt-4 mx-auto max-w-2xl leading-relaxed" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
</header>
<div class="mx-auto max-w-3xl flex flex-col gap-6">
<!-- Decision collective — the card clips its corners, the birds stand on a wrapper -->
<div class="relative">
<UiOiseauPose nom="juge" pose="marge-d" ecart="40px" :w="84" retourne />
<div class="item-card">
<NuxtLink to="/citoyenne/decision" class="item-overlay" aria-label="Décision collective" tabindex="-1" />
<div class="item-body group">
<div class="item-header">
<div class="item-icon">
<div class="i-lucide-gavel h-5 w-5" />
</div>
<h2 class="font-display text-xl font-bold" style="color: hsl(var(--color-text))">
Décision collective
</h2>
<UiStatusBadge class="ml-auto" v-bind="statusOf('decision')" />
</div>
<p class="leading-relaxed mt-3" style="color: hsl(var(--color-text-muted))">
Se donner les moyens de la décision collective.
</p>
</div>
<div class="item-actions">
<a :href="decisionUrl" target="_blank" rel="noopener" class="action-btn action-btn--primary">
<div class="i-lucide-external-link h-3.5 w-3.5" />
Ouvrir libreDecision
</a>
</div>
</div>
</div>
<!-- Tarifs de l'eau -->
<div class="relative">
<!-- 24 px between the two cards: no room above them for a perched bird (DA rule of 03/11) -->
<!-- Out by the side of the card, not by its corners: the card is a link (rule h); its feet
46 px above the card's bottom, where the captain stands on the other side (rule c) -->
<UiOiseauPose nom="cartographe" pose="derriere" left="calc(100% - 100px)" bottom="46px" :w="210" />
<UiOiseauPose nom="capitaine" pose="marge-g" ecart="46px" :w="136" />
<div class="item-card">
<NuxtLink to="/citoyenne/tarifs-eau" class="item-overlay" aria-label="Tarifs de l'eau" tabindex="-1" />
<div class="item-body group">
<div class="item-header">
<div class="item-icon">
<div class="i-lucide-droplets h-5 w-5" />
</div>
<h2 class="font-display text-xl font-bold" style="color: hsl(var(--color-text))">
Tarifs de l'eau
</h2>
<UiStatusBadge class="ml-auto" v-bind="statusOf('tarifs-eau')" />
</div>
<p class="leading-relaxed mt-3" style="color: hsl(var(--color-text-muted))">
Application pour obtenir justice sociale et incitation dynamique à la réduction.
Permet de confier la décision à la population des communes.
</p>
</div>
<div class="item-actions">
<a :href="sejeteral0Url" target="_blank" rel="noopener" class="action-btn action-btn--primary">
<div class="i-lucide-external-link h-3.5 w-3.5" />
Lancer SejeteralO
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('citoyenne')
const statusOf = (id: string) => {
const item = ((content.value as any)?.items ?? []).find((i: any) => i.id === id) ?? {}
return { status: item.status, since: item.since, gestation: item.gestation }
}
const appConfig = useAppConfig()
const decisionUrl = (appConfig.libredecision as { url: string })?.url ?? '#'
const sejeteral0Url = (appConfig.sejeteral0 as { url: string })?.url ?? '#'
useSeoPage({
title: content.value?.meta?.title ?? 'Autonomie citoyenne',
description: (content.value as Record<string, unknown> | null)?.description as string ?? 'Décision collective, gouvernance locale, outils citoyens — l\'autonomie politique à l\'échelle des bassins de vie.',
})
</script>
<style scoped>
.page-title {
font-size: clamp(2rem, 5vw, 2.75rem);
}
.item-card {
border-radius: 16px;
border: none;
background: hsl(var(--color-surface));
transition: border-color 0.2s;
overflow: hidden;
position: relative;
cursor: pointer;
}
.item-card:hover {
border-color: hsl(var(--color-primary) / 0.2);
}
/* Lien overlay — couvre toute la carte, AU-DESSUS du contenu */
.item-overlay {
position: absolute;
inset: 0;
z-index: 1;
}
.item-body {
display: block;
padding: 1.5rem;
color: inherit;
}
.item-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
}
.item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.15);
color: hsl(var(--color-primary));
box-shadow: 0 0 12px hsl(var(--color-primary) / 0.12);
flex-shrink: 0;
}
.gestation-badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
margin-left: auto;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
background: hsl(var(--color-accent) / 0.12);
color: hsl(var(--color-accent));
font-size: 0.7rem;
font-weight: 500;
font-family: var(--font-mono);
}
.item-actions {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
padding: 0.75rem 1.5rem;
border-top: 1px solid hsl(var(--color-text) / 0.06);
background: hsl(var(--color-bg) / 0.4);
position: relative;
z-index: 2;
}
.action-btn {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.375rem 0.75rem;
border-radius: 0.5rem;
font-size: 0.8rem;
font-weight: 500;
text-decoration: none;
transition: all 0.2s;
cursor: pointer;
}
.action-btn--primary {
color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.12);
border: 1px solid hsl(var(--color-primary) / 0.25);
}
.action-btn--primary:hover {
background: hsl(var(--color-primary) / 0.2);
border-color: hsl(var(--color-primary) / 0.4);
}
</style>
+145
View File
@@ -0,0 +1,145 @@
<template>
<div class="oiseaux-scene relative overflow-hidden section-padding">
<div class="container-content">
<div class="mx-auto max-w-2xl">
<div class="section-icon relative mx-auto mb-6">
<!-- The reader stands on the bag: a real edge, with the page's top margin above -->
<UiOiseauPose nom="lectrice" pose="perche" left="14px" :w="84" retourne :seuil="1024" />
<div class="i-lucide-shopping-bag h-12 w-12" />
</div>
<p class="relative mb-2 font-mono text-sm tracking-widest text-primary uppercase text-center">
<!-- Phone: the title fills the width; the bird stands at the end of this line, on its baseline -->
{{ content?.kicker }}<UiOiseauPose nom="lectrice" pose="perche" bout :w="84" retourne mobile-seul />
</p>
<h1 class="relative font-display text-3xl font-bold mb-4 text-center" style="color: hsl(var(--color-text))">
{{ content?.title }}
</h1>
<p class="text-lg leading-relaxed mb-10 text-center" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
<!-- Bookelis CTA -->
<div class="cta-block mb-8">
<UiOiseauPose nom="cycliste-livreur" pose="marge-g" ecart="54px" :w="150" />
<div class="cta-icon">
<div class="i-lucide-globe h-5 w-5" />
</div>
<div class="flex-1">
<h2 class="font-display text-lg font-semibold mb-1" style="color: hsl(var(--color-text))">
Commander en ligne
</h2>
<p class="text-sm mb-3" style="color: hsl(var(--color-text-muted))">
Impression à la demande, livraison chez vous.
</p>
<a
:href="content?.bookelis?.url"
target="_blank"
rel="noopener"
class="order-btn"
>
<div class="i-lucide-external-link h-4 w-4" />
{{ content?.bookelis?.label }}
</a>
</div>
</div>
<!-- Librairie -->
<div class="cta-block mb-10">
<UiOiseauPose nom="libraire" pose="derriere" left="calc(100% - 96px)" bottom="-36px" :w="214" retourne />
<div class="cta-icon cta-icon--accent">
<div class="i-lucide-store h-5 w-5" />
</div>
<div class="flex-1">
<h2 class="font-display text-lg font-semibold mb-2" style="color: hsl(var(--color-text))">
{{ content?.librairie?.title }}
</h2>
<p class="leading-relaxed whitespace-pre-line" style="color: hsl(var(--color-text-muted))">
{{ content?.librairie?.text }}
</p>
</div>
</div>
<div class="text-center">
<UiBaseButton variant="ghost" to="/economique">
<div class="i-lucide-arrow-left mr-2 h-4 w-4" />
Autonomie économique
</UiBaseButton>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
const { data: content } = await usePageContent('economique/commande')
useSeoPage({
title: content.value?.meta?.title ?? 'Commander le livre — Une économie du don',
description: 'Commander l\'édition papier du livre « Une économie du don — enfin concevable » d\'Yvv.',
image: '/images/Couv-Economie-du-don.jpg',
})
</script>
<style scoped>
.section-icon {
display: flex;
align-items: center;
justify-content: center;
width: 5rem;
height: 5rem;
border-radius: 1rem;
background: hsl(var(--color-primary) / 0.1);
border: 1px solid hsl(var(--color-primary) / 0.2);
color: hsl(var(--color-primary));
}
.cta-block {
position: relative;
display: flex;
gap: 1rem;
padding: 1.5rem;
border-radius: 0.75rem;
border: 1px solid hsl(var(--color-text) / 0.08);
background: hsl(var(--color-surface));
}
.cta-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.12);
color: hsl(var(--color-primary));
flex-shrink: 0;
margin-top: 0.125rem;
}
.cta-icon--accent {
background: hsl(var(--color-accent) / 0.12);
color: hsl(var(--color-accent));
}
.order-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
text-decoration: none;
background: hsl(var(--color-primary));
color: white;
transition: all 0.2s;
}
.order-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px hsl(var(--color-primary) / 0.3);
}
</style>
+212
View File
@@ -0,0 +1,212 @@
<template>
<div class="axis-scope axis-scope--eco oiseaux-scene relative overflow-hidden section-padding">
<div class="container-content">
<!-- Header -->
<header class="mb-12 text-center">
<p class="relative mb-2 font-mono text-sm tracking-widest text-primary uppercase">
<!-- Phone: the title fills the width; the bird stands at the end of this line, on its baseline -->
{{ content?.kicker }}<UiOiseauPose nom="pompeur-de-g1" pose="perche" bout :w="72" retourne mobile-seul />
</p>
<h1 class="page-title font-display font-bold tracking-tight" style="color: hsl(var(--color-text))">
{{ content?.title }}
</h1>
<p class="mt-4 mx-auto max-w-2xl leading-relaxed" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
</header>
<div class="mx-auto max-w-3xl flex flex-col gap-8">
<!-- Monnaie libre — the card clips its Ğ1 watermark, so the bird stands on a wrapper -->
<div class="relative">
<UiOiseauPose nom="pompeur-de-g1" pose="marge-d" ecart="34px" :w="126" retourne />
<NuxtLink to="/economique/monnaie-libre" class="item-card g1-card group">
<span class="g1-watermark" aria-hidden="true">Ğ1</span>
<div class="item-header">
<div class="item-icon">
<span class="g1-icon">Ğ1</span>
</div>
<h2 class="font-display text-xl font-bold" style="color: hsl(var(--color-text))">
Monnaie libre
</h2>
<UiStatusBadge class="ml-auto" v-bind="statusOf('monnaie-libre')" />
</div>
<p class="leading-relaxed mt-3" style="color: hsl(var(--color-text-muted))">
La Ğ1 (June) : une monnaie co-créée par ses membres, sans dette ni intérêt. Le dividende universel comme base.
</p>
<div class="mt-3 inline-flex items-center gap-1 text-sm text-primary group-hover:text-primary/80 transition-colors">
En savoir plus
<div class="i-lucide-arrow-right h-3.5 w-3.5" />
</div>
</NuxtLink>
</div>
<!-- Modèle économique — bloc livre -->
<div class="book-block">
<!-- The balance (the measure of the gift) peeks out from behind the book, on the left and
halfway up: the market gardener stands low on the right, never at its height, and the
four birds of the page do not alternate at an even step -->
<UiOiseauPose nom="la-balance" pose="derriere" left="-150px" bottom="calc(100% - 240px)" :w="240" />
<!-- Not by the Productions card: with the beekeeper, a pair at the same height -->
<UiOiseauPose nom="maraichere" pose="marge-d" ecart="46px" :w="108" retourne />
<HomeBookSection
compact
@open-player="showBookPlayer = true"
@open-pdf="showPdfReader = true"
/>
</div>
<!-- Productions collectives -->
<NuxtLink to="/economique/productions-collectives" class="item-card group">
<UiOiseauPose nom="apicultrice" pose="marge-g" ecart="52px" :w="124" />
<div class="item-header">
<div class="item-icon">
<div class="i-lucide-users h-5 w-5" />
</div>
<h2 class="font-display text-xl font-bold" style="color: hsl(var(--color-text))">
Productions collectives
</h2>
<UiStatusBadge class="ml-auto" v-bind="statusOf('productions-collectives')" />
</div>
<p class="leading-relaxed mt-3" style="color: hsl(var(--color-text-muted))">
Une plateforme pour faciliter la création d'équipes et la réalisation de productions à l'échelle des bassins de vie. Passer la seconde.
</p>
<div class="mt-3 inline-flex items-center gap-1 text-sm text-primary group-hover:text-primary/80 transition-colors">
En savoir plus
<div class="i-lucide-arrow-right h-3.5 w-3.5" />
</div>
</NuxtLink>
</div>
</div>
<BookPlayer v-model="showBookPlayer" />
<BookPdfReader v-model="showPdfReader" />
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('economique')
const statusOf = (id: string) => {
const item = ((content.value as any)?.items ?? []).find((i: any) => i.id === id) ?? {}
return { status: item.status, since: item.since, gestation: item.gestation }
}
useSeoPage({
title: content.value?.meta?.title ?? 'Autonomie économique',
description: (content.value as Record<string, unknown> | null)?.description as string ?? 'Comprendre et expérimenter une économie fondée sur le don, la monnaie libre et la réciprocité.',
})
const showBookPlayer = ref(false)
const showPdfReader = ref(false)
</script>
<style scoped>
.page-title {
font-size: clamp(2rem, 5vw, 2.75rem);
}
.item-card {
position: relative;
display: block;
padding: 1.5rem;
border-radius: 16px;
border: none;
background: hsl(var(--color-surface));
transition: border-color 0.2s, transform 0.12s ease;
text-decoration: none;
}
.item-card:hover {
border-color: hsl(var(--color-primary) / 0.2);
transform: translateY(-3px);
box-shadow: 0 8px 24px hsl(var(--color-primary) / 0.08);
}
.item-header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
}
.g1-icon {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.1rem;
line-height: 1;
}
.item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.15);
color: hsl(var(--color-primary));
box-shadow: 0 0 12px hsl(var(--color-primary) / 0.12);
flex-shrink: 0;
}
.gestation-badge {
display: inline-flex;
align-items: center;
gap: 0.25rem;
margin-left: auto;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
background: hsl(var(--color-accent) / 0.12);
color: hsl(var(--color-accent));
font-size: 0.7rem;
font-weight: 500;
font-family: var(--font-mono);
}
.book-block {
position: relative;
padding: 1.25rem;
border-radius: 16px;
border: none;
background: hsl(var(--color-surface));
}
/* Monnaie libre card */
.g1-card {
position: relative;
overflow: hidden;
background: linear-gradient(
135deg,
hsl(var(--color-surface)) 60%,
hsl(var(--color-primary) / 0.06) 100%
);
border-color: hsl(var(--color-primary) / 0.14);
}
.g1-card:hover {
border-color: hsl(var(--color-primary) / 0.3);
}
.g1-watermark {
position: absolute;
right: -0.25rem;
top: 50%;
transform: translateY(-50%);
font-family: var(--font-display);
font-weight: 900;
font-size: 5.5rem;
line-height: 1;
color: hsl(var(--color-primary) / 0.07);
pointer-events: none;
user-select: none;
letter-spacing: -0.02em;
transition: color 0.2s;
}
.g1-card:hover .g1-watermark {
color: hsl(var(--color-primary) / 0.11);
}
</style>
@@ -1,5 +1,9 @@
<template> <template>
<div v-if="chapter"> <div v-if="chapter" class="relative">
<!-- The book's trades in the margins: the two who write keep their way, on the left -->
<UiOiseauPose nom="calligraphe" pose="libre" right="calc(100% + 40px)" top="40px" :w="112" />
<UiOiseauPose nom="typographe" pose="libre" right="calc(100% + 64px)" top="46%" :w="100" />
<UiOiseauPose nom="correcteur" pose="libre" left="calc(100% + 40px)" bottom="140px" :w="108" retourne />
<BookChapterHeader <BookChapterHeader
:title="chapter.title" :title="chapter.title"
:description="chapter.description" :description="chapter.description"
@@ -10,11 +14,13 @@
<BookChapterContent :content="chapter" /> <BookChapterContent :content="chapter" />
<!-- Prev / Next navigation --> <!-- Prev / Next navigation. The rule above it is drawn (border-t alone sets no style here):
<nav class="mt-16 flex items-center justify-between border-t border-white/8 pt-8"> the box maker stands on it -->
<nav class="relative mt-16 flex items-center justify-between border-t border-t-solid border-white/8 pt-8">
<UiOiseauPose nom="cartonnier" pose="perche" left="calc(50% - 38px)" :w="76" />
<NuxtLink <NuxtLink
v-if="prevChapter" v-if="prevChapter"
:to="`/lire/${prevChapter.stem}`" :to="`/economique/modele-eco/${prevChapter.stem?.split('/').pop()}`"
class="btn-ghost gap-2" class="btn-ghost gap-2"
> >
<div class="i-lucide-arrow-left h-4 w-4" /> <div class="i-lucide-arrow-left h-4 w-4" />
@@ -24,7 +30,7 @@
<NuxtLink <NuxtLink
v-if="nextChapter" v-if="nextChapter"
:to="`/lire/${nextChapter.stem}`" :to="`/economique/modele-eco/${nextChapter.stem?.split('/').pop()}`"
class="btn-ghost gap-2" class="btn-ghost gap-2"
> >
<span class="text-sm">{{ nextChapter.title }}</span> <span class="text-sm">{{ nextChapter.title }}</span>
@@ -43,6 +49,11 @@ definePageMeta({
const route = useRoute() const route = useRoute()
const slug = route.params.slug as string const slug = route.params.slug as string
// Scroll to top when navigating between chapters (component reused by Vue Router)
watch(() => slug, () => {
if (import.meta.client) window.scrollTo({ top: 0, behavior: 'instant' })
})
// Initialize guided mode // Initialize guided mode
useGuidedMode() useGuidedMode()
@@ -54,8 +65,11 @@ if (!chapter.value) {
throw createError({ statusCode: 404, statusMessage: 'Chapitre non trouvé' }) throw createError({ statusCode: 404, statusMessage: 'Chapitre non trouvé' })
} }
useHead({ useSeoPage({
title: chapter.value?.title, title: chapter.value?.title ?? slug,
description: chapter.value?.description as string ?? `Chapitre « ${chapter.value?.title} » — Une économie du don, enfin concevable.`,
image: '/images/Couv-Economie-du-don.jpg',
type: 'article',
}) })
// Get adjacent chapters for navigation // Get adjacent chapters for navigation
@@ -64,7 +78,7 @@ const { data: allChapters } = await useAsyncData('book-nav', () =>
) )
const currentIndex = computed(() => const currentIndex = computed(() =>
allChapters.value?.findIndex(c => c.stem === slug) ?? -1, allChapters.value?.findIndex(c => c.stem?.split('/').pop() === slug) ?? -1,
) )
const prevChapter = computed(() => { const prevChapter = computed(() => {
+128
View File
@@ -0,0 +1,128 @@
<template>
<div class="oiseaux-scene relative overflow-hidden section-padding">
<div class="container-content">
<!-- Page de couverture du livre -->
<HomeBookSection
class="mb-10 hero-compact"
:show-chapters="false"
@open-player="showBookPlayer = true"
@open-pdf="showPdfReader = true"
/>
<header class="mb-10 text-center">
<p class="relative mb-2 font-mono text-sm tracking-widest text-primary uppercase">
<!-- Phone: the title fills the width; the bird stands at the end of this line, on its baseline -->
{{ content?.kicker }}<UiOiseauPose nom="relieur" pose="perche" bout :w="72" mobile-seul />
</p>
<h1 class="page-title relative font-display font-bold tracking-tight" style="color: hsl(var(--color-text))">
<!-- Before the title, on its baseline (rule e, docs/da-oiseaux.md) -->
<UiOiseauPose nom="relieur" pose="perche" bout right="16px" :w="108" :seuil="1200" />{{ content?.title }}
</h1>
<p class="mt-3 mx-auto max-w-2xl text-sm" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
</header>
<div class="mx-auto max-w-3xl">
<ul class="flex flex-col gap-3">
<li
v-for="chapter in chapters"
:key="chapter.path"
class="relative"
>
<UiOiseauPose v-for="o in OISEAUX_CHAPITRE[chapter.stem?.split('/').pop() ?? ''] ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<NuxtLink
:to="`/economique/modele-eco/${chapter.stem?.split('/').pop()}`"
class="card-surface flex items-start gap-4 group"
>
<span class="font-mono text-2xl font-bold text-primary/30 leading-none mt-1 w-10 text-right flex-shrink-0">
{{ String(chapter.order).padStart(2, '0') }}
</span>
<div class="min-w-0 flex-1">
<div class="flex items-baseline gap-2 flex-wrap">
<h2 class="font-display text-lg font-semibold text-white group-hover:text-primary transition-colors">
{{ chapter.title }}
</h2>
<span v-if="chapter.page" class="text-xs font-mono text-white/30 flex-shrink-0">p.&nbsp;{{ chapter.page }}</span>
</div>
<p v-if="chapter.description" class="mt-1 text-sm text-white/50">
{{ chapter.description }}
</p>
<div class="mt-2 flex items-center gap-3">
<span v-if="chapter.readingTime" class="text-xs text-white/30">
<span class="i-lucide-clock inline-block h-3 w-3 mr-1 align-middle" />
{{ chapter.readingTime }}
</span>
<SongBadges :chapter-slug="chapter.stem?.split('/').pop() ?? ''" />
</div>
</div>
<div class="i-lucide-chevron-right h-5 w-5 text-white/20 group-hover:text-primary/60 transition-colors flex-shrink-0 mt-2" />
</NuxtLink>
</li>
</ul>
</div>
</div>
<BookPlayer v-model="showBookPlayer" />
<BookPdfReader v-model="showPdfReader" />
</div>
</template>
<script setup lang="ts">
import type { OiseauPlace } from '~/utils/oiseauPose'
// Birds along the chapters, each by the one its trade tells (irregular intervals). The cards
// stand 12 px apart: no room above them for a perched bird (DA rule of 03/11)
const OISEAUX_CHAPITRE: Record<string, OiseauPlace[]> = {
'01-introduction': [{ nom: 'conteuse', pose: 'marge-g', ecart: '50px', w: 122 }],
'03-mesure': [{ nom: 'la-balance', pose: 'marge-d', ecart: '40px', w: 112, retourne: true }],
'07-echanger': [{ nom: 'colporteur', pose: 'marge-g', ecart: '44px', w: 116 }],
'08-institution': [{ nom: 'empileur', pose: 'marge-d', ecart: '90px', w: 104, retourne: true }],
'11-annexes': [{ nom: 'illustratrice', pose: 'derriere', left: 'calc(100% - 110px)', bottom: '-40px', w: 220 }],
}
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('economique/modele-eco')
useSeoPage({
title: content.value?.meta?.title ?? 'Une économie du don — Table des matières',
description: 'Onze chapitres pour explorer les fondements d\'une économie fondée sur le don, la mesure et la monnaie libre.',
image: '/images/Couv-Economie-du-don.jpg',
type: 'book',
})
const { data: chapters } = await useAsyncData('book-toc', () =>
queryCollection('book').order('order', 'ASC').all(),
)
const showBookPlayer = ref(false)
const showPdfReader = ref(false)
</script>
<style scoped>
.page-title {
font-size: clamp(1.5rem, 3.5vw, 2rem);
}
/* Compact the HomeBookSection hero */
:deep(.hero-compact .book-hero),
:deep(.hero-compact .section-hero) {
padding-top: 2rem;
padding-bottom: 2rem;
}
:deep(.hero-compact img),
:deep(.hero-compact .book-cover) {
max-height: 260px;
}
:deep(.hero-compact h1),
:deep(.hero-compact .hero-title) {
font-size: clamp(1.4rem, 3vw, 2rem);
}
:deep(.hero-compact .hero-description) {
font-size: 0.9rem;
}
</style>
+331
View File
@@ -0,0 +1,331 @@
<template>
<div class="oiseaux-scene axis-scope axis-scope--eco section-padding">
<div class="container-content">
<!-- Header -->
<div class="mx-auto max-w-2xl text-center mb-8">
<div class="section-icon mx-auto mb-6">
<span v-if="content?.icon === 'g1'" class="g1-icon">Ğ1</span>
<div v-else :class="`i-lucide-${content?.icon ?? 'coins'}`" class="h-12 w-12" />
</div>
<p class="mb-2 font-mono text-sm tracking-widest text-primary uppercase">
{{ content?.kicker }}
</p>
<h1 class="font-display text-3xl font-bold mb-4" style="color: hsl(var(--color-text))">
{{ content?.title }}
</h1>
<p class="text-lg leading-relaxed" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
<UiStatusBadge class="mt-4" :status="content?.status" :since="content?.since" />
</div>
<!-- Navigation prev / index / next -->
<nav class="ctx-nav mx-auto max-w-2xl mb-10">
<NuxtLink v-if="prevItem?.to" :to="prevItem.to" class="ctx-nav-btn ctx-nav-prev">
<div class="i-lucide-arrow-left h-4 w-4 shrink-0" />
<span>{{ prevItem.label }}</span>
</NuxtLink>
<div v-else class="ctx-nav-spacer" />
<NuxtLink to="/economique" class="ctx-nav-btn ctx-nav-index">
<div class="i-lucide-layout-grid h-4 w-4" />
<span>Économique</span>
</NuxtLink>
<NuxtLink v-if="nextItem?.to" :to="nextItem.to" class="ctx-nav-btn ctx-nav-next">
<span>{{ nextItem.label }}</span>
<div class="i-lucide-arrow-right h-4 w-4 shrink-0" />
</NuxtLink>
<div v-else class="ctx-nav-spacer" />
</nav>
<!-- Zone sections — relative pour ancrer le sidebar -->
<div class="sections-area">
<!-- Sidebar sommaire -->
<aside v-if="sommaire.length > 1" class="page-sidebar">
<nav class="sommaire-sidebar">
<p class="sommaire-sidebar-title">Sur cette page</p>
<ol class="sommaire-sidebar-list">
<li v-for="(entry, ei) in sommaire" :key="ei">
<a :href="`#${entry.id}`" class="sommaire-sidebar-link">
<span class="sommaire-n">{{ ei + 1 }}</span>
<span>{{ entry.title }}</span>
</a>
</li>
</ol>
</nav>
</aside>
<!-- Content -->
<div
v-if="content?.content"
id="section-content"
class="prose-block relative mb-8 max-w-2xl mx-auto section-anchor"
>
<UiOiseauPose nom="boulangere" pose="marge-g" ecart="56px" :w="96" />
<!-- Behind the top of the text block, which has a background (the links stand apart) -->
<UiOiseauPose nom="vigneronne" pose="derriere" left="-140px" bottom="calc(100% - 220px)" :w="210" />
<p class="leading-relaxed whitespace-pre-line" style="color: hsl(var(--color-text-muted))">
{{ content.content }}
</p>
</div>
<!-- External links -->
<div
v-if="content?.links"
id="section-links"
class="relative flex flex-col gap-3 mb-10 max-w-2xl mx-auto section-anchor"
>
<a
v-for="link in content.links"
:key="link.href"
:href="link.href"
target="_blank"
rel="noopener"
class="link-card group"
>
<div class="link-icon">
<div :class="`i-lucide-${link.icon ?? 'external-link'} h-4 w-4`" />
</div>
<span class="text-sm font-medium" style="color: hsl(var(--color-text))">{{ link.label }}</span>
<div class="i-lucide-arrow-up-right h-3.5 w-3.5 ml-auto text-primary/40 group-hover:text-primary transition-colors" />
</a>
</div>
</div><!-- /sections-area -->
</div>
</div>
</template>
<script setup lang="ts">
const [{ data: content }, { data: homeData }] = await Promise.all([
usePageContent('economique/monnaie-libre'),
usePageContent('home'),
])
// Sommaire
const sommaire = computed(() => {
const entries: { title: string; id: string }[] = []
if (content.value?.content) entries.push({ title: 'La théorie', id: 'section-content' })
if ((content.value?.links as unknown[])?.length) entries.push({ title: 'Ressources', id: 'section-links' })
return entries
})
// Prev / next dans la section économique
interface AxisItem { label: string; to?: string; icon?: string }
const economieItems = computed<AxisItem[]>(
() => (homeData.value as Record<string, unknown> | null)?.axes?.economie?.items as AxisItem[] ?? [],
)
const currentPath = '/economique/monnaie-libre'
const currentIdx = computed(() => economieItems.value.findIndex(i => i.to === currentPath))
const prevItem = computed(() => currentIdx.value > 0 ? economieItems.value[currentIdx.value - 1] : null)
const nextItem = computed(() => currentIdx.value < economieItems.value.length - 1 ? economieItems.value[currentIdx.value + 1] : null)
useSeoPage({
title: content.value?.meta?.title ?? 'Monnaie libre — Autonomie économique',
description: content.value?.description as string ?? 'La monnaie libre (June / G1) : comprendre la théorie relative de la monnaie et expérimenter une monnaie équitable.',
})
</script>
<style scoped>
.g1-icon {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.75rem;
line-height: 1;
}
.section-icon {
display: flex;
align-items: center;
justify-content: center;
width: 5rem;
height: 5rem;
border-radius: 1rem;
background: hsl(var(--color-primary) / 0.1);
border: 1px solid hsl(var(--color-primary) / 0.2);
color: hsl(var(--color-primary));
}
.prose-block {
padding: 1.5rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
}
.link-card {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
border: 1px solid hsl(var(--color-primary) / 0.1);
background: hsl(var(--color-surface));
text-decoration: none;
transition: border-color 0.2s;
}
.link-card:hover {
border-color: hsl(var(--color-primary) / 0.25);
}
.link-icon {
display: flex;
align-items: center;
justify-content: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 0.375rem;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
flex-shrink: 0;
}
.section-anchor {
scroll-margin-top: 5.5rem;
}
/* ── Navigation prev/next ── */
.ctx-nav {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 0.5rem;
align-items: center;
}
.ctx-nav-spacer { min-width: 0; }
.ctx-nav-btn {
display: flex;
align-items: center;
gap: 0.45rem;
padding: 0.5rem 0.875rem;
border-radius: 20px;
text-decoration: none;
font-size: 0.8rem;
font-weight: 500;
color: hsl(var(--color-text-muted));
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.08);
transition: all 0.15s;
min-width: 0;
}
.ctx-nav-btn:hover {
color: hsl(var(--color-primary));
border-color: hsl(var(--color-primary) / 0.25);
background: hsl(var(--color-primary) / 0.05);
}
.ctx-nav-prev { justify-content: flex-start; }
.ctx-nav-next { justify-content: flex-end; }
.ctx-nav-prev span,
.ctx-nav-next span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ctx-nav-index {
justify-content: center;
background: hsl(var(--color-primary) / 0.08);
border-color: hsl(var(--color-primary) / 0.15);
color: hsl(var(--color-primary));
font-size: 0.75rem;
padding: 0.45rem 0.75rem;
white-space: nowrap;
flex-shrink: 0;
}
.ctx-nav-index:hover { background: hsl(var(--color-primary) / 0.15); }
@media (max-width: 480px) {
.ctx-nav { grid-template-columns: auto 1fr auto; }
.ctx-nav-prev span, .ctx-nav-next span { display: none; }
.ctx-nav-prev, .ctx-nav-next { padding: 0.5rem; }
}
/* ── Zone sections ── */
.sections-area {
position: relative;
}
/* ── Sidebar sommaire ── */
.page-sidebar {
display: none;
position: absolute;
top: 0;
right: 0;
width: 10.5rem;
height: 100%;
}
@media (min-width: 1300px) {
.page-sidebar { display: block; }
}
.sommaire-sidebar {
position: sticky;
top: 5.5rem;
padding: 0.875rem;
border-radius: 14px;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.07);
}
.sommaire-sidebar-title {
font-family: var(--font-mono);
font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: hsl(var(--color-text-muted));
margin: 0 0 0.6rem;
}
.sommaire-sidebar-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.sommaire-sidebar-link {
display: flex;
align-items: baseline;
gap: 0.45rem;
padding: 0.28rem 0.4rem;
border-radius: 8px;
text-decoration: none;
font-size: 0.75rem;
color: hsl(var(--color-text-muted));
line-height: 1.4;
transition: color 0.12s, background 0.12s;
}
.sommaire-sidebar-link:hover {
color: hsl(var(--color-primary));
background: hsl(var(--color-primary) / 0.06);
}
.sommaire-n {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.2rem;
height: 1.2rem;
border-radius: 50%;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
font-family: var(--font-mono);
font-size: 0.6rem;
font-weight: 700;
flex-shrink: 0;
}
</style>
@@ -0,0 +1,92 @@
<template>
<div class="axis-scope axis-scope--eco oiseaux-scene relative section-padding">
<div class="container-content">
<div class="mx-auto max-w-2xl">
<div class="section-icon mx-auto mb-6">
<div :class="`i-lucide-${content?.icon ?? 'users'}`" class="h-12 w-12" />
</div>
<p class="mb-2 font-mono text-sm tracking-widest text-primary uppercase text-center">
{{ content?.kicker }}
</p>
<!-- The workshop: each trade of the collective productions around the page -->
<h1 class="relative font-display text-3xl font-bold mb-4 text-center" style="color: hsl(var(--color-text))">
{{ content?.title }}
<!-- In the margin, feet on the title's baseline (rule e) -->
<UiOiseauPose nom="soudeuse" pose="marge-d" ecart="30px" bottom="4px" :w="112" retourne />
</h1>
<p class="relative text-lg leading-relaxed mb-8 text-center" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
<div class="mb-8 text-center">
<UiStatusBadge :status="content?.status" :gestation="content?.gestation" />
</div>
<!-- Content -->
<div v-if="content?.content" class="prose-block mb-10">
<UiOiseauPose nom="menuisier" pose="perche" left="20px" :w="84" mobile />
<UiOiseauPose nom="forgeron" pose="marge-g" ecart="70px" :w="140" />
<UiOiseauPose nom="berger" pose="derriere" left="calc(100% - 110px)" bottom="-46px" :w="230" />
<p class="leading-relaxed whitespace-pre-line" style="color: hsl(var(--color-text-muted))">
{{ content.content }}
</p>
</div>
<div class="relative text-center">
<UiBaseButton variant="ghost" to="/economique">
<div class="i-lucide-arrow-left mr-2 h-4 w-4" />
Autonomie économique
</UiBaseButton>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
const { data: content } = await usePageContent('economique/productions-collectives')
useSeoPage({
title: content.value?.meta?.title ?? 'Productions collectives',
description: content.value?.description as string ?? 'Initiatives et productions collectives dans le cadre de l\'économie du don.',
})
</script>
<style scoped>
.section-icon {
display: flex;
align-items: center;
justify-content: center;
width: 5rem;
height: 5rem;
border-radius: 1rem;
background: hsl(var(--color-primary) / 0.1);
border: 1px solid hsl(var(--color-primary) / 0.2);
color: hsl(var(--color-primary));
}
.gestation-badge {
display: flex;
align-items: center;
justify-content: center;
gap: 0.25rem;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
background: hsl(var(--color-accent) / 0.12);
color: hsl(var(--color-accent));
font-size: 0.75rem;
font-weight: 500;
font-family: var(--font-mono);
width: fit-content;
}
.prose-block {
position: relative;
padding: 1.5rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
}
</style>
-110
View File
@@ -1,110 +0,0 @@
<template>
<div class="section-padding">
<div class="container-content">
<header class="mb-12 text-center">
<p class="mb-2 font-mono text-sm tracking-widest text-accent uppercase">{{ content?.kicker }}</p>
<h1 class="page-title font-display font-bold tracking-tight text-white">
{{ content?.title }}
</h1>
<p class="mt-4 mx-auto max-w-2xl text-white/60">
{{ content?.description }}
</p>
</header>
<!-- Search + view toggle -->
<div class="mb-6 flex items-center justify-between gap-4">
<div class="relative flex-1 max-w-md">
<div class="i-lucide-search absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30" />
<input
v-model="search"
type="text"
:placeholder="content?.searchPlaceholder"
class="w-full rounded-lg bg-surface border border-white/8 py-2 pl-10 pr-4 text-sm text-white placeholder:text-white/30 focus:border-primary/50 focus:outline-none"
>
</div>
<div class="flex items-center gap-1 rounded-lg bg-surface p-1">
<button
class="rounded p-1.5 transition-colors"
:class="viewMode === 'list' ? 'bg-white/10 text-white' : 'text-white/40'"
@click="viewMode = 'list'"
>
<div class="i-lucide-list h-4 w-4" />
</button>
<button
class="rounded p-1.5 transition-colors"
:class="viewMode === 'grid' ? 'bg-white/10 text-white' : 'text-white/40'"
@click="viewMode = 'grid'"
>
<div class="i-lucide-grid-3x3 h-4 w-4" />
</button>
</div>
</div>
<!-- Song list -->
<div v-if="viewMode === 'list'" class="flex flex-col gap-2">
<SongItem
v-for="song in filteredSongs"
:key="song.id"
:song="song"
/>
</div>
<!-- Song grid -->
<div v-else class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
<SongItem
v-for="song in filteredSongs"
:key="song.id"
:song="song"
/>
</div>
<p v-if="filteredSongs.length === 0" class="text-center text-white/40 py-12">
{{ content?.noResults }}
</p>
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('ecouter')
useHead({
title: content.value?.meta?.title ?? 'Écouter',
})
const store = usePlayerStore()
const bookData = useBookData()
const { loadFullPlaylist } = usePlaylist()
await bookData.init()
// Switch to free mode
store.setMode('free')
await loadFullPlaylist()
const search = ref('')
const viewMode = ref<'list' | 'grid'>('list')
const filteredSongs = computed(() => {
const songs = bookData.getSongs()
if (!search.value.trim()) return songs
const q = search.value.toLowerCase()
return songs.filter(
s => s.title.toLowerCase().includes(q)
|| s.artist.toLowerCase().includes(q)
|| s.tags.some(t => t.toLowerCase().includes(q)),
)
})
</script>
<style scoped>
.page-title {
font-size: clamp(2rem, 5vw, 2.75rem);
}
</style>
+181
View File
@@ -0,0 +1,181 @@
<template>
<div class="relative overflow-hidden section-padding">
<div class="container-content">
<!-- Hero section with book cover -->
<div class="mb-12 grid items-center gap-8 md:grid-cols-2">
<div class="book-cover-wrapper relative">
<!-- On the cover's base line, in the empty space between the book and the text -->
<UiOiseauPose nom="trompettiste" pose="libre" left="calc(100% - 112px)" bottom="0px" :w="104" />
<div class="book-cover-3d">
<img
:src="homeContent?.book.coverImage"
:alt="homeContent?.book.coverAlt"
class="book-cover-img"
/>
</div>
</div>
<div class="text-center md:text-left">
<p class="relative mb-2 font-mono text-sm tracking-widest text-accent uppercase">
<!-- The DJ stands at the end of this line, on its baseline: the title's box has no visible
top edge (rule e) -->
{{ content?.kicker }}<UiOiseauPose nom="dj" pose="perche" bout left="14px" :w="84" retourne ton="accent" :seuil="1200" />
</p>
<h1 class="page-title relative font-display font-bold tracking-tight text-white">
{{ content?.title }}
</h1>
<p class="mt-4 text-white/60">
{{ content?.description }}
</p>
<div class="mt-6 flex flex-col gap-3 sm:flex-row sm:gap-4 justify-center md:justify-start">
<UiBaseButton @click="showBookPlayer = true">
<div class="i-lucide-play mr-2 h-5 w-5" />
Présentation musicale
</UiBaseButton>
<UiBaseButton variant="accent" @click="showPdfReader = true">
<div class="i-lucide-book-open mr-2 h-5 w-5" />
Lire le livre
</UiBaseButton>
</div>
</div>
</div>
<!-- Search + view toggle -->
<div class="mb-6 flex items-center justify-between gap-4">
<div class="relative flex-1 max-w-md">
<div class="i-lucide-search absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-white/30" />
<input
v-model="search"
type="text"
:placeholder="content?.searchPlaceholder"
class="w-full rounded-lg bg-surface border border-white/8 py-2 pl-10 pr-4 text-sm text-white placeholder:text-white/30 focus:border-primary/50 focus:outline-none"
>
</div>
<div class="flex items-center gap-1 rounded-lg bg-surface p-1">
<button
class="rounded p-1.5 transition-colors"
:class="viewMode === 'list' ? 'bg-white/10 text-white' : 'text-white/40'"
@click="viewMode = 'list'"
>
<div class="i-lucide-list h-4 w-4" />
</button>
<button
class="rounded p-1.5 transition-colors"
:class="viewMode === 'grid' ? 'bg-white/10 text-white' : 'text-white/40'"
@click="viewMode = 'grid'"
>
<div class="i-lucide-grid-3x3 h-4 w-4" />
</button>
</div>
</div>
<!-- Song list -->
<div v-if="viewMode === 'list'" class="relative flex flex-col gap-2">
<UiOiseauPose nom="danseur" pose="perche" left="calc(64% - 60px)" :w="120" :seuil="1200" />
<SongItem
v-for="song in filteredSongs"
:key="song.id"
:song="song"
/>
</div>
<!-- Song grid -->
<div v-else class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
<SongItem
v-for="song in filteredSongs"
:key="song.id"
:song="song"
/>
</div>
<p v-if="filteredSongs.length === 0" class="text-center text-white/40 py-12">
{{ content?.noResults }}
</p>
</div>
<BookPlayer v-model="showBookPlayer" />
<BookPdfReader v-model="showPdfReader" />
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('en-musique')
const { data: homeContent } = await usePageContent('home')
useSeoPage({
title: content.value?.meta?.title ?? 'En musique — Le Librodrome',
description: 'Neuf chansons qui racontent le livre « Une économie du don ». Écoute libre, paroles et présentation musicale guidée.',
image: '/images/Couv-Economie-du-don.jpg',
})
const store = usePlayerStore()
const bookData = useBookData()
const { loadFullPlaylist } = usePlaylist()
await bookData.init()
// Switch to free mode
store.setMode('free')
await loadFullPlaylist()
const search = ref('')
const viewMode = ref<'list' | 'grid'>('list')
const showBookPlayer = ref(false)
const showPdfReader = ref(false)
const filteredSongs = computed(() => {
const songs = bookData.getSongs()
if (!search.value.trim()) return songs
const q = search.value.toLowerCase()
return songs.filter(
s => s.title.toLowerCase().includes(q)
|| s.artist.toLowerCase().includes(q)
|| s.tags.some(t => t.toLowerCase().includes(q)),
)
})
</script>
<style scoped>
.page-title {
font-size: clamp(2rem, 5vw, 2.75rem);
}
.book-cover-wrapper {
perspective: 800px;
display: flex;
justify-content: center;
}
.book-cover-3d {
aspect-ratio: 3 / 4;
border-radius: 0.75rem;
overflow: hidden;
border: 1px solid hsl(var(--color-text) / 0.1);
box-shadow:
0 12px 40px hsl(var(--color-text) / 0.15),
0 0 0 1px hsl(var(--color-text) / 0.08);
transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
box-shadow 0.5s ease;
max-width: 280px;
}
.book-cover-3d:hover {
transform: rotateY(-8deg) rotateX(3deg) scale(1.02);
box-shadow:
12px 16px 48px hsl(var(--color-text) / 0.2),
0 0 0 1px hsl(var(--color-primary) / 0.2);
}
.book-cover-img {
width: 200%;
height: 100%;
object-fit: cover;
transform: translateX(-50%);
}
</style>
+340
View File
@@ -0,0 +1,340 @@
<template>
<div class="relative overflow-hidden section-padding min-h-[70vh] flex items-center justify-center">
<div class="container-content relative z-10 text-center">
<!-- The stage of the hero: a tightrope walker and a drummer, at different heights -->
<UiOiseauPose nom="funambule" pose="libre" left="5%" bottom="6%" :w="176" :op="0.2" />
<UiOiseauPose nom="batteur" pose="libre" right="6%" bottom="34%" :w="116" retourne ton="accent" />
<!-- Logo SVG vectoriel — inline pour currentColor -->
<div class="evt-logo-wrap mx-auto mb-6" aria-hidden="true">
<UiSectionSign class="evt-logo" />
</div>
<p class="mb-3 font-mono text-sm tracking-widest text-accent uppercase">{{ content?.kicker }}</p>
<h1 class="page-title relative font-display font-extrabold tracking-tight" style="color: hsl(var(--color-text))">
<!-- The trapeze artist at the end of the title, on its baseline (rule e, docs/da-oiseaux.md) -->
{{ content?.title }}<UiOiseauPose nom="trapeziste" pose="perche" bout left="16px" :w="96" ton="accent" :seuil="1200" />
</h1>
<p v-if="evtContent?.format" class="evt-format font-display">
{{ evtContent.format }}
</p>
<p v-if="evtContent?.subtitle" class="mt-2 text-base italic" style="color: hsl(var(--color-text-muted))">
{{ evtContent.subtitle }}
</p>
<p class="mt-4 text-lg leading-relaxed max-w-xl mx-auto" style="color: hsl(var(--color-text-muted))">
{{ content?.description }}
</p>
<!-- Leitmotiv -->
<div v-if="evtContent?.leitmotiv" class="mt-8 flex flex-col items-center gap-3">
<p class="relative font-display text-xl font-bold" style="color: hsl(var(--color-text))">
« {{ evtContent.leitmotiv }} »
<!-- The acrobat on the line of the leitmotiv, before it: by « Format & lieu », the stage
manager stands alone (two birds there would stand at the same height) -->
<UiOiseauPose nom="acrobate" pose="perche" right="calc(100% + 14px)" bottom="0px" :w="72" />
</p>
<p v-if="evtContent?.tagline" class="font-mono text-sm tracking-widest uppercase" style="color: hsl(var(--color-primary))">
{{ evtContent.tagline }}
</p>
<span v-if="evtContent?.gestation" class="evt-gestation-badge">
<div class="i-lucide-flask-conical h-3.5 w-3.5" />
En gestation
</span>
</div>
</div>
</div>
<!-- ══ Contenu événement ══ -->
<section v-if="evtContent?.axes || evtContent?.espaces || evtContent?.config" class="evt-content section-padding">
<div class="container-content flex flex-col gap-14">
<!-- 3 axes -->
<div v-if="evtContent?.axes">
<h2 class="evt-section-title relative">
<!-- The section birds stand at the end of their title, on its baseline (rule e) -->
Trois axes d'émancipation<UiOiseauPose nom="clown" pose="perche" bout left="14px" :w="84" retourne ton="accent" />
</h2>
<p class="evt-section-sub">« je subis — ou je m'affranchis »</p>
<div class="axes-grid">
<div v-for="(axe, i) in evtContent.axes" :key="i" class="axe-card">
<UiOiseauPose v-for="o in OISEAUX_CARTE[axe.label] ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<div class="axe-icon">
<div :class="`i-lucide-${axe.icon} h-5 w-5`" />
</div>
<h3 class="font-display text-lg font-bold mb-3" style="color: hsl(var(--color-text))">
{{ axe.label }}
</h3>
<ul class="axe-list">
<li v-for="(item, j) in axe.items" :key="j">
<div class="i-lucide-arrow-right h-3.5 w-3.5 shrink-0 mt-0.5" style="color: hsl(var(--color-primary))" />
<span>{{ item }}</span>
</li>
</ul>
</div>
</div>
</div>
<!-- Espaces permanents -->
<div v-if="evtContent?.espaces">
<h2 class="evt-section-title relative">
Espaces & programme<UiOiseauPose nom="marionnettiste" pose="perche" bout left="14px" :w="112" retourne />
</h2>
<p class="evt-section-sub">Chorégraphie séquencée de plénières, ateliers et espaces permanents</p>
<div class="espaces-grid">
<div v-for="(esp, i) in evtContent.espaces" :key="i" class="espace-card">
<UiOiseauPose v-for="o in OISEAUX_CARTE[esp.label] ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<div class="espace-icon">
<div :class="`i-lucide-${esp.icon} h-4 w-4`" />
</div>
<div>
<p class="font-semibold text-sm" style="color: hsl(var(--color-text))">{{ esp.label }}</p>
<p class="text-xs mt-0.5 leading-relaxed" style="color: hsl(var(--color-text-muted))">{{ esp.desc }}</p>
</div>
</div>
</div>
</div>
<!-- Config -->
<div v-if="evtContent?.config">
<h2 class="evt-section-title relative">
Format & lieu
<UiOiseauPose nom="regisseur" pose="perche" right="24%" bottom="0px" :w="92" retourne />
</h2>
<div class="config-grid">
<div v-for="(cfg, i) in evtContent.config" :key="i" class="config-card">
<UiOiseauPose v-for="o in OISEAUX_CARTE[cfg.label] ?? []" :key="`${o.nom}-${o.pose}`" v-bind="o" />
<div class="config-icon">
<div :class="`i-lucide-${cfg.icon} h-4 w-4`" />
</div>
<div>
<p class="font-semibold text-sm" style="color: hsl(var(--color-text))">{{ cfg.label }}</p>
<p class="text-xs mt-0.5" style="color: hsl(var(--color-text-muted))">{{ cfg.detail }}</p>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script setup lang="ts">
import type { OiseauPlace } from '~/utils/oiseauPose'
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('evenement')
const evtContent = computed(() => content.value as Record<string, any> | null)
// Birds standing on the cards, by card label: never two on the same row
const OISEAUX_CARTE: Record<string, OiseauPlace[]> = {
'Économique': [{ nom: 'jongleur', pose: 'perche', right: '22px', w: 76 }],
'Ğ(marché)': [{ nom: 'cracheur-de-feu', pose: 'perche', right: '18px', w: 76, ton: 'accent', seuil: 1200 }],
}
useSeoPage({
title: evtContent.value?.meta?.title ?? 'Évènement — Le Librodrome',
description: evtContent.value?.description as string ?? 'Prochains événements du Librodrome : rencontres, lectures et ateliers autour de l\'économie du don.',
})
</script>
<style scoped>
.evt-format {
margin-top: 0.35rem;
font-weight: 600;
font-size: clamp(1.25rem, 3vw, 1.75rem);
letter-spacing: -0.02em;
color: hsl(var(--axis-cit));
}
.page-title {
font-size: clamp(2.5rem, 6vw, 3.5rem);
}
/* ── Logo SVG ── */
.evt-logo-wrap {
width: 4.5rem;
height: 4.5rem;
display: flex;
align-items: center;
justify-content: center;
color: hsl(var(--color-primary));
filter: drop-shadow(0 6px 14px hsl(var(--color-primary) / 0.25));
}
.evt-logo {
height: 100%;
width: auto;
}
/* ── Badge gestation hero ── */
.evt-gestation-badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.25rem 0.75rem;
border-radius: 9999px;
background: hsl(var(--color-accent) / 0.12);
border: 1px solid hsl(var(--color-accent) / 0.25);
color: hsl(var(--color-accent));
font-size: 0.75rem;
font-weight: 600;
font-family: var(--font-mono);
letter-spacing: 0.04em;
}
/* ── Section contenus événement ── */
.evt-content {
background: hsl(var(--color-bg));
}
.evt-section-title {
font-family: var(--font-display);
font-size: clamp(1.25rem, 3vw, 1.75rem);
font-weight: 800;
color: hsl(var(--color-text));
margin-bottom: 0.25rem;
}
.evt-section-sub {
font-family: var(--font-mono);
font-size: 0.8rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: hsl(var(--color-primary));
margin-bottom: 1.5rem;
}
/* ── Axes ── */
.axes-grid {
display: grid;
gap: 1rem;
grid-template-columns: 1fr;
}
@media (min-width: 640px) {
.axes-grid { grid-template-columns: repeat(3, 1fr); }
}
.axe-card {
position: relative;
padding: 1.5rem;
border-radius: 16px;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.07);
transition: border-color 0.2s, box-shadow 0.2s;
}
.axe-card:hover {
border-color: hsl(var(--color-primary) / 0.25);
box-shadow: 0 4px 24px hsl(var(--color-primary) / 0.06);
}
.axe-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 0.625rem;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
margin-bottom: 1rem;
}
.axe-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.axe-list li {
display: flex;
align-items: flex-start;
gap: 0.5rem;
font-size: 0.82rem;
line-height: 1.5;
color: hsl(var(--color-text-muted));
}
/* ── Espaces ── */
.espaces-grid {
display: grid;
gap: 0.75rem;
grid-template-columns: 1fr;
}
@media (min-width: 640px) {
.espaces-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
.espaces-grid { grid-template-columns: repeat(3, 1fr); }
}
.espace-card {
position: relative;
display: flex;
align-items: flex-start;
gap: 0.875rem;
padding: 1rem 1.25rem;
border-radius: 12px;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.06);
transition: border-color 0.15s;
}
.espace-card:hover {
border-color: hsl(var(--color-accent) / 0.25);
}
.espace-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 0.5rem;
background: hsl(var(--color-accent) / 0.1);
color: hsl(var(--color-accent));
flex-shrink: 0;
}
/* ── Config ── */
.config-grid {
display: grid;
gap: 0.75rem;
grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
.config-grid { grid-template-columns: repeat(4, 1fr); }
}
.config-card {
position: relative;
display: flex;
align-items: flex-start;
gap: 0.75rem;
padding: 1rem;
border-radius: 12px;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.06);
}
.config-icon {
display: flex;
align-items: center;
justify-content: center;
width: 1.875rem;
height: 1.875rem;
border-radius: 0.5rem;
background: hsl(var(--color-primary) / 0.1);
color: hsl(var(--color-primary));
flex-shrink: 0;
}
</style>
+59 -54
View File
@@ -1,70 +1,75 @@
<template> <template>
<div class="section-padding"> <NuxtLayout>
<div class="container-content max-w-3xl mx-auto"> <div class="relative overflow-hidden section-padding">
<!-- Back link -->
<UiScrollReveal>
<NuxtLink to="/" class="inline-flex items-center gap-2 text-sm text-white/50 hover:text-white/80 mb-8 transition-colors">
<div class="i-lucide-arrow-left h-4 w-4" />
Retour à l'accueil
</NuxtLink>
</UiScrollReveal>
<!-- Header --> <div class="container-content max-w-3xl mx-auto">
<UiScrollReveal> <!-- Back link -->
<div class="text-center mb-12"> <UiScrollReveal>
<span class="inline-block mb-3 rounded-full bg-amber-400/15 px-3 py-0.5 font-mono text-xs tracking-widest text-amber-400 uppercase"> <NuxtLink to="/" class="inline-flex items-center gap-2 text-sm text-white/50 hover:text-white/80 mb-8 transition-colors">
{{ content?.kicker }} <div class="i-lucide-arrow-left h-4 w-4" />
</span> Retour &agrave; l'accueil
<h1 class="page-title font-display font-bold text-white"> </NuxtLink>
{{ content?.title }} </UiScrollReveal>
</h1>
<p class="mt-4 text-lg text-white/60 leading-relaxed max-w-xl mx-auto">
{{ content?.description }}
</p>
</div>
</UiScrollReveal>
<!-- Explanation cards --> <!-- Header -->
<div class="grid gap-6 md:grid-cols-2 mb-12"> <UiScrollReveal>
<UiScrollReveal <div class="text-center mb-12">
v-for="(feature, i) in content?.features" <span class="inline-block mb-3 rounded-full bg-amber-400/15 px-3 py-0.5 font-mono text-xs tracking-widest text-amber-400 uppercase">
:key="i" {{ content?.kicker }}
:delay="(i + 1) * 100" </span>
> <h1 class="page-title relative font-display font-bold text-white">
<div class="gw-feature-card"> <!-- The alchemist at the end of the title, on its baseline (rule e) -->
<div :class="`i-lucide-${feature.icon}`" class="h-6 w-6 text-amber-400 mb-3" /> {{ content?.title }}<UiOiseauPose nom="alchimiste" pose="perche" bout left="16px" :w="98" retourne />
<h3 class="font-display text-lg font-semibold text-white mb-2">{{ feature.title }}</h3> </h1>
<p class="text-sm text-white/60 leading-relaxed"> <p class="mt-4 text-lg text-white/60 leading-relaxed max-w-xl mx-auto">
{{ feature.description }} {{ content?.description }}
</p> </p>
</div> </div>
</UiScrollReveal> </UiScrollReveal>
</div>
<!-- CTA --> <!-- Explanation cards -->
<UiScrollReveal :delay="500"> <div class="grid gap-6 md:grid-cols-2 mb-12">
<div class="text-center"> <UiScrollReveal
<p class="text-sm text-white/40 mb-4"> v-for="(feature, i) in content?.features"
{{ content?.cta.note }} :key="i"
</p> :delay="(i + 1) * 100"
<UiBaseButton @click="launch"> >
<div class="i-lucide-external-link mr-2 h-5 w-5" /> <div class="gw-feature-card">
{{ content?.cta.label }} <div :class="`i-lucide-${feature.icon}`" class="h-6 w-6 text-amber-400 mb-3" />
</UiBaseButton> <h3 class="font-display text-lg font-semibold text-white mb-2">{{ feature.title }}</h3>
<p class="text-sm text-white/60 leading-relaxed">
{{ feature.description }}
</p>
</div>
</UiScrollReveal>
</div> </div>
</UiScrollReveal>
<!-- CTA -->
<UiScrollReveal :delay="500">
<div class="text-center">
<p class="text-sm text-white/40 mb-4">
{{ content?.cta.note }}
</p>
<UiBaseButton :href="url" target="_blank" @click="launch">
<div class="i-lucide-external-link mr-2 h-5 w-5" />
{{ content?.cta.label }}
</UiBaseButton>
</div>
</UiScrollReveal>
</div>
</div> </div>
</div> </NuxtLayout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const { data: content } = await usePageContent('gratewizard') const { data: content } = await usePageContent('gratewizard')
useHead({ useSeoPage({
title: content.value?.meta?.title ?? 'GrateWizard — Coefficients relatifs', title: content.value?.meta?.title ?? 'grateWizard — Coefficients relatifs',
description: 'Calculateur de coefficients relatifs pour l\'économie du don et la monnaie libre (DU/June).',
}) })
const { launch } = useGrateWizard() const { url, launch } = useGrateWizard()
</script> </script>
<style scoped> <style scoped>
@@ -75,14 +80,14 @@ const { launch } = useGrateWizard()
.gw-feature-card { .gw-feature-card {
padding: 1.5rem; padding: 1.5rem;
border-radius: 0.75rem; border-radius: 0.75rem;
border: 1px solid hsl(20 8% 18%); border: 1px solid hsl(var(--color-text) / 0.1);
background: hsl(20 8% 8% / 0.5); background: hsl(var(--color-surface) / 0.5);
transition: border-color 0.3s ease, background 0.3s ease; transition: border-color 0.3s ease, background 0.3s ease;
} }
.gw-feature-card:hover { .gw-feature-card:hover {
border-color: hsl(40 80% 50% / 0.25); border-color: hsl(40 80% 50% / 0.25);
background: hsl(20 8% 10% / 0.5); background: hsl(var(--color-surface-light) / 0.5);
} }
code { code {
+5 -5
View File
@@ -1,16 +1,16 @@
<template> <template>
<div> <div>
<HomeHeroSection /> <HomeLanding @open-player="showBookPlayer = true" @open-pdf="showPdfReader = true" />
<HomeBookSection @open-player="showBookPlayer = true" @open-pdf="showPdfReader = true" /> <HomeMessages />
<HomeGrateWizardTeaser />
<BookPlayer v-model="showBookPlayer" /> <BookPlayer v-model="showBookPlayer" />
<BookPdfReader v-model="showPdfReader" /> <BookPdfReader v-model="showPdfReader" />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
useHead({ useSeoPage({
title: 'Accueil', title: 'Le Librodrome — autonomie numérique, économique, citoyenne',
description: 'Construire une autonomie collective à l\'échelle des bassins de vie. Un livre, des chansons et des outils pour l\'émancipation.',
}) })
const showBookPlayer = ref(false) const showBookPlayer = ref(false)
-71
View File
@@ -1,71 +0,0 @@
<template>
<div class="section-padding">
<div class="container-content">
<header class="mb-12 text-center">
<p class="mb-2 font-mono text-sm tracking-widest text-primary uppercase">{{ content?.kicker }}</p>
<h1 class="page-title font-display font-bold tracking-tight text-white">
{{ content?.title }}
</h1>
<p class="mt-4 mx-auto max-w-2xl text-white/60">
{{ content?.description }}
</p>
</header>
<div class="mx-auto max-w-3xl">
<ul class="flex flex-col gap-3">
<li
v-for="chapter in chapters"
:key="chapter.path"
>
<NuxtLink
:to="`/lire/${chapter.stem}`"
class="card-surface flex items-start gap-4 group"
>
<span class="font-mono text-2xl font-bold text-primary/30 leading-none mt-1 w-10 text-right flex-shrink-0">
{{ String(chapter.order).padStart(2, '0') }}
</span>
<div class="min-w-0 flex-1">
<h2 class="font-display text-lg font-semibold text-white group-hover:text-primary transition-colors">
{{ chapter.title }}
</h2>
<p v-if="chapter.description" class="mt-1 text-sm text-white/50">
{{ chapter.description }}
</p>
<div class="mt-2 flex items-center gap-3">
<span v-if="chapter.readingTime" class="text-xs text-white/30">
<span class="i-lucide-clock inline-block h-3 w-3 mr-1 align-middle" />
{{ chapter.readingTime }}
</span>
<SongBadges :chapter-slug="chapter.stem!" />
</div>
</div>
<div class="i-lucide-chevron-right h-5 w-5 text-white/20 group-hover:text-primary/60 transition-colors flex-shrink-0 mt-2" />
</NuxtLink>
</li>
</ul>
</div>
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default',
})
const { data: content } = await usePageContent('lire')
useHead({
title: content.value?.meta?.title ?? 'Table des matières',
})
const { data: chapters } = await useAsyncData('book-toc', () =>
queryCollection('book').order('order', 'ASC').all(),
)
</script>
<style scoped>
.page-title {
font-size: clamp(2rem, 5vw, 2.75rem);
}
</style>
Loaded 100 of 341 files, more files were not shown because too many files have changed in this diff. Show more