From 9482dfa08c0df12dcb9a4ce33b7f33afe598e3d3 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 25 Feb 2026 15:00:50 +0100 Subject: [PATCH] refactor: restructure blueprints with tabs and shared fields Reorganize narrative, geoformat, chapter, project and map blueprints to use tabs layout. Add shared blueprint fields and files tab partials. Update map block query for new page hierarchy. Co-Authored-By: Claude Opus 4.6 --- public/site/blueprints/blocks/map.yml | 6 +- public/site/blueprints/fields/blueprint.yml | 2 + public/site/blueprints/pages/geoformat.yml | 75 +++++++++-------- public/site/blueprints/pages/map.yml | 1 + public/site/blueprints/pages/narrative.yml | 89 +++++++++++---------- public/site/blueprints/tabs/files.yml | 15 ++++ 6 files changed, 108 insertions(+), 80 deletions(-) create mode 100644 public/site/blueprints/fields/blueprint.yml create mode 100644 public/site/blueprints/tabs/files.yml diff --git a/public/site/blueprints/blocks/map.yml b/public/site/blueprints/blocks/map.yml index 640308b..bdb8d78 100644 --- a/public/site/blueprints/blocks/map.yml +++ b/public/site/blueprints/blocks/map.yml @@ -1,8 +1,8 @@ name: Carte icon: map fields: - map: + map: label: Choisir la carte type: pages - query: page.parent.parent.children.filterBy('intendedTemplate', 'map') - multiple: false \ No newline at end of file + query: page.children.filterBy('intendedTemplate', 'map') + multiple: false diff --git a/public/site/blueprints/fields/blueprint.yml b/public/site/blueprints/fields/blueprint.yml new file mode 100644 index 0000000..1feb794 --- /dev/null +++ b/public/site/blueprints/fields/blueprint.yml @@ -0,0 +1,2 @@ +type: headline +label: Page "{{ page.blueprint.title }}" diff --git a/public/site/blueprints/pages/geoformat.yml b/public/site/blueprints/pages/geoformat.yml index 1fca6dc..301faa9 100644 --- a/public/site/blueprints/pages/geoformat.yml +++ b/public/site/blueprints/pages/geoformat.yml @@ -1,38 +1,43 @@ title: Géoformat -columns: - main: - width: 2/3 - sections: - fields: - type: fields - fields: - subtitle: - label: Sous-titre - type: text - width: 1/2 - tags: - label: Mots-clés - type: tags - width: 1/2 - cover: - label: Media de couverture - type: files - multiple: false - width: 1/2 - text: - label: Chapeau - type: writer - pages: - label: Chapitres - type: pages - template: chapitre - sidebar: - width: 1/3 - sections: - files: - label: Fichiers - type: files - - +tabs: + contentTab: + columns: + main: + width: 2/3 + sections: + fields: + type: fields + fields: + blueprint: fields/blueprint + subtitle: + label: Sous-titre + type: text + width: 1/2 + tags: + label: Mots-clés + type: tags + width: 1/2 + cover: + label: Media de couverture + type: files + query: page.coverFiles + multiple: false + width: 1/2 + text: + label: Chapeau + type: writer + chapters: + label: Chapitres + type: pages + template: chapter + sidebar: + width: 1/3 + sections: + maps: + label: Cartes + type: pages + template: map + help: Créez des cartes ici avant de pouvoir les ajouter dans un bloc ou en couverture. + filesTab: tabs/files diff --git a/public/site/blueprints/pages/map.yml b/public/site/blueprints/pages/map.yml index 65d6662..6358408 100644 --- a/public/site/blueprints/pages/map.yml +++ b/public/site/blueprints/pages/map.yml @@ -7,6 +7,7 @@ columns: fields: type: fields fields: + blueprint: fields/blueprint tags: label: Mots-clés type: tags diff --git a/public/site/blueprints/pages/narrative.yml b/public/site/blueprints/pages/narrative.yml index ee1cdee..4113291 100644 --- a/public/site/blueprints/pages/narrative.yml +++ b/public/site/blueprints/pages/narrative.yml @@ -1,44 +1,49 @@ -title: Narrative +title: Récit -columns: - main: - width: 2/3 - sections: - fields: - type: fields - fields: - blueprint: - type: headline - label: Page "{{ page.intendedTemplate }}" - author: - label: Auteur·ice(s) - type: text - width: 1/2 - cover: - label: Image de couverture +tabs: + contentTab: + label: Contenu + columns: + main: + width: 2/3 + sections: + fields: + type: fields + fields: + blueprint: fields/blueprint + author: + label: Auteur·ice(s) + type: text + width: 1/2 + cover: + label: Image de couverture + type: files + multiple: false + width: 1/2 + introduction: + label: Introduction + type: writer + parts: + label: Parties + type: pages + template: + - map + - geoformat + info: "{{ page.blueprint.title }}" + sidebar: + width: 1/3 + sections: + files: + label: Fichiers type: files - multiple: false - width: 1/2 - introduction: - label: Introduction - type: writer - customCss: - label: Custom CSS - type: code-editor - language: css - help: Custom CSS styling for this narrative's print view - theme: monokai - size: large - pages: - label: Pages - type: pages - template: - - map - - geoformat - info: "{{ page.intendedTemplate }}" - sidebar: - width: 1/3 - sections: - files: - label: Fichiers - type: files + CSSTab: + label: CSS + icon: brush + fields: + customCss: + label: Custom CSS + type: code-editor + language: css + help: Custom CSS styling for this narrative's print view + theme: monokai + size: large diff --git a/public/site/blueprints/tabs/files.yml b/public/site/blueprints/tabs/files.yml new file mode 100644 index 0000000..be2f551 --- /dev/null +++ b/public/site/blueprints/tabs/files.yml @@ -0,0 +1,15 @@ +label: Fichiers +icon: attachment +columns: + - width: 1/4 + fields: + manageFilesInfo: + label: false + type: info + text: À droite, tous les fichiers que stocke la page. Pensez à supprimer les fichiers inutilisés éviter de surcharger inutilement le serveur. + + - width: 3/4 + sections: + filesSection: + label: Fichiers + type: files