From bb5d12cb36d64c784f320ae8aa6c30071a533998 Mon Sep 17 00:00:00 2001 From: antonin gallon Date: Thu, 12 Feb 2026 15:53:28 +0100 Subject: [PATCH] Mode archive ajouter pour visionner les linear avec l'ancien champs corp plus ajout du nouveau champs corp avec block --- site/blueprints/fields/body.yml | 2 +- site/blueprints/fields/bodyBlocks.yml | 36 +++++++++++++++++++++++++++ site/blueprints/pages/linear.yml | 21 ++++++++++++++-- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 site/blueprints/fields/bodyBlocks.yml diff --git a/site/blueprints/fields/body.yml b/site/blueprints/fields/body.yml index 94ab6af..2305bd1 100644 --- a/site/blueprints/fields/body.yml +++ b/site/blueprints/fields/body.yml @@ -5,4 +5,4 @@ headings: marks: - bold - italic - - link + - link \ No newline at end of file diff --git a/site/blueprints/fields/bodyBlocks.yml b/site/blueprints/fields/bodyBlocks.yml new file mode 100644 index 0000000..de04c35 --- /dev/null +++ b/site/blueprints/fields/bodyBlocks.yml @@ -0,0 +1,36 @@ + label: Corps + type: blocks + default: + - type: heading + content: + level: h2 + fieldsets: + heading: + name: field.blocks.heading.name + icon: title + wysiwyg: true + preview: heading + fields: + level: + label: field.blocks.heading.level + type: toggles + empty: false + default: "h3" + labels: false + options: + - value: h3 + icon: h3 + text: H3 + text: + extends: fields/body + label: false + placeholder: field.blocks.heading.placeholder + text: + name: Texte + icon: text + wysiwyg: true + fields: + text: + extends: fields/body + label: false + image: true diff --git a/site/blueprints/pages/linear.yml b/site/blueprints/pages/linear.yml index e6cf2e5..0fb2d5f 100644 --- a/site/blueprints/pages/linear.yml +++ b/site/blueprints/pages/linear.yml @@ -26,10 +26,27 @@ tabs: label: Chapo extends: fields/body help: optionnel - body: - extends: fields/body + isArchiveMode: + label: Mode archive + type: toggle + width: 1/4 + help: | + Actif : l'ancien champ body sera affiché dans le panel (texte sans médias). Utile pour éditer d'anciens articles uniquement. when: isHtmlMode: false + bodyBlocks: + extends: fields/bodyBlocks + width: 3/4 + when: + isHtmlMode: false + isArchiveMode: false + body: + extends: fields/body + help: Anciens champs conservés pour archive (ne pas remplir pour les nouveaux articles) + width: 3/4 + when: + isHtmlMode: false + isArchiveMode: true htmlBody: label: Corps type: textarea