diff --git a/blog/__init__.py b/blog/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/blog/admin.py b/blog/admin.py new file mode 100644 index 000000000..a3c4a1718 --- /dev/null +++ b/blog/admin.py @@ -0,0 +1,4 @@ +# from django.contrib import admin + + +# Register your models here. diff --git a/blog/apps.py b/blog/apps.py new file mode 100644 index 000000000..6be26c734 --- /dev/null +++ b/blog/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class BlogConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "blog" diff --git a/blog/blocks.py b/blog/blocks.py new file mode 100644 index 000000000..94af0c43a --- /dev/null +++ b/blog/blocks.py @@ -0,0 +1,29 @@ +from django.utils.translation import gettext_lazy as _ +from wagtail import blocks +from wagtail.images.blocks import ImageChooserBlock + +from content_manager.blocks import ImageAndTextBlock, MultiColumnsWithTitleBlock, QuoteBlock + + +class ContactCardBlock(blocks.StructBlock): + name = blocks.CharBlock(label=_("Name"), max_length=255) + role = blocks.CharBlock(label=_("Role"), max_length=255) + organization = blocks.CharBlock(label=_("Organization"), max_length=255) + contact_info = blocks.CharBlock(label=_("Contact info"), max_length=500, required=False) + image = ImageChooserBlock(label="Image") + + class Meta: + icon = "user" + template = ("blog/blocks/contact_card.html",) + + +COLOPHON_BLOCKS = [ + ("paragraph", blocks.RichTextBlock(label=_("Rich text"))), + ( + "imageandtext", + ImageAndTextBlock(label="Bloc image et texte"), + ), + ("quote", QuoteBlock(label="Citation")), + ("multicolumns", MultiColumnsWithTitleBlock(label="Multi-colonnes")), + ("contact_card", ContactCardBlock(label=_("Contact card"))), +] diff --git a/blog/locale/fr/LC_MESSAGES/django.po b/blog/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 000000000..a6d29684a --- /dev/null +++ b/blog/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,191 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-11 17:35+0200\n" +"PO-Revision-Date: 2024-07-11 17:36+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.4.2\n" + +#: blog/blocks.py:9 blog/models.py:348 blog/models.py:365 +msgid "Name" +msgstr "Nom" + +#: blog/blocks.py:10 blog/models.py:366 +msgid "Role" +msgstr "Fonction" + +#: blog/blocks.py:11 blog/models.py:360 +msgid "Organization" +msgstr "Organisation" + +#: blog/blocks.py:12 blog/models.py:368 +msgid "Contact info" +msgstr "Informations de contact" + +#: blog/blocks.py:21 +msgid "Rich text" +msgstr "Texte riche" + +#: blog/blocks.py:28 +msgid "Contact card" +msgstr "Carte contact" + +#: blog/models.py:36 +msgid "Posts per page" +msgstr "Articles par page" + +#: blog/models.py:40 blog/templates/blog/blog_index_page.html:76 +msgid "Filter by category" +msgstr "Filtrer par catégorie" + +#: blog/models.py:41 blog/templates/blog/blog_index_page.html:93 +msgid "Filter by tag" +msgstr "Filtrer par étiquette" + +#: blog/models.py:42 blog/templates/blog/blog_index_page.html:110 +msgid "Filter by author" +msgstr "Filtrer par auteur" + +#: blog/models.py:44 blog/templates/blog/blog_index_page.html:125 +msgid "Filter by source" +msgstr "Filtrer par source" + +#: blog/models.py:44 +msgid "The source is the organization of the post author" +msgstr "La source est l’organisation à laquelle appartient l’auteur de l’article" + +#: blog/models.py:56 +msgid "Show filters" +msgstr "Afficher les filtres" + +#: blog/models.py:63 +msgid "Blog index" +msgstr "Index de blog" + +#: blog/models.py:92 blog/templates/blog/tags_list_page.html:20 +#: blog/views.py:149 +msgid "Tags" +msgstr "Étiquettes" + +#: blog/models.py:97 +#, python-format +msgid "Posts tagged with %(tag)s" +msgstr "Articles avec l’étiquette %(tag)s" + +#: blog/models.py:110 blog/models.py:227 blog/models.py:323 +#: blog/templates/blog/categories_list_page.html:20 blog/views.py:117 +msgid "Categories" +msgstr "Catégories" + +#: blog/models.py:115 +#, python-format +msgid "Posts in category %(category)s" +msgstr "Articles dans la catégorie %(category)s" + +#: blog/models.py:126 blog/models.py:128 blog/models.py:139 blog/models.py:142 +msgid "Posts written by" +msgstr "Articles écrits par" + +#: blog/models.py:146 +#, python-format +msgid "Posts published in %(year)s" +msgstr "Articles publiés en %(year)s" + +#: blog/models.py:229 +msgid "Post date" +msgstr "Date de publication" + +#: blog/models.py:231 +msgid "Author entries can be created in Snippets > Persons" +msgstr "Les auteurs peuvent être créés via Fragments > Personnes" + +#: blog/models.py:250 +msgid "Scheduled publishing" +msgstr "Publication planifiée" + +#: blog/models.py:258 +msgid "Tags and Categories" +msgstr "Étiquettes et Catégories" + +#: blog/models.py:266 +msgid "Blog page" +msgstr "Page de blog" + +#: blog/models.py:271 +msgid "Category name" +msgstr "Nom de la catégorie" + +#: blog/models.py:278 +msgid "Parent category" +msgstr "Catégorie parente" + +#: blog/models.py:285 +msgid "Description" +msgstr "Description" + +#: blog/models.py:286 +msgid "Displayed on the top of the category page" +msgstr "Affiché en haut de la page de la catégorie" + +#: blog/models.py:292 +msgid "Text displayed at the end of every page in the category" +msgstr "Texte affiché à la fin de chaque page de la catégorie" + +#: blog/models.py:303 +msgid "Parent category cannot be self." +msgstr "La catégorie ne peut être sa propre parente." + +#: blog/models.py:305 +msgid "Cannot have circular Parents." +msgstr "Il est impossible d’avoir des parents circulaires." + +#: blog/models.py:322 blog/models.py:334 +msgid "Category" +msgstr "Catégorie" + +#: blog/models.py:385 +msgid "Person" +msgstr "Personne" + +#: blog/templates/blog/blocks/blog_index_posts_list.html:36 +msgid "No article found." +msgstr "Aucun article trouvé." + +#: blog/templates/blog/blog_entry_page.html:75 +msgid "Posted by:" +msgstr "Écrit par :" + +#: blog/templates/blog/blog_index_page.html:71 +#: blog/templates/blog/blog_index_page.html:73 +msgid "Filters" +msgstr "Filtres" + +#, python-format +#~ msgid "Posts written by %(first_name)s %(last_name)s" +#~ msgstr "Articles publiés par %(first_name)s %(last_name)s" + +#, fuzzy +#~| msgid "Author" +#~ msgid "Authors" +#~ msgstr "Auteur" + +#~ msgid "Colophon" +#~ msgstr "Colophon" + +#~ msgid "Header image" +#~ msgstr "Image d’en-tête" + +#~ msgid "body" +#~ msgstr "corps" diff --git a/blog/managers.py b/blog/managers.py new file mode 100644 index 000000000..4c9a1b4da --- /dev/null +++ b/blog/managers.py @@ -0,0 +1,7 @@ +from django.db import models + + +class CategoryManager(models.Manager): + def with_uses(self, blog_page): + entries = blog_page.get_entries() + return self.filter(entrypage__in=entries).distinct() diff --git a/blog/migrations/0001_initial.py b/blog/migrations/0001_initial.py new file mode 100644 index 000000000..d9eb1ac3f --- /dev/null +++ b/blog/migrations/0001_initial.py @@ -0,0 +1,1138 @@ +# Generated by Django 5.0.2 on 2024-02-26 16:41 + +import uuid + +import django.core.validators +import django.db.models.deletion +import django.utils.timezone +import modelcluster.contrib.taggit +import modelcluster.fields +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtail.search.index +import wagtailmarkdown.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + initial = True + + dependencies = [ + ("taggit", "0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx"), + ("wagtailcore", "0091_remove_revision_submitted_for_moderation"), + ("wagtailimages", "0025_alter_image_file_alter_rendition_file"), + ] + + operations = [ + migrations.CreateModel( + name="Tag", + fields=[], + options={ + "proxy": True, + "indexes": [], + "constraints": [], + }, + bases=("taggit.tag",), + ), + migrations.CreateModel( + name="BlogEntryPage", + fields=[ + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ( + "body", + wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock(label="Lien interne", required=False), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False), + ), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Légende", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Titre de l’auteur" + ), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Lien", required=False + ), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Hauteur en pixels" + ), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l’étape"), + ), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ("date", models.DateTimeField(default=django.utils.timezone.now, verbose_name="Post date")), + ( + "header_image", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + verbose_name="Header image", + ), + ), + ], + options={ + "verbose_name": "Blog page", + }, + bases=("wagtailcore.page",), + ), + migrations.CreateModel( + name="BlogIndexPage", + fields=[ + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ( + "body", + wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock(label="Lien interne", required=False), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False), + ), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Légende", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Titre de l’auteur" + ), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Lien", required=False + ), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Hauteur en pixels" + ), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l’étape"), + ), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ( + "posts_per_page", + models.PositiveSmallIntegerField( + default=10, + validators=[ + django.core.validators.MaxValueValidator(100), + django.core.validators.MinValueValidator(1), + ], + verbose_name="Posts per page", + ), + ), + ( + "header_image", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + verbose_name="Header image", + ), + ), + ], + options={ + "verbose_name": "Blog index", + }, + bases=("wagtailcore.page",), + ), + migrations.CreateModel( + name="Category", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("translation_key", models.UUIDField(default=uuid.uuid4, editable=False)), + ("name", models.CharField(max_length=80, unique=True, verbose_name="Category name")), + ("slug", models.SlugField(max_length=80, unique=True)), + ("description", models.CharField(blank=True, max_length=500, verbose_name="Description")), + ( + "locale", + models.ForeignKey( + editable=False, + on_delete=django.db.models.deletion.PROTECT, + related_name="+", + to="wagtailcore.locale", + ), + ), + ( + "parent", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="children", + to="blog.category", + verbose_name="Parent category", + ), + ), + ], + options={ + "verbose_name": "Category", + "verbose_name_plural": "Categories", + "ordering": ["name"], + "unique_together": {("name", "locale"), ("slug", "locale"), ("translation_key", "locale")}, + }, + bases=(wagtail.search.index.Indexed, models.Model), + ), + migrations.CreateModel( + name="CategoryEntryPage", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ( + "category", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="+", + to="blog.category", + verbose_name="Category", + ), + ), + ( + "page", + modelcluster.fields.ParentalKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="entry_categories", + to="blog.blogentrypage", + ), + ), + ], + ), + migrations.AddField( + model_name="blogentrypage", + name="blog_categories", + field=modelcluster.fields.ParentalManyToManyField( + blank=True, null=True, through="blog.CategoryEntryPage", to="blog.category", verbose_name="Categories" + ), + ), + migrations.CreateModel( + name="TagEntryPage", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ( + "content_object", + modelcluster.fields.ParentalKey( + on_delete=django.db.models.deletion.CASCADE, related_name="entry_tags", to="blog.blogentrypage" + ), + ), + ( + "tag", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="%(app_label)s_%(class)s_items", + to="taggit.tag", + ), + ), + ], + options={ + "abstract": False, + }, + ), + migrations.AddField( + model_name="blogentrypage", + name="tags", + field=modelcluster.contrib.taggit.ClusterTaggableManager( + blank=True, + help_text="A comma-separated list of tags.", + through="blog.TagEntryPage", + to="taggit.Tag", + verbose_name="Tags", + ), + ), + ] diff --git a/blog/migrations/0002_alter_blogentrypage_body_alter_blogindexpage_body.py b/blog/migrations/0002_alter_blogentrypage_body_alter_blogindexpage_body.py new file mode 100644 index 000000000..0366e78ef --- /dev/null +++ b/blog/migrations/0002_alter_blogentrypage_body_alter_blogindexpage_body.py @@ -0,0 +1,931 @@ +# Generated by Django 5.0.2 on 2024-02-29 10:24 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + (("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")), + ), + ("Couleurs neutres", (("grey", "Gris"),)), + ( + "Couleurs système", + ( + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ), + ), + ], + help_text="Utilise les couleurs du système de design de l'État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + (("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")), + ), + ("Couleurs neutres", (("grey", "Gris"),)), + ( + "Couleurs système", + ( + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ), + ), + ], + help_text="Utilise les couleurs du système de design de l'État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/blog/migrations/0003_blogentrypage_header_color_class_and_more.py b/blog/migrations/0003_blogentrypage_header_color_class_and_more.py new file mode 100644 index 000000000..bc0b717df --- /dev/null +++ b/blog/migrations/0003_blogentrypage_header_color_class_and_more.py @@ -0,0 +1,1081 @@ +# Generated by Django 5.0.2 on 2024-03-05 15:11 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0002_alter_blogentrypage_body_alter_blogindexpage_body"), + ] + + operations = [ + migrations.AddField( + model_name="blogentrypage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Couleurs primaires", [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")]), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + migrations.AddField( + model_name="blogentrypage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="CTA Button label"), + ), + migrations.AddField( + model_name="blogentrypage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="CTA link"), + ), + migrations.AddField( + model_name="blogentrypage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background"), + ), + migrations.AddField( + model_name="blogentrypage", + name="header_large", + field=models.BooleanField(default=False, verbose_name="Full width"), + ), + migrations.AddField( + model_name="blogentrypage", + name="header_with_title", + field=models.BooleanField(default=False, verbose_name="Show title in header image?"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Couleurs primaires", [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")]), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="CTA Button label"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="CTA link"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_large", + field=models.BooleanField(default=False, verbose_name="Full width"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_with_title", + field=models.BooleanField(default=False, verbose_name="Show title in header image?"), + ), + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/blog/migrations/0004_alter_blogentrypage_body_alter_blogindexpage_body.py b/blog/migrations/0004_alter_blogentrypage_body_alter_blogindexpage_body.py new file mode 100644 index 000000000..1e1bfdb39 --- /dev/null +++ b/blog/migrations/0004_alter_blogentrypage_body_alter_blogindexpage_body.py @@ -0,0 +1,957 @@ +# Generated by Django 5.0.2 on 2024-03-05 15:56 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0003_blogentrypage_header_color_class_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/blog/migrations/0005_delete_tag_blogentrypage_header_cta_text_and_more.py b/blog/migrations/0005_delete_tag_blogentrypage_header_cta_text_and_more.py new file mode 100644 index 000000000..d82096458 --- /dev/null +++ b/blog/migrations/0005_delete_tag_blogentrypage_header_cta_text_and_more.py @@ -0,0 +1,63 @@ +# Generated by Django 5.0.2 on 2024-03-05 18:04 + +import modelcluster.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0004_alter_blogentrypage_body_alter_blogindexpage_body"), + ] + + operations = [ + migrations.DeleteModel( + name="Tag", + ), + migrations.AddField( + model_name="blogentrypage", + name="header_cta_text", + field=models.CharField(blank=True, null=True, verbose_name="Call to action text"), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_cta_text", + field=models.CharField(blank=True, null=True, verbose_name="Call to action text"), + ), + migrations.AlterField( + model_name="blogentrypage", + name="blog_categories", + field=modelcluster.fields.ParentalManyToManyField( + blank=True, through="blog.CategoryEntryPage", to="blog.category", verbose_name="Categories" + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="Call to action label"), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="Call to action link"), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background image"), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="Call to action label"), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="Call to action link"), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background image"), + ), + ] diff --git a/blog/migrations/0006_category_colophon_alter_blogentrypage_body_and_more.py b/blog/migrations/0006_category_colophon_alter_blogentrypage_body_and_more.py new file mode 100644 index 000000000..c2c779628 --- /dev/null +++ b/blog/migrations/0006_category_colophon_alter_blogentrypage_body_and_more.py @@ -0,0 +1,1313 @@ +# Generated by Django 5.0.3 on 2024-03-27 13:33 + +import django.db.models.deletion +import modelcluster.fields +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0005_delete_tag_blogentrypage_header_cta_text_and_more"), + ("wagtailimages", "0025_alter_image_file_alter_rendition_file"), + ] + + operations = [ + migrations.AddField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en avant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en avant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="description", + field=models.CharField( + blank=True, + help_text="Displayed on the top of the category page", + max_length=500, + verbose_name="Description", + ), + ), + migrations.CreateModel( + name="Person", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("name", models.CharField(max_length=255, verbose_name="Name")), + ("role", models.CharField(max_length=255, verbose_name="Role")), + ("organization", models.CharField(max_length=255, verbose_name="Organization")), + ("contact_info", models.CharField(blank=True, max_length=500, verbose_name="Contact info")), + ( + "image", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + ), + ), + ], + options={ + "verbose_name": "Person", + }, + ), + migrations.AddField( + model_name="blogentrypage", + name="authors", + field=modelcluster.fields.ParentalManyToManyField( + blank=True, help_text="Author entries can be created in Snippets > Persons", to="blog.person" + ), + ), + ] diff --git a/blog/migrations/0007_alter_blogentrypage_body_and_more.py b/blog/migrations/0007_alter_blogentrypage_body_and_more.py new file mode 100644 index 000000000..dd9f6fa6e --- /dev/null +++ b/blog/migrations/0007_alter_blogentrypage_body_and_more.py @@ -0,0 +1,1671 @@ +# Generated by Django 5.0.4 on 2024-04-18 12:35 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0006_category_colophon_alter_blogentrypage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title")), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Card", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock(label="Author title"), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ], + label="Multiple columns", + ), + ), + ], + label="Multiple columns", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Primary colors", [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")]), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title")), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Card", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock(label="Author title"), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ], + label="Multiple columns", + ), + ), + ], + label="Multiple columns", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Primary colors", [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")]), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title")), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Card", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock(label="Author title"), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ], + label="Multiple columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0008_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0008_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..8dcd9b8e7 --- /dev/null +++ b/blog/migrations/0008_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,2509 @@ +# Generated by Django 5.0.4 on 2024-04-22 13:34 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0007_alter_blogentrypage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(This field is obsolete and will be removed in the near future. Replace it with the background picture)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(This field is obsolete and will be removed in the near future. Replace it with the background picture)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(This field is obsolete and will be removed in the near future. Replace it with the background picture)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0009_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0009_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..1354ea225 --- /dev/null +++ b/blog/migrations/0009_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,6630 @@ +# Generated by Django 5.0.6 on 2024-05-23 15:04 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0008_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0010_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0010_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..1712fc494 --- /dev/null +++ b/blog/migrations/0010_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,7338 @@ +# Generated by Django 5.0.6 on 2024-05-28 16:13 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0009_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0011_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0011_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..0d0349c9a --- /dev/null +++ b/blog/migrations/0011_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,7338 @@ +# Generated by Django 5.0.6 on 2024-05-29 10:02 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0010_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0012_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0012_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..861f8c415 --- /dev/null +++ b/blog/migrations/0012_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,8492 @@ +# Generated by Django 5.0.6 on 2024-05-30 15:30 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0011_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0013_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0013_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..b2c10be0e --- /dev/null +++ b/blog/migrations/0013_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,12104 @@ +# Generated by Django 5.0.6 on 2024-06-03 10:37 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0012_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0014_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0014_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..1873a9fe9 --- /dev/null +++ b/blog/migrations/0014_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,16081 @@ +# Generated by Django 5.0.6 on 2024-06-04 12:08 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0013_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0015_alter_blogentrypage_body_alter_blogindexpage_body.py b/blog/migrations/0015_alter_blogentrypage_body_alter_blogindexpage_body.py new file mode 100644 index 000000000..8d37c0525 --- /dev/null +++ b/blog/migrations/0015_alter_blogentrypage_body_alter_blogindexpage_body.py @@ -0,0 +1,12701 @@ +# Generated by Django 5.0.6 on 2024-06-04 15:02 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0014_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/blog/migrations/0016_alter_blogentrypage_body_alter_blogindexpage_body.py b/blog/migrations/0016_alter_blogentrypage_body_alter_blogindexpage_body.py new file mode 100644 index 000000000..14c132aaa --- /dev/null +++ b/blog/migrations/0016_alter_blogentrypage_body_alter_blogindexpage_body.py @@ -0,0 +1,12720 @@ +# Generated by Django 5.0.6 on 2024-06-05 15:29 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0015_alter_blogentrypage_body_alter_blogindexpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..1cb211fec --- /dev/null +++ b/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,18414 @@ +# Generated by Django 5.0.6 on 2024-06-17 10:22 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0016_alter_blogentrypage_body_alter_blogindexpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0018_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0018_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..24eefc30f --- /dev/null +++ b/blog/migrations/0018_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,18494 @@ +# Generated by Django 5.0.6 on 2024-06-17 15:46 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0019_merge_20240618_1446.py b/blog/migrations/0019_merge_20240618_1446.py new file mode 100644 index 000000000..fddd37fd7 --- /dev/null +++ b/blog/migrations/0019_merge_20240618_1446.py @@ -0,0 +1,11 @@ +# Generated by Django 5.0.6 on 2024-06-18 12:57 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0018_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [] diff --git a/blog/migrations/0020_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0020_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..d34a2bb39 --- /dev/null +++ b/blog/migrations/0020_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,18462 @@ +# Generated by Django 5.0.6 on 2024-07-01 14:59 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0019_merge_20240618_1446"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0021_blogentrypage_header_cta_buttons_and_more.py b/blog/migrations/0021_blogentrypage_header_cta_buttons_and_more.py new file mode 100644 index 000000000..924b115cb --- /dev/null +++ b/blog/migrations/0021_blogentrypage_header_cta_buttons_and_more.py @@ -0,0 +1,19973 @@ +# Generated by Django 5.0.6 on 2024-07-03 09:03 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0020_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="blogentrypage", + name="header_cta_buttons", + field=wagtail.fields.StreamField( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + blank=True, + null=True, + ), + ), + migrations.AddField( + model_name="blogindexpage", + name="header_cta_buttons", + field=wagtail.fields.StreamField( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + blank=True, + null=True, + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_cta_label", + field=models.CharField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action label", + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_cta_link", + field=models.URLField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action link", + ), + ), + migrations.AlterField( + model_name="blogentrypage", + name="header_cta_text", + field=wagtail.fields.RichTextField(blank=True, null=True, verbose_name="Call to action text"), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_cta_label", + field=models.CharField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action label", + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_cta_link", + field=models.URLField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action link", + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="header_cta_text", + field=wagtail.fields.RichTextField(blank=True, null=True, verbose_name="Call to action text"), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/0022_blogindexpage_filter_by_author_and_more.py b/blog/migrations/0022_blogindexpage_filter_by_author_and_more.py new file mode 100644 index 000000000..0da2dbc24 --- /dev/null +++ b/blog/migrations/0022_blogindexpage_filter_by_author_and_more.py @@ -0,0 +1,47 @@ +# Generated by Django 5.0.6 on 2024-07-04 10:09 + +import wagtail.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0021_blogentrypage_header_cta_buttons_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="blogindexpage", + name="filter_by_author", + field=models.BooleanField(default=False, verbose_name="Filter by author"), + ), + migrations.AddField( + model_name="blogindexpage", + name="filter_by_category", + field=models.BooleanField(default=True, verbose_name="Filter by category"), + ), + migrations.AddField( + model_name="blogindexpage", + name="filter_by_source", + field=models.BooleanField( + default=False, + help_text="The source is the organization of the post author", + verbose_name="Filter by source", + ), + ), + migrations.AddField( + model_name="blogindexpage", + name="filter_by_tag", + field=models.BooleanField(default=True, verbose_name="Filter by tag"), + ), + migrations.AlterField( + model_name="category", + name="description", + field=wagtail.fields.RichTextField( + blank=True, + help_text="Displayed on the top of the category page", + max_length=500, + verbose_name="Description", + ), + ), + ] diff --git a/blog/migrations/0023_organization_person_organization_item.py b/blog/migrations/0023_organization_person_organization_item.py new file mode 100644 index 000000000..c6c5a17df --- /dev/null +++ b/blog/migrations/0023_organization_person_organization_item.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.6 on 2024-07-08 15:15 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0022_blogindexpage_filter_by_author_and_more"), + ] + + operations = [ + migrations.CreateModel( + name="Organization", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("name", models.CharField(max_length=255, verbose_name="Name")), + ("slug", models.SlugField(max_length=80)), + ], + ), + migrations.AddField( + model_name="person", + name="organization_item", + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to="blog.organization"), + ), + ] diff --git a/blog/migrations/0024_transfer_organizations.py b/blog/migrations/0024_transfer_organizations.py new file mode 100644 index 000000000..95c4dd008 --- /dev/null +++ b/blog/migrations/0024_transfer_organizations.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.6 on 2024-07-08 15:17 + +from django.db import migrations +from django.utils.text import slugify + + +def link_organizations(apps, schema_editor): + Person = apps.get_model("blog", "Person") + Organization = apps.get_model("blog", "Organization") + for person in Person.objects.all(): + if person.organization: + organization, _created = Organization.objects.get_or_create( + name=person.organization, slug=slugify(person.organization) + ) + person.organization_item = organization + person.save() + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0023_organization_person_organization_item"), + ] + + operations = [ + migrations.RunPython(link_organizations), + ] diff --git a/blog/migrations/0025_remove_person_organization.py b/blog/migrations/0025_remove_person_organization.py new file mode 100644 index 000000000..2d236f29c --- /dev/null +++ b/blog/migrations/0025_remove_person_organization.py @@ -0,0 +1,16 @@ +# Generated by Django 5.0.6 on 2024-07-08 15:52 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0024_transfer_organizations"), + ] + + operations = [ + migrations.RemoveField( + model_name="person", + name="organization", + ), + ] diff --git a/blog/migrations/0026_alter_organization_options.py b/blog/migrations/0026_alter_organization_options.py new file mode 100644 index 000000000..a5a7f7c1b --- /dev/null +++ b/blog/migrations/0026_alter_organization_options.py @@ -0,0 +1,16 @@ +# Generated by Django 5.0.6 on 2024-07-08 15:57 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0025_remove_person_organization"), + ] + + operations = [ + migrations.AlterModelOptions( + name="organization", + options={"verbose_name": "Organization"}, + ), + ] diff --git a/blog/migrations/0027_rename_organization_item_person_organization.py b/blog/migrations/0027_rename_organization_item_person_organization.py new file mode 100644 index 000000000..6b9d129ce --- /dev/null +++ b/blog/migrations/0027_rename_organization_item_person_organization.py @@ -0,0 +1,17 @@ +# Generated by Django 5.0.6 on 2024-07-08 16:16 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0026_alter_organization_options"), + ] + + operations = [ + migrations.RenameField( + model_name="person", + old_name="organization_item", + new_name="organization", + ), + ] diff --git a/blog/migrations/0028_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0028_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 000000000..5ff846a85 --- /dev/null +++ b/blog/migrations/0028_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,20557 @@ +# Generated by Django 5.0.6 on 2024-07-11 15:37 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtail.snippets.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0027_rename_organization_item_person_organization"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", + page_type=[ + "blog.BlogIndexPage" + ], + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", + label="Filter by author", + required=False, + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, + label="Show filters", + required=False, + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock(label="Blog", page_type=["blog.BlogIndexPage"]), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, label="Number of entries", max_value=8, min_value=1, required=False + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", label="Filter by category", required=False + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", label="Filter by tag", required=False + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock(default=False, label="Show filters", required=False), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", + page_type=[ + "blog.BlogIndexPage" + ], + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", + label="Filter by author", + required=False, + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, + label="Show filters", + required=False, + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock(label="Blog", page_type=["blog.BlogIndexPage"]), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, label="Number of entries", max_value=8, min_value=1, required=False + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", label="Filter by category", required=False + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", label="Filter by tag", required=False + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock(default=False, label="Show filters", required=False), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Bloc image et texte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Citation", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", + page_type=[ + "blog.BlogIndexPage" + ], + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", + label="Filter by author", + required=False, + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, + label="Show filters", + required=False, + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "contact_card", + wagtail.blocks.StructBlock( + [ + ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), + ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), + ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), + ( + "contact_info", + wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ], + label="Contact card", + ), + ), + ], + blank=True, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/blog/migrations/__init__.py b/blog/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/blog/models.py b/blog/models.py new file mode 100644 index 000000000..76c7ecfb3 --- /dev/null +++ b/blog/models.py @@ -0,0 +1,386 @@ +from django.contrib.auth import get_user_model +from django.core.exceptions import ValidationError +from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator +from django.core.validators import MaxValueValidator, MinValueValidator +from django.db import models +from django.db.models import BooleanField, Count, QuerySet +from django.db.models.expressions import F +from django.shortcuts import get_object_or_404 +from django.template.defaultfilters import slugify +from django.urls import reverse +from django.utils import timezone +from django.utils.translation import get_language, gettext_lazy as _ +from modelcluster.fields import ParentalKey, ParentalManyToManyField +from modelcluster.tags import ClusterTaggableManager +from taggit.models import TaggedItemBase +from wagtail.admin.panels import FieldPanel, FieldRowPanel, MultiFieldPanel, TitleFieldPanel +from wagtail.admin.widgets.slug import SlugInput +from wagtail.fields import RichTextField, StreamField +from wagtail.models.i18n import Locale, TranslatableMixin +from wagtail.search import index +from wagtail.snippets.models import register_snippet + +from blog.blocks import COLOPHON_BLOCKS +from blog.managers import CategoryManager +from content_manager.abstract import SitesFacilesBasePage +from content_manager.constants import LIMITED_RICHTEXTFIELD_FEATURES +from content_manager.models import Tag + + +User = get_user_model() + + +class BlogIndexPage(SitesFacilesBasePage): + posts_per_page = models.PositiveSmallIntegerField( + default=10, + validators=[MaxValueValidator(100), MinValueValidator(1)], + verbose_name=_("Posts per page"), + ) + + # Filters + filter_by_category = models.BooleanField(_("Filter by category"), default=True) + filter_by_tag = models.BooleanField(_("Filter by tag"), default=True) + filter_by_author = models.BooleanField(_("Filter by author"), default=False) + filter_by_source = models.BooleanField( + _("Filter by source"), help_text=_("The source is the organization of the post author"), default=False + ) + + settings_panels = SitesFacilesBasePage.settings_panels + [ + FieldPanel("posts_per_page"), + MultiFieldPanel( + [ + FieldPanel("filter_by_category"), + FieldPanel("filter_by_tag"), + FieldPanel("filter_by_author"), + FieldPanel("filter_by_source"), + ], + heading=_("Show filters"), + ), + ] + + subpage_types = ["blog.BlogEntryPage"] + + class Meta: + verbose_name = _("Blog index") + + @property + def posts(self): + # Get list of blog pages that are descendants of this page + posts = BlogEntryPage.objects.descendant_of(self).live() + posts = ( + posts.order_by("-date").select_related("owner").prefetch_related("tags", "blog_categories", "date__year") + ) + return posts + + def get_context(self, request, tag=None, category=None, author=None, source=None, year=None, *args, **kwargs): + context = super(BlogIndexPage, self).get_context(request, *args, **kwargs) + posts = self.posts + locale = Locale.objects.get(language_code=get_language()) + + breadcrumb = None + extra_title = "" + + if tag is None: + tag = request.GET.get("tag") + if tag: + tag = get_object_or_404(Tag, slug=tag) + posts = posts.filter(tags=tag) + breadcrumb = { + "links": [ + {"url": self.get_url(), "title": self.title}, + { + "url": reverse("blog:tags_list", kwargs={"blog_slug": self.slug}), + "title": _("Tags"), + }, + ], + "current": tag, + } + extra_title = _("Posts tagged with %(tag)s") % {"tag": tag} + + if category is None: + category = request.GET.get("category") + if category: + category = get_object_or_404(Category, slug=category, locale=locale) + posts = posts.filter(blog_categories=category) + + breadcrumb = { + "links": [ + {"url": self.get_url(), "title": self.title}, + { + "url": reverse("blog:categories_list", kwargs={"blog_slug": self.slug}), + "title": _("Categories"), + }, + ], + "current": category.name, + } + extra_title = _("Posts in category %(category)s") % {"category": category.name} + + if source is None: + source = request.GET.get("source") + if source: + source = get_object_or_404(Organization, slug=source) + posts = posts.filter(authors__organization=source) + breadcrumb = { + "links": [ + {"url": self.get_url(), "title": self.title}, + ], + "current": _("Posts written by") + f" {source.name}", + } + extra_title = _("Posts written by") + f" {source.name}" + + if author is None: + author = request.GET.get("author") + if author: + author = get_object_or_404(Person, id=author) + + breadcrumb = { + "links": [ + {"url": self.get_url(), "title": self.title}, + ], + "current": _("Posts written by") + f" {author.name}", + } + posts = posts.filter(authors=author) + extra_title = _("Posts written by") + f" {author.name}" + + if year: + posts = posts.filter(date__year=year) + extra_title = _("Posts published in %(year)s") % {"year": year} + + # Pagination + page = request.GET.get("page") + page_size = self.posts_per_page + + paginator = Paginator(posts, page_size) # Show posts per page + try: + posts = paginator.page(page) + except PageNotAnInteger: + posts = paginator.page(1) + except EmptyPage: + posts = paginator.page(paginator.num_pages) + + context["posts"] = posts + context["current_category"] = category + context["current_tag"] = tag + context["current_source"] = source + context["current_author"] = author + context["year"] = year + context["paginator"] = paginator + context["extra_title"] = extra_title + + # Filters + context["categories"] = self.get_categories() + context["authors"] = self.get_authors() + context["sources"] = self.get_sources() + context["tags"] = self.get_tags() + + if breadcrumb: + context["breadcrumb"] = breadcrumb + + return context + + def get_authors(self) -> QuerySet: + ids = self.posts.specific().values_list("authors", flat=True) + return Person.objects.filter(id__in=ids).order_by("name") + + def get_categories(self) -> QuerySet: + ids = self.posts.specific().values_list("blog_categories", flat=True) + return Category.objects.filter(id__in=ids).order_by("name") + + def get_sources(self) -> QuerySet: + ids = self.posts.specific().values_list("authors__organization", flat=True) + return Organization.objects.filter(id__in=ids).order_by("name") + + def get_tags(self) -> QuerySet: + ids = self.posts.specific().values_list("tags", flat=True) + return Tag.objects.filter(id__in=ids).order_by("name") + + def list_categories(self) -> list: + posts = self.posts.specific() + return ( + posts.values( + cat_slug=F("blog_categories__slug"), + cat_name=F("blog_categories__name"), + ) + .annotate(cat_count=Count("cat_slug")) + .filter(cat_count__gte=1) + .order_by("-cat_count") + ) + + def list_tags(self, min_count: int = 1) -> list: + posts = self.posts.specific() + return ( + posts.values(tag_name=F("tags__name"), tag_slug=F("tags__slug")) + .annotate(tag_count=Count("tag_slug")) + .filter(tag_count__gte=min_count) + .order_by("-tag_count") + ) + + def show_filters(self) -> bool | BooleanField: + return self.filter_by_category or self.filter_by_tag or self.filter_by_author or self.filter_by_source + + +class BlogEntryPage(SitesFacilesBasePage): + tags = ClusterTaggableManager(through="TagEntryPage", blank=True) + blog_categories = ParentalManyToManyField( + "Category", + through="CategoryEntryPage", + blank=True, + verbose_name=_("Categories"), + ) + date = models.DateTimeField(verbose_name=_("Post date"), default=timezone.now) + authors = ParentalManyToManyField( + "blog.Person", blank=True, help_text=_("Author entries can be created in Snippets > Persons") + ) + + parent_page_types = ["blog.BlogIndexPage"] + subpage_types = [] + + settings_panels = SitesFacilesBasePage.settings_panels + [ + FieldPanel("authors"), + FieldPanel("date"), + MultiFieldPanel( + [ + FieldRowPanel( + [ + FieldPanel("go_live_at"), + FieldPanel("expire_at"), + ], + classname="label-above", + ), + ], + _("Scheduled publishing"), + classname="publishing", + ), + MultiFieldPanel( + [ + FieldPanel("blog_categories"), + FieldPanel("tags"), + ], + heading=_("Tags and Categories"), + ), + ] + + def get_absolute_url(self): + return self.url + + class Meta: + verbose_name = _("Blog page") + + +@register_snippet +class Category(TranslatableMixin, index.Indexed, models.Model): + name = models.CharField(max_length=80, unique=True, verbose_name=_("Category name")) + slug = models.SlugField(unique=True, max_length=80) + parent = models.ForeignKey( + "self", + blank=True, + null=True, + related_name="children", + verbose_name=_("Parent category"), + on_delete=models.SET_NULL, + ) + description = RichTextField( + max_length=500, + features=LIMITED_RICHTEXTFIELD_FEATURES, + blank=True, + verbose_name=_("Description"), + help_text=_("Displayed on the top of the category page"), + ) + colophon = StreamField( + COLOPHON_BLOCKS, + blank=True, + use_json_field=True, + help_text=_("Text displayed at the end of every page in the category"), + ) + objects = CategoryManager() + + def __str__(self): + return self.name + + def clean(self): + if self.parent: + parent = self.parent + if self.parent == self: + raise ValidationError(_("Parent category cannot be self.")) + if parent.parent and parent.parent == self: + raise ValidationError(_("Cannot have circular Parents.")) + + def save(self, *args, **kwargs): + if not self.slug: + self.slug = slugify(self.name) + return super(Category, self).save(*args, **kwargs) + + panels = [ + TitleFieldPanel("name"), + FieldPanel("slug", widget=SlugInput), + FieldPanel("description"), + FieldPanel("colophon"), + FieldPanel("parent"), + ] + + class Meta: + ordering = ["name"] + verbose_name = _("Category") + verbose_name_plural = _("Categories") + unique_together = [ + ("translation_key", "locale"), + ("name", "locale"), + ("slug", "locale"), + ] + + search_fields = [index.SearchField("name")] + + +class CategoryEntryPage(models.Model): + category = models.ForeignKey(Category, related_name="+", verbose_name=_("Category"), on_delete=models.CASCADE) + page = ParentalKey("BlogEntryPage", related_name="entry_categories") + panels = [FieldPanel("category")] + + def __str__(self): + return self.category + + +class TagEntryPage(TaggedItemBase): + content_object = ParentalKey("BlogEntryPage", related_name="entry_tags") + + +@register_snippet +class Organization(models.Model): + name = models.CharField(_("Name"), max_length=255) + slug = models.SlugField(max_length=80) + + panels = [ + TitleFieldPanel("name"), + FieldPanel("slug", widget=SlugInput), + ] + + def __str__(self): + return self.name + + class Meta: + verbose_name = _("Organization") + + +@register_snippet +class Person(models.Model): + name = models.CharField(_("Name"), max_length=255) + role = models.CharField(_("Role"), max_length=255) + organization = models.ForeignKey("Organization", null=True, on_delete=models.SET_NULL) + contact_info = models.CharField(_("Contact info"), max_length=500, blank=True) + image = models.ForeignKey( + "wagtailimages.Image", null=True, blank=True, on_delete=models.SET_NULL, related_name="+" + ) + + panels = [ + FieldPanel("name"), + FieldPanel("role"), + FieldPanel("organization"), + FieldPanel("contact_info"), + FieldPanel("image"), + ] + + def __str__(self): + return self.name + + class Meta: + verbose_name = _("Person") diff --git a/blog/templates/blog/blocks/blog_index_posts_list.html b/blog/templates/blog/blocks/blog_index_posts_list.html new file mode 100644 index 000000000..9cb29a16b --- /dev/null +++ b/blog/templates/blog/blocks/blog_index_posts_list.html @@ -0,0 +1,37 @@ +{% load i18n %} +{% for post in posts %} +
+ +
+{% empty %} +

{% translate "No article found." %}

+{% endfor %} diff --git a/blog/templates/blog/blocks/contact_card.html b/blog/templates/blog/blocks/contact_card.html new file mode 100644 index 000000000..b3d27e520 --- /dev/null +++ b/blog/templates/blog/blocks/contact_card.html @@ -0,0 +1,31 @@ +{% load wagtailimages_tags %} +{# Uses value instead of block.value because it is also used #} +{# to display Person items #} +
+
+
+
+
+

{{ value.name }}

+

{{ value.role }} – {{ value.organization }}

+ {% if value.contact_info %} +
+

{{ value.contact_info }}

+
+ {% endif %} +
+
+
+
+ {% image value.image fill-200x200 as contact_image %} + +
+
+
+ +
+
diff --git a/blog/templates/blog/blog_entry_page.html b/blog/templates/blog/blog_entry_page.html new file mode 100644 index 000000000..ad84a8b25 --- /dev/null +++ b/blog/templates/blog/blog_entry_page.html @@ -0,0 +1,101 @@ +{% extends "base.html" %} + +{% load i18n static dsfr_tags wagtailcore_tags wagtailimages_tags %} + +{% block title %} + {{ page.seo_title|default:page.title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% if page.search_description %} + {% block description %} + + {% endblock description %} +{% endif %} + +{% block social_media %} + + + + + + + + {% if page.get_translations.live %} + {% for translation in page.get_translations.live %} + + {% endfor %} + {% endif %} + + + + + {% if page.header_image %} + + {% image page.header_image fill-1200x627 as header_image %} + + + {% else %} + + {% endif %} +{% endblock social_media %} + +{% block content %} + {% include "content_manager/blocks/heading.html" %} + {% include "content_manager/blocks/messages.html" %} + + {% with categories=page.blog_categories.all %} + +
+
+
+ {% include "content_manager/blocks/breadcrumbs.html" %} +

{{ page.title }}

+
+
+

+ Publié le {{ page.date |date:'l j F Y' }} + {% if categories %} + | + {% for category in categories %} + {{ category.name }} + {% if not forloop.last %},{% endif %} + {% endfor %} + {% endif %} +

+
+ + {% include "content_manager/blocks/blocks_stream.html" with stream=page.body %} + + {% with authors=page.authors.all %} + {% if authors %} +
+

{% translate "Posted by:" %}

+
+ {% for author in authors %} + {% include "blog/blocks/contact_card.html" with value=author %} + {% endfor %} +
+
+ + {% endif %} + {% endwith %} + + {% if categories %} + {% for category in categories %} + {% include "content_manager/blocks/blocks_stream.html" with stream=category.colophon %} + {% endfor %} + {% endif %} + {% endwith %} + +
+ {% for tag in page.tags.all|dictsort:"slug" %} + {{ tag }} + {% endfor %} +
+ +{% endblock content %} diff --git a/blog/templates/blog/blog_index_page.html b/blog/templates/blog/blog_index_page.html new file mode 100644 index 000000000..ef80dc2e9 --- /dev/null +++ b/blog/templates/blog/blog_index_page.html @@ -0,0 +1,156 @@ +{% extends "base.html" %} +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags wagtail_dsfr_tags i18n %} + +{% block title %} + {{ page.seo_title|default:page.title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% if page.search_description %} + {% block description %} + + {% endblock description %} +{% endif %} + +{% block social_media %} + + + + + + + + {% if page.get_translations.live %} + {% for translation in page.get_translations.live %} + + {% endfor %} + {% endif %} + + + + + {% if page.header_image %} + + {% image page.header_image fill-1200x627 as header_image %} + + + {% else %} + + {% endif %} +{% endblock social_media %} + +{% block content %} + {% include "content_manager/blocks/heading.html" %} + {% include "content_manager/blocks/messages.html" %} + +
+ {% include "content_manager/blocks/breadcrumbs.html" %} + {% if not page.header_with_title %} +

+ {{ page.title }} + {% if extra_title %}: {{ extra_title }}{% endif %} +

+ {% endif %} + + {% if current_category.description %} + {{ current_category.description|richtext }} + {% else %} + {{ page.body }} + {% endif %} + + {% if page.show_filters %} +
+
+ +
+ +
+
{% include "blog/blocks/blog_index_posts_list.html" %}
+ {% if posts.paginator.num_pages > 1 %} +
{% dsfr_pagination posts %}
+ {% endif %} +
+ {% else %} +
{% include "blog/blocks/blog_index_posts_list.html" %}
+ {% if posts.paginator.num_pages > 1 %} +
{% dsfr_pagination posts %}
+ {% endif %} + {% endif %} +
+
+{% endblock content %} diff --git a/blog/templates/blog/categories_list_page.html b/blog/templates/blog/categories_list_page.html new file mode 100644 index 000000000..1f4ed067e --- /dev/null +++ b/blog/templates/blog/categories_list_page.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags i18n %} + +{% block title %} + {{ page.seo_title|default:page.title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% if page.search_description %} + {% block description %} + + {% endblock description %} +{% endif %} + +{% block content %} + {% include "content_manager/blocks/messages.html" %} + +
+ {% dsfr_breadcrumb breadcrumb %} +

{% translate "Categories" %}

+ +
+ +{% endblock content %} diff --git a/blog/templates/blog/tags_list_page.html b/blog/templates/blog/tags_list_page.html new file mode 100644 index 000000000..fe9ab7420 --- /dev/null +++ b/blog/templates/blog/tags_list_page.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags i18n %} + +{% block title %} + {{ page.seo_title|default:page.title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% if page.search_description %} + {% block description %} + + {% endblock description %} +{% endif %} + +{% block content %} + {% include "content_manager/blocks/messages.html" %} + +
+ {% dsfr_breadcrumb breadcrumb %} +

{% translate "Tags" %}

+ + +
+ {% for first_letter in sorted_tags.keys|dictsort:0 %} + {{ first_letter }} + {% endfor %} +
+ + {% for first_letter, tags in sorted_tags.items|dictsort:0 %} +

{{ first_letter }}

+ + {% endfor %} +
+ +{% endblock content %} diff --git a/blog/tests.py b/blog/tests.py new file mode 100644 index 000000000..d2b618f3f --- /dev/null +++ b/blog/tests.py @@ -0,0 +1,4 @@ +# from django.test import TestCase + + +# Create your tests here. diff --git a/blog/urls.py b/blog/urls.py new file mode 100644 index 000000000..bd2e0c755 --- /dev/null +++ b/blog/urls.py @@ -0,0 +1,30 @@ +from django.urls.conf import path + +from blog import views + + +app_name = "blog" + +urlpatterns = [ + path( + "/categories//feed/", + views.LatestCategoryFeed(), + name="category_feed", + ), + path("/categories/", views.CategoriesListView.as_view(), name="categories_list"), + path("/categories//", views.category_view, name="category"), + path("/tags//", views.tag_view, name="tag"), + path("/tags/", views.TagsListView.as_view(), name="tags_list"), + path("/authors//", views.author_view, name="author"), + path("/archives//", views.year_view, name="archive_year"), + path( + "/rss/", + views.LatestEntriesFeed(), + name="latest_entries_feed", + ), + path( + "/atom/", + views.LatestEntriesFeedAtom(), + name="latest_entries_feed_atom", + ), +] diff --git a/blog/utils.py b/blog/utils.py new file mode 100644 index 000000000..e69de29bb diff --git a/blog/views.py b/blog/views.py new file mode 100644 index 000000000..17160e2cb --- /dev/null +++ b/blog/views.py @@ -0,0 +1,155 @@ +from django.contrib.syndication.views import Feed +from django.shortcuts import get_object_or_404 +from django.utils.feedgenerator import Atom1Feed +from django.utils.translation import get_language, gettext_lazy as _ +from django.views.generic import TemplateView +from unidecode import unidecode +from wagtail.models.i18n import Locale + +from blog.models import BlogEntryPage, BlogIndexPage, Category + + +def get_localized_index(slug): + locale = Locale.objects.get(language_code=get_language()) + return get_object_or_404(BlogIndexPage, locale=locale, slug=slug) + + +def tag_view(request, blog_slug, tag): + index = get_localized_index(blog_slug) + return index.serve(request, tag=tag) + + +def category_view(request, blog_slug, category): + index = get_localized_index(blog_slug) + return index.serve(request, category=category) + + +def author_view(request, blog_slug, author_id): + index = get_localized_index(blog_slug) + return index.serve(request, author=author_id) + + +def year_view(request, blog_slug, year): + index = get_localized_index(blog_slug) + return index.serve(request, year=year) + + +class LatestEntriesFeed(Feed): + """ + If a URL ends with "rss" try to find a matching BlogIndexPage + and return its items. + """ + + def get_object(self, request, *args, **kwargs): + blog_slug = kwargs.pop("blog_slug") + return get_object_or_404(BlogIndexPage, slug=blog_slug) + + def title(self, blog): + if blog.seo_title: # pragma: no cover + return blog.seo_title + return blog.title + + def link(self, blog): + return blog.full_url + + def description(self, blog): + return blog.search_description + + def items(self, blog): + return blog.get_descendants().order_by("-first_published_at")[:10] + + def item_title(self, item): + return item.title + + def item_description(self, item): + return item.specific.body + + def item_link(self, item): + return item.full_url + + def item_pubdate(self, blog): + return blog.first_published_at + + +class LatestEntriesFeedAtom(LatestEntriesFeed): + feed_type = Atom1Feed + + +class LatestCategoryFeed(Feed): + description = "A Blog" + + def title(self, category): + return "Blog: " + category.name + + def link(self, category): + return "/blog/category/" + category.slug + + def get_object(self, request, *args, **kwargs): + category = kwargs.pop("category") + return get_object_or_404(Category, slug=category) + + def items(self, obj): + return BlogEntryPage.objects.filter(blog_categories=obj).order_by("-date")[:5] + + def item_title(self, item): + return item.title + + def item_description(self, item): + return item.body + + +class CategoriesListView(TemplateView): + template_name = "blog/categories_list_page.html" + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + categories = [] + blog_slug = kwargs.get("blog_slug") + blog_index = get_localized_index(blog_slug) + if blog_index: + categories = blog_index.list_categories() + + breadcrumb = { + "links": [ + {"url": blog_index.get_url(), "title": blog_index.title}, + ], + "current": _("Categories"), + } + + context["categories"] = categories + context["page"] = blog_index + context["breadcrumb"] = breadcrumb + return context + + +class TagsListView(TemplateView): + template_name = "blog/tags_list_page.html" + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + tags = [] + blog_slug = kwargs.get("blog_slug") + blog_index = get_localized_index(blog_slug) + if blog_index: + tags = blog_index.list_tags() + + tags_by_first_letter = {} + for tag in tags: + first_letter = unidecode(tag["tag_slug"][0].upper()) + if first_letter not in tags_by_first_letter: + tags_by_first_letter[first_letter] = [] + tags_by_first_letter[first_letter].append(tag) + + breadcrumb = { + "links": [ + {"url": blog_index.get_url(), "title": blog_index.title}, + ], + "current": _("Tags"), + } + + context["sorted_tags"] = tags_by_first_letter + context["page"] = blog_index + context["breadcrumb"] = breadcrumb + return context diff --git a/config/settings/base.py b/config/settings/base.py index 8214a79e7..97c70fafc 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -164,6 +164,7 @@ "wagtail.contrib.search_promotions", "wagtail.contrib.forms", "wagtail.contrib.redirects", + "wagtail.contrib.settings", "wagtail.embeds", "wagtail.sites", "wagtail.users", @@ -174,8 +175,15 @@ "wagtail.admin", "wagtail", "modelcluster", + "wagtailmarkdown", + "wagtailmenus", + "wagtail_localize", + "wagtail_localize.locales", "taggit", "storages", + # app from site_facile + "blog", + "content_manager", ] INSTALLED_APPS = PRIORITY_APPS + DJANGO_APPS + DJANGO_DSFR_APPS + THIRD_PARTY_APPS + LOCAL_APPS + WAGTAIL_APPS @@ -829,7 +837,7 @@ # Wagtail # ------------------------------------------------------------------------------ -WAGTAIL_SITE_NAME = "Le Marché" +WAGTAIL_SITE_NAME = os.getenv("SITE_NAME", "Le Marché") WAGTAILSEARCH_BACKENDS = { "default": { @@ -855,6 +863,57 @@ WAGTAIL_FRONTEND_LOGIN_URL = LOGIN_URL +# Base URL to use when referring to full URLs within the Wagtail admin backend - +# e.g. in notification emails. Don't include '/admin' or a trailing slash +# WAGTAILADMIN_BASE_URL = f"{os.getenv('HOST_PROTO', 'https')}://{HOST_URL}" + +HOST_PORT = os.getenv("HOST_PORT", "") +if HOST_PORT != "": + WAGTAILADMIN_BASE_URL = f"{WAGTAILADMIN_BASE_URL}:{HOST_PORT}" + +# WAGTAILADMIN_PATH = os.getenv("WAGTAILADMIN_PATH", "cms-admin/") + +# Disable Gravatar service +WAGTAIL_GRAVATAR_PROVIDER_URL = None + +WAGTAIL_RICHTEXT_FIELD_FEATURES = [ + "h2", + "h3", + "h4", + "bold", + "italic", + "link", + "document-link", + "image", + "embed", +] + +WAGTAILEMBEDS_RESPONSIVE_HTML = True +WAGTAIL_MODERATION_ENABLED = False +WAGTAILMENUS_FLAT_MENUS_HANDLE_CHOICES = ( + ("header_tools", "Menu en haut à droite"), + ("footer", "Menu en pied de page"), + ("mega_menu_section_1", "Catégorie de méga-menu 1"), + ("mega_menu_section_2", "Catégorie de méga-menu 2"), + ("mega_menu_section_3", "Catégorie de méga-menu 3"), + ("mega_menu_section_4", "Catégorie de méga-menu 4"), + ("mega_menu_section_5", "Catégorie de méga-menu 5"), + ("mega_menu_section_6", "Catégorie de méga-menu 6"), + ("mega_menu_section_7", "Catégorie de méga-menu 7"), + ("mega_menu_section_8", "Catégorie de méga-menu 8"), + ("mega_menu_section_9", "Catégorie de méga-menu 9"), + ("mega_menu_section_10", "Catégorie de méga-menu 10"), + ("mega_menu_section_11", "Catégorie de méga-menu 11"), + ("mega_menu_section_12", "Catégorie de méga-menu 12"), + ("mega_menu_section_13", "Catégorie de méga-menu 13"), + ("mega_menu_section_14", "Catégorie de méga-menu 14"), + ("mega_menu_section_15", "Catégorie de méga-menu 15"), + ("mega_menu_section_16", "Catégorie de méga-menu 16"), +) + +WAGTAILIMAGES_EXTENSIONS = ["gif", "jpg", "jpeg", "png", "webp", "svg"] + + # Specific home and purchasing impact page is setted here to avoid queries on every page SIAE_HOME_PAGE = env.str("SIAE_HOME_PAGE", "/accueil-structure/") PURCHASING_IMPACT_PAGE = env.str("PURCHASING_IMPACT_PAGE", "/impact-rse/") diff --git a/content_manager/__init__.py b/content_manager/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/abstract.py b/content_manager/abstract.py new file mode 100644 index 000000000..95da2d096 --- /dev/null +++ b/content_manager/abstract.py @@ -0,0 +1,126 @@ +from django.db import models +from django.utils.translation import gettext_lazy as _ +from dsfr.constants import COLOR_CHOICES +from wagtail.admin.panels import FieldPanel, MultiFieldPanel +from wagtail.fields import RichTextField, StreamField +from wagtail.images import get_image_model_string +from wagtail.models import Page +from wagtail.search import index + +from content_manager.blocks import STREAMFIELD_COMMON_BLOCKS, ButtonsHorizontalListBlock +from content_manager.utils import get_streamfield_raw_text + + +class SitesFacilesBasePage(Page): + """ + This class defines a base page model that will be used + by all pages in Sites Faciles + """ + + body = StreamField( + STREAMFIELD_COMMON_BLOCKS, + blank=True, + use_json_field=True, + ) + header_with_title = models.BooleanField(_("Show title in header image?"), default=False) # type: ignore + + header_image = models.ForeignKey( + get_image_model_string(), + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + verbose_name=_("Header image"), + ) + + header_color_class = models.CharField( + _("Background color"), + choices=COLOR_CHOICES, + null=True, + blank=True, + help_text=_("Uses the French Design System colors"), + ) + + header_large = models.BooleanField(_("Full width"), default=False) # type: ignore + header_darken = models.BooleanField(_("Darken background image"), default=False) # type: ignore + + header_cta_text = RichTextField( + _("Call to action text"), + null=True, + blank=True, + ) + + header_cta_buttons = StreamField( + [ + ( + "buttons", + ButtonsHorizontalListBlock( + help_text=_("Please use only one primary button. If you use icons, align them on the same side.") + ), + ), + ], + max_num=1, + null=True, + blank=True, + ) + header_cta_label = models.CharField( + _("Call to action label"), + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above." + ), + null=True, + blank=True, + ) + + header_cta_link = models.URLField( + _("Call to action link"), + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above." + ), + null=True, + blank=True, + ) + + content_panels = Page.content_panels + [ + FieldPanel("body", heading=_("Body")), + ] + + promote_panels = [ + MultiFieldPanel(Page.promote_panels, _("Common page configuration")), + MultiFieldPanel( + [ + FieldPanel("header_with_title"), + FieldPanel("header_image"), + FieldPanel("header_color_class"), + FieldPanel("header_large"), + FieldPanel("header_darken"), + FieldPanel("header_cta_text"), + FieldPanel( + "header_cta_buttons", + heading=_("Call-to-action buttons"), + ), + FieldPanel("header_cta_label"), + FieldPanel("header_cta_link"), + ], + heading=_("Header options"), + ), + ] + + search_fields = Page.search_fields + [ + index.SearchField("body"), + ] + + def get_absolute_url(self): + return self.url + + def save(self, *args, **kwargs): + if not self.search_description: + search_description = get_streamfield_raw_text(self.body, max_words=20) + if search_description: + self.search_description = search_description + return super().save(*args, **kwargs) + + class Meta: + abstract = True + verbose_name = _("Base page") + verbose_name_plural = _("Base pages") diff --git a/content_manager/apps.py b/content_manager/apps.py new file mode 100644 index 000000000..bf21d8066 --- /dev/null +++ b/content_manager/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ContentManagerConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "content_manager" diff --git a/content_manager/blocks.py b/content_manager/blocks.py new file mode 100644 index 000000000..185bf1275 --- /dev/null +++ b/content_manager/blocks.py @@ -0,0 +1,950 @@ +from django import forms +from django.utils.functional import cached_property +from django.utils.translation import gettext_lazy as _, pgettext_lazy +from dsfr.constants import COLOR_CHOICES, COLOR_CHOICES_ILLUSTRATION, COLOR_CHOICES_SYSTEM, IMAGE_RATIOS, VIDEO_RATIOS +from wagtail import blocks +from wagtail.blocks import BooleanBlock, StructValue +from wagtail.documents.blocks import DocumentChooserBlock +from wagtail.images.blocks import ImageChooserBlock +from wagtail.snippets.blocks import SnippetChooserBlock +from wagtailmarkdown.blocks import MarkdownBlock + +from content_manager.constants import ( + BUTTON_ICON_SIDE, + BUTTON_TYPE_CHOICES, + HEADING_CHOICES, + HEADING_CHOICES_2_5, + HORIZONTAL_CARD_IMAGE_RATIOS, + LEVEL_CHOICES, + LIMITED_RICHTEXTFIELD_FEATURES, + LIMITED_RICHTEXTFIELD_FEATURES_WITHOUT_LINKS, + LINK_ICON_CHOICES, + LINK_SIZE_CHOICES, + MEDIA_WIDTH_CHOICES, + TEXT_SIZE_CHOICES, +) +from content_manager.widgets import DsfrIconPickerWidget + + +# Wagtail Block Documentation : https://docs.wagtail.org/en/stable/reference/streamfield/blocks.html + + +## Meta blocks +class BackgroundColorChoiceBlock(blocks.ChoiceBlock): + choices = COLOR_CHOICES + + class Meta: + icon = "view" + + +class IconPickerBlock(blocks.FieldBlock): + def __init__(self, required=True, help_text=None, validators=(), **kwargs): + self.field_options = { + "required": required, + "help_text": help_text, + "max_length": 70, + "min_length": 0, + "validators": [], + } + super().__init__(**kwargs) + + @cached_property + def field(self): + field_kwargs = {"widget": DsfrIconPickerWidget()} + field_kwargs.update(self.field_options) + return forms.CharField(**field_kwargs) + + class Meta: + icon = "radio-full" + + +class LinkStructValue(blocks.StructValue): + def url(self): + link = self.get("external_url", "") + + page = self.get("page") + document = self.get("document") + + if page: + link = page.url + elif document: + link = document.url + + return link + + +class LinkWithoutLabelBlock(blocks.StructBlock): + page = blocks.PageChooserBlock( + label=_("Page"), + required=False, + help_text=_("Link to a page of this site. Use either this, the document, or the external URL parameter."), + ) + document = DocumentChooserBlock( + label=_("Document"), + help_text=_("Use either this, the external URL or the page parameter."), + required=False, + ) + external_url = blocks.URLBlock( + label=_("External URL"), + required=False, + help_text=_("Use either this, the document or the page parameter."), + ) + + class Meta: + value_class = LinkStructValue + icon = "link" + + +class LinkBlock(LinkWithoutLabelBlock): + text = blocks.CharBlock(label=_("Link label"), required=False) + + class Meta: + value_class = LinkStructValue + icon = "link" + + +class LinksVerticalListBlock(blocks.StreamBlock): + link = LinkBlock(label=_("Link")) + + class Meta: + icon = "list-ul" + template = "content_manager/blocks/links_vertical_list.html" + + +class ButtonBlock(LinkBlock): + button_type = blocks.ChoiceBlock(label=_("Button type"), choices=BUTTON_TYPE_CHOICES, required=False) + icon_class = IconPickerBlock(label=_("Icon"), required=False) + icon_side = blocks.ChoiceBlock( + label=_("Icon side"), + choices=BUTTON_ICON_SIDE, + required=False, + default="", + ) + + class Meta: + value_class = LinkStructValue + icon = "link" + + +class ButtonsHorizontalListBlock(blocks.StreamBlock): + button = ButtonBlock(label=_("Button")) + + class Meta: + icon = "list-ul" + template = "content_manager/blocks/buttons_horizontal_list.html" + + +class ButtonsVerticalListBlock(blocks.StreamBlock): + button = ButtonBlock(label=_("Button")) + + class Meta: + icon = "list-ul" + template = "content_manager/blocks/buttons_vertical_list.html" + + +class SingleLinkBlock(LinkBlock): + icon = blocks.ChoiceBlock( + label=_("Icon"), + help_text=_("Only used for internal links."), + choices=LINK_ICON_CHOICES, + required=False, + default="", + ) + size = blocks.ChoiceBlock( + label=_("Size"), + choices=LINK_SIZE_CHOICES, + required=False, + default="", + ) + + class Meta: + value_class = LinkStructValue + icon = "link" + template = "content_manager/blocks/link.html" + + +## Badges and Tags +badge_level_choices = ( + ("", [("new", _("New")), ("grey", _("Grey"))]), + (_("System colors"), COLOR_CHOICES_SYSTEM), + (_("Illustration colors"), COLOR_CHOICES_ILLUSTRATION), +) + + +class BadgeBlock(blocks.StructBlock): + text = blocks.CharBlock(label=_("Badge label"), required=False) + color = blocks.ChoiceBlock(label=_("Badge color"), choices=badge_level_choices, required=False) + hide_icon = blocks.BooleanBlock(label=_("Hide badge icon"), required=False) + + class Meta: + template = ("content_manager/blocks/badge.html",) + + +class BadgesListBlock(blocks.StreamBlock): + badge = BadgeBlock(label=_("Badge")) + + class Meta: + icon = "list-ul" + template = "content_manager/blocks/badges_list.html" + + +class TagBlock(blocks.StructBlock): + label = blocks.CharBlock(label=_("Title")) + is_small = blocks.BooleanBlock(label=_("Small tag"), required=False) + color = blocks.ChoiceBlock( + label=_("Tag color"), + choices=COLOR_CHOICES_ILLUSTRATION, + required=False, + help_text=_("Only for clickable tags"), + ) + icon_class = IconPickerBlock(label=_("Icon"), required=False) + link = LinkWithoutLabelBlock(required=False) + + class Meta: + template = "content_manager/blocks/tag.html" + + +class TagListBlock(blocks.StreamBlock): + tag = TagBlock(label=pgettext_lazy("DSFR Tag", "Tag")) + + class Meta: + icon = "list-ul" + template = "content_manager/blocks/tags_list.html" + + +## Cards and tiles +class CardstructValue(StructValue): + def enlarge_link(self): + """ + Determine if we need (and can) enlarge the link on the card. + This requires: + - That a link is present + - That no other link is used on the card (such as a tag with a link, or a call-to-action) + """ + link = self.get("link") + url = self.get("url") + document = self.get("document") + top_detail_badges_tags = self.get("top_detail_badges_tags") + call_to_action = self.get("call_to_action", "") + + if not ((link and link.url()) or url or document): + return False + + enlarge = True + if len(call_to_action): + enlarge = False + elif len(top_detail_badges_tags) and top_detail_badges_tags.raw_data[0]["type"] == "tags": + tags_list = top_detail_badges_tags.raw_data[0]["value"] + for tag in tags_list: + if ( + tag["value"]["link"]["page"] is not None + or tag["value"]["link"]["document"] is not None + or tag["value"]["link"]["external_url"] != "" + ): + enlarge = False + + return enlarge + + def image_classes(self): + """ + Determine the image classes for a vertical card. Not used in horizontal card. + """ + ratio_class = self.get("image_ratio") + + if ratio_class: + image_classes = f"fr-responsive-img {ratio_class}" + else: + image_classes = "fr-responsive-img" + + return image_classes + + +class CardBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title")) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + default="h3", + help_text=_("Adapt to the page layout. Defaults to heading 3."), + ) + description = blocks.RichTextBlock(label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES, required=False) + image = ImageChooserBlock(label=_("Image"), required=False) + image_ratio = blocks.ChoiceBlock( + label=_("Image ratio"), + choices=IMAGE_RATIOS, + required=False, + default="h3", + ) + image_badge = BadgesListBlock( + label=_("Image area badge"), required=False, help_text=_("Only used if the card has an image."), max_num=1 + ) + link = LinkWithoutLabelBlock( + label=_("Link"), + required=False, + ) + url = blocks.URLBlock( + label=_("Link (obsolete)"), + required=False, + group="target", + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the Link field above." + ), + ) + document = DocumentChooserBlock( + label=_("or Document (obsolete)"), + required=False, + group="target", + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the Link field above." + ), + ) + top_detail_text = blocks.CharBlock(label=_("Top detail: text"), required=False) + top_detail_icon = IconPickerBlock(label=_("Top detail: icon"), required=False) + top_detail_badges_tags = blocks.StreamBlock( + [ + ("badges", BadgesListBlock()), + ("tags", TagListBlock()), + ], + label=_("Top detail: badges or tags"), + max_num=1, + required=False, + ) + bottom_detail_text = blocks.CharBlock( + label=_("Bottom detail: text"), + help_text=_("Incompatible with the bottom call-to-action."), + required=False, + ) + bottom_detail_icon = IconPickerBlock(label=_("Bottom detail: icon"), required=False) + call_to_action = blocks.StreamBlock( + [ + ("links", LinksVerticalListBlock()), + ( + "buttons", + ButtonsHorizontalListBlock( + help_text=_("Please use only one primary button. If you use icons, align them on the same side.") + ), + ), + ], + label=_("Bottom call-to-action: links or buttons"), + help_text=_("Incompatible with the bottom detail text."), + max_num=1, + required=False, + ) + grey_background = blocks.BooleanBlock(label=_("Card with grey background"), required=False) + no_background = blocks.BooleanBlock(label=_("Card without background"), required=False) + no_border = blocks.BooleanBlock(label=_("Card without border"), required=False) + shadow = blocks.BooleanBlock(label=_("Card with a shadow"), required=False) + + class Meta: + icon = "tablet-alt" + template = "content_manager/blocks/card.html" + value_class = CardstructValue + + +class HorizontalCardBlock(CardBlock): + image_ratio = blocks.ChoiceBlock( + label=_("Image ratio"), + choices=HORIZONTAL_CARD_IMAGE_RATIOS, + required=False, + default="h3", + ) + bottom_detail_text = blocks.CharBlock( + label=_("Bottom detail: text"), + help_text=_( + "Incompatible with the bottom call-to-action. " + "If the card links to a downloadable document, the values are pre-filled." + ), + required=False, + ) + + class Meta: + icon = "tablet-alt" + template = "content_manager/blocks/card_horizontal.html" + value_class = CardstructValue + + +class VerticalCardBlock(CardBlock): + class Meta: + icon = "tablet-alt" + template = "content_manager/blocks/card_vertical.html" + value_class = CardstructValue + + +class TileBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title")) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + default="h3", + help_text=_("Adapt to the page layout. Defaults to heading 3."), + ) + description = blocks.RichTextBlock( + label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES_WITHOUT_LINKS, required=False + ) + image = ImageChooserBlock(label=_("Image"), help_text=_("Prefer SVG files."), required=False) + link = LinkWithoutLabelBlock( + label=_("Link"), + required=False, + ) + top_detail_badges_tags = blocks.StreamBlock( + [ + ("badges", BadgesListBlock()), + ("tags", TagListBlock()), + ], + label=_("Top detail: badges or tags"), + max_num=1, + required=False, + ) + detail_text = blocks.CharBlock( + label=_("Detail text"), + required=False, + help_text=_("If the tile links to a downloadable document, the values are pre-filled."), + ) + is_small = blocks.BooleanBlock(label=_("Small tile"), required=False) + grey_background = blocks.BooleanBlock(label=_("Tile with grey background"), required=False) + no_background = blocks.BooleanBlock(label=_("Tile without background"), required=False) + no_border = blocks.BooleanBlock(label=_("Tile without border"), required=False) + shadow = blocks.BooleanBlock(label=_("Tile with a shadow"), required=False) + is_horizontal = blocks.BooleanBlock(label=_("Horizontal tile"), required=False) + + class Meta: + icon = "tablet-alt" + template = "content_manager/blocks/tile.html" + value_class = CardstructValue + + +## Basic blocks +class AccordionBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title")) + content = blocks.RichTextBlock(label=_("Content")) + + +class AccordionsBlock(blocks.StreamBlock): + title = blocks.CharBlock(label=_("Title")) + accordion = AccordionBlock(label=_("Accordion"), min_num=1, max_num=15) + + +class AlertBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Message title"), required=False) + description = blocks.TextBlock(label=_("Message text"), required=False) + level = blocks.ChoiceBlock(label=_("Message type"), choices=LEVEL_CHOICES) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + default="h3", + help_text=_("Adapt to the page layout. Defaults to heading 3."), + ) + + class Meta: + icon = "info-circle" + template = "content_manager/blocks/alert.html" + + +class CalloutBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title"), required=False) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + default="h3", + help_text=_("Adapt to the page layout. Defaults to heading 3."), + ) + icon_class = IconPickerBlock(label=_("Icon"), required=False) + + text = blocks.RichTextBlock(label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES, required=False) + button = ButtonBlock(label=_("Button"), required=False) + color = blocks.ChoiceBlock( + label=_("Color"), + choices=COLOR_CHOICES_ILLUSTRATION, + required=False, + ) + + class Meta: + icon = "info-circle" + template = "content_manager/blocks/callout.html" + + +class HighlightBlock(blocks.StructBlock): + text = blocks.RichTextBlock(label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES) + color = blocks.ChoiceBlock( + label=_("Color"), + choices=COLOR_CHOICES_ILLUSTRATION, + required=False, + ) + size = blocks.ChoiceBlock( + label=_("Size"), + choices=TEXT_SIZE_CHOICES, + required=False, + ) + + class Meta: + icon = "info-circle" + template = "content_manager/blocks/highlight.html" + + +class IframeBlock(blocks.StructBlock): + title = blocks.CharBlock( + label=_("Title"), + help_text=_("Accessibility: The title should describe, in a clear and concise manner, the embedded content."), + ) + url = blocks.URLBlock( + label=_("URL of the iframe"), + help_text=_("Example for Tally: https://tally.so/embed/w2jMRa"), + ) + height = blocks.IntegerBlock(label=_("Height (in pixels)")) + parameters = blocks.CharBlock( + label=_("Parameters"), + help_text=_("""For example: "allow='geolocation'"."""), + required=False, + ) + + class Meta: + icon = "globe" + template = "content_manager/blocks/iframe.html" + + +class ImageAndTextBlock(blocks.StructBlock): + image = ImageChooserBlock(label=_("Image")) + image_side = blocks.ChoiceBlock( + label=_("Side where the image is displayed"), + choices=[ + ("left", _("Left")), + ("right", _("Right")), + ], + default="right", + ) + image_ratio = blocks.ChoiceBlock( + label=_("Image width"), + choices=[ + ("3", "3/12"), + ("5", "5/12"), + ("6", "6/12"), + ], + default="3", + ) + text = blocks.RichTextBlock(label=_("Rich text")) + link = SingleLinkBlock( + label=_("Link"), + required=False, + help_text=_("The link is shown at the bottom of the text block, with an arrow"), + ) + link_label = blocks.CharBlock( + label=_("Link label (obsolete)"), + required=False, + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the Link field above." + ), + group="obsolete", + ) + page = blocks.PageChooserBlock( + label=_("Internal link (obsolete)"), + required=False, + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the Link field above." + ), + group="obsolete", + ) + link_url = blocks.URLBlock( + label=_("Link URL (obsolete)"), + required=False, + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the Link field above." + ), + group="obsolete", + ) + + class Meta: + icon = "image" + template = "content_manager/blocks/image_and_text.html" + + +class ImageBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title"), required=False) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + required=False, + default="h3", + help_text=_("Adapt to the page layout. Defaults to heading 3."), + ) + image = ImageChooserBlock(label=_("Image")) + alt = blocks.CharBlock( + label=_("Alternative text (textual description of the image)"), + required=False, + ) + width = blocks.ChoiceBlock( + label=_("Witdh"), + choices=MEDIA_WIDTH_CHOICES, + required=False, + default="", + ) + image_ratio = blocks.ChoiceBlock( + label=_("Image ratio"), + choices=IMAGE_RATIOS, + required=False, + default="h3", + ) + caption = blocks.CharBlock(label=_("Caption"), required=False) + url = blocks.URLBlock(label=_("Link"), required=False) + + class Meta: + icon = "image" + template = "content_manager/blocks/image.html" + + +class QuoteBlock(blocks.StructBlock): + image = ImageChooserBlock(label=_("Image"), required=False) + quote = blocks.CharBlock(label=_("Quote")) + author_name = blocks.CharBlock(label=_("Author name"), required=False) + author_title = blocks.CharBlock(label=_("Author title"), required=False) + color = blocks.ChoiceBlock( + label=_("Color"), + choices=COLOR_CHOICES_ILLUSTRATION, + required=False, + ) + + class Meta: + icon = "openquote" + template = "content_manager/blocks/quote.html" + + +class SeparatorBlock(blocks.StructBlock): + top_margin = blocks.IntegerBlock(label=_("Top margin"), min_value=0, max_value=15, default=3) + bottom_margin = blocks.IntegerBlock(label=_("Bottom margin"), min_value=0, max_value=15, default=3) + + +class StepBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title")) + detail = blocks.TextBlock(label=_("Detail")) + + +class StepsListBlock(blocks.StreamBlock): + step = StepBlock(label=_("Step")) + + +class StepperBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title")) + total = blocks.IntegerBlock(label=_("Number of steps")) + current = blocks.IntegerBlock(label=_("Current step")) + steps = StepsListBlock(label=_("Steps")) + + +class TextAndCTA(blocks.StructBlock): + text = blocks.RichTextBlock(label=_("Rich text"), required=False) + cta_buttons = blocks.StreamBlock( + [ + ( + "buttons", + ButtonsHorizontalListBlock( + help_text=_("Please use only one primary button. If you use icons, align them on the same side.") + ), + ), + ], + label=_("Call-to-action buttons"), + max_num=1, + required=False, + ) + cta_label = blocks.CharBlock( + label=_("Call to action label (obsolete)"), + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above." + ), + required=False, + ) + cta_url = blocks.CharBlock( + label=_("Link (obsolete)"), + help_text=_( + "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above." + ), + required=False, + ) + + class Meta: + icon = "link" + template = "content_manager/blocks/text_and_cta.html" + + +class TranscriptionBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title"), default="Transcription", required=False) + content = blocks.RichTextBlock(label=_("Transcription content"), required=False) + + class Meta: + icon = "media" + template = "content_manager/blocks/transcription.html" + + +class VideoBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Video title"), required=False) + caption = blocks.CharBlock(label=_("Caption"), required=False) + url = blocks.URLBlock( + label=_("Video URL"), + help_text=_( + "Use embed format, with a version that doesn't require a consent banner if available." + " (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0)" + " For Youtube, use Embed video and check Enable privacy-enhanced mode." + ), + ) + + width = blocks.ChoiceBlock( + label=_("Witdh"), + choices=MEDIA_WIDTH_CHOICES, + required=False, + default="", + ) + video_ratio = blocks.ChoiceBlock( + label=_("Video ratio"), + choices=VIDEO_RATIOS, + required=False, + default="h3", + ) + transcription = TranscriptionBlock(label=_("Transcription"), required=False) + + class Meta: + icon = "media" + template = "content_manager/blocks/video.html" + + +## Other apps-related blocks +class BlogRecentEntriesStructValue(blocks.StructValue): + def posts(self): + blog = self.get("blog") + blog_posts = blog.posts + + category_filter = self.get("category_filter") + if category_filter: + blog_posts = blog_posts.filter(blog_categories=category_filter) + + tag_filter = self.get("tag_filter") + if tag_filter: + blog_posts = blog_posts.filter(tags=tag_filter) + + author_filter = self.get("author_filter") + if author_filter: + blog_posts = blog_posts.filter(authors=author_filter) + + source_filter = self.get("source_filter") + if source_filter: + blog_posts = blog_posts.filter(authors__organization=source_filter) + + entries_count = self.get("entries_count") + return blog_posts[:entries_count] + + def current_filters(self) -> dict: + filters = {} + + category_filter = self.get("category_filter") + if category_filter: + filters["category"] = category_filter.slug + + tag_filter = self.get("tag_filter") + if tag_filter: + filters["tag"] = tag_filter.slug + + author_filter = self.get("author_filter") + if author_filter: + filters["author"] = author_filter.id + + source_filter = self.get("source_filter") + if source_filter: + filters["source"] = source_filter.slug + + return filters + + def sub_heading_tag(self): + heading_tag = self.get("heading_tag") + if heading_tag == "h2": + return "h3" + elif heading_tag == "h3": + return "h4" + elif heading_tag == "h4": + return "h5" + else: + return "h6" + + +class BlogRecentEntriesBlock(blocks.StructBlock): + title = blocks.CharBlock(label=_("Title"), required=False) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES_2_5, + required=False, + default="h2", + help_text=_("Adapt to the page layout. Defaults to heading 2."), + ) + blog = blocks.PageChooserBlock(label=_("Blog"), page_type="blog.BlogIndexPage") + entries_count = blocks.IntegerBlock( + label=_("Number of entries"), required=False, min_value=1, max_value=8, default=3 + ) + category_filter = SnippetChooserBlock("blog.Category", label=_("Filter by category"), required=False) + tag_filter = SnippetChooserBlock("content_manager.Tag", label=_("Filter by tag"), required=False) + author_filter = SnippetChooserBlock("blog.Person", label=_("Filter by author"), required=False) + source_filter = SnippetChooserBlock( + "blog.Organization", + label=_("Filter by source"), + help_text=_("The source is the organization of the post author"), + required=False, + ) + show_filters = BooleanBlock(label=_("Show filters"), default=False, required=False) + + class Meta: + icon = "placeholder" + template = ("content_manager/blocks/blog_recent_entries.html",) + value_class = BlogRecentEntriesStructValue + + +## Page structure blocks +class CommonStreamBlock(blocks.StreamBlock): + text = blocks.RichTextBlock(label=_("Rich text")) + image = ImageBlock(label=_("Image")) + video = VideoBlock(label=_("Video")) + transcription = TranscriptionBlock(label=_("Transcription")) + callout = CalloutBlock(label=_("Callout"), group=_("DSFR components")) + highlight = HighlightBlock(label=_("Highlight"), group=_("DSFR components")) + quote = QuoteBlock(label=_("Quote"), group=_("DSFR components")) + text_cta = TextAndCTA(label=_("Text and call to action")) + link = SingleLinkBlock(label=_("Single link")) + iframe = IframeBlock(label=_("Iframe"), group=_("DSFR components")) + tile = TileBlock(label=_("Tile"), group=_("DSFR components")) + blog_recent_entries = BlogRecentEntriesBlock(label=_("Blog recent entries"), group=_("Website structure")) + + class Meta: + icon = "dots-horizontal" + + +class ColumnBlock(CommonStreamBlock): + card = VerticalCardBlock(label=_("Vertical card"), group=_("DSFR components")) + + +class AdjustableColumnBlock(blocks.StructBlock): + width = blocks.ChoiceBlock( + label=_("Column width"), + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text=_("The total width of all columns should be 12."), + required=False, + ) + content = ColumnBlock(label=_("Column content")) + + class Meta: + icon = "order-down" + + +class MultiColumnsBlock(CommonStreamBlock): + card = VerticalCardBlock(label=_("Vertical card"), group=_("DSFR components")) + column = AdjustableColumnBlock(label=_("Adjustable column"), group=_("Page structure")) + + class Meta: + icon = "dots-horizontal" + + +class MultiColumnsWithTitleBlock(blocks.StructBlock): + bg_image = ImageChooserBlock(label=_("Background image"), required=False) + bg_color_class = BackgroundColorChoiceBlock( + label=_("Background color"), + required=False, + help_text=_("Uses the French Design System colors"), + ) + bg_color = blocks.RegexBlock( + label=_("Background color, hexadecimal format (obsolete)"), + regex=r"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + help_text=_( + "This field is obsolete and will be removed in the near future. Replace it with the background color." # noqa + ), + error_messages={"invalid": _("Incorrect color format, must be #fff or #f5f5f5")}, + required=False, + ) + title = blocks.CharBlock(label=_("Title"), required=False) + heading_tag = blocks.ChoiceBlock( + label=_("Heading level"), + choices=HEADING_CHOICES, + required=False, + default="h2", + help_text=_("Adapt to the page layout. Defaults to heading 2."), + ) + columns = MultiColumnsBlock(label=_("Columns")) + + class Meta: + icon = "dots-horizontal" + template = "content_manager/blocks/multicolumns.html" + + +class FullWidthBlock(CommonStreamBlock): + image_and_text = ImageAndTextBlock(label=_("Image and text")) + card = HorizontalCardBlock(label=_("Horizontal card"), group=_("DSFR components")) + + class Meta: + icon = "minus" + + +class FullWidthBackgroundBlock(blocks.StructBlock): + bg_image = ImageChooserBlock(label=_("Background image"), required=False) + bg_color_class = BackgroundColorChoiceBlock( + label=_("Background color"), + required=False, + help_text=_("Uses the French Design System colors"), + ) + content = FullWidthBlock(label=_("Content")) + + class Meta: + icon = "minus" + template = "content_manager/blocks/full_width_background.html" + + +STREAMFIELD_COMMON_BLOCKS = [ + ("paragraph", blocks.RichTextBlock(label=_("Rich text"))), + ("image", ImageBlock()), + ("imageandtext", ImageAndTextBlock(label=_("Image and text"))), + ("alert", AlertBlock(label=_("Alert message"))), + ("callout", CalloutBlock(label=_("Callout"), group=_("DSFR components"))), + ("highlight", HighlightBlock(label=_("Highlight"), group=_("DSFR components"))), + ("quote", QuoteBlock(label=_("Quote"), group=_("DSFR components"))), + ("video", VideoBlock(label=_("Video"))), + ("transcription", TranscriptionBlock(label=_("Transcription"))), + ("badges_list", BadgesListBlock(label=_("Badge list"))), + ("tags_list", TagListBlock(label=_("Tag list"))), + ("link", SingleLinkBlock(label=_("Single link"))), + ("card", HorizontalCardBlock(label=_("Horizontal card"), group=_("DSFR components"))), + ("tile", TileBlock(label=_("Tile"), group=_("DSFR components"))), + ("accordions", AccordionsBlock(label=_("Accordions"), group=_("DSFR components"))), + ("stepper", StepperBlock(label=_("Stepper"), group=_("DSFR components"))), + ("markdown", MarkdownBlock(label=_("Markdown"), group=_("Expert syntax"))), + ("iframe", IframeBlock(label=_("Iframe"), group=_("Expert syntax"))), + ("separator", SeparatorBlock(label=_("Separator"), group=_("Page structure"))), + ("multicolumns", MultiColumnsWithTitleBlock(label=_("Multiple columns"), group=_("Page structure"))), + ("fullwidthbackground", FullWidthBackgroundBlock(label=_("Full width background"), group=_("Page structure"))), + ( + "subpageslist", + blocks.StaticBlock( + label=_("Subpages list"), + admin_text=_("A simple, alphabetical list of the subpages of the current page."), + template="content_manager/blocks/subpages_list.html", + group=_("Website structure"), + ), + ), + ( + "blog_recent_entries", + BlogRecentEntriesBlock(label=_("Blog recent entries"), group=_("Website structure")), + ), +] + +# See warning on https://docs.wagtail.org/en/latest/reference/streamfield/blocks.html#wagtail.blocks.RawHTMLBlock +# There is currently no way to restrict a type of block depending on user permissions, +# pending issue https://github.com/wagtail/wagtail/issues/6323 +STREAMFIELD_COMMON_BLOCKS += [ + ( + "html", + blocks.RawHTMLBlock( + readonly=True, + help_text=_( + "Warning: Use HTML block with caution. Malicious code can compromise the security of the site." + ), + group=_("Expert syntax"), + ), + ) +] diff --git a/content_manager/constants.py b/content_manager/constants.py new file mode 100644 index 000000000..e82c171a9 --- /dev/null +++ b/content_manager/constants.py @@ -0,0 +1,84 @@ +from django.utils.translation import gettext_lazy as _ + + +BUTTON_TYPE_CHOICES = ( + ("fr-btn", _("Primary")), + ("fr-btn fr-btn--secondary", _("Secundary")), + ("fr-btn fr-btn--tertiary", _("Tertiary")), + ("fr-btn fr-btn--tertiary-no-outline", _("Tertiary without border")), +) + +BUTTON_ICON_SIDE = ( + ("fr-btn--icon-left", _("Left")), + ("fr-btn--icon-right", _("Right")), +) + +HEADING_CHOICES = [ + ("h2", _("Heading 2")), + ("h3", _("Heading 3")), + ("h4", _("Heading 4")), + ("h5", _("Heading 5")), + ("h6", _("Heading 6")), + ("p", _("Paragraph")), +] + +HEADING_CHOICES_2_5 = [ + ("h2", _("Heading 2")), + ("h3", _("Heading 3")), + ("h4", _("Heading 4")), + ("h5", _("Heading 5")), +] + +HORIZONTAL_CARD_IMAGE_RATIOS = [ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), +] + +LEVEL_CHOICES = [ + ("error", _("Error")), + ("success", _("Success")), + ("info", _("Information")), + ("warning", _("Warning")), +] + +LIMITED_RICHTEXTFIELD_FEATURES = [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", +] + +LIMITED_RICHTEXTFIELD_FEATURES_WITHOUT_LINKS = [ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", +] + +LINK_SIZE_CHOICES = [ + ("fr-link--sm", _("Small")), + ("", _("Medium")), + ("fr-link--lg", _("Large")), +] + +LINK_ICON_CHOICES = [ + ("", _("No icon")), + ("fr-icon-arrow-right-line fr-link--icon-right", _("Icon on the right side")), + ("fr-icon-arrow-right-line fr-link--icon-left", _("Icon on the left side")), +] + +MEDIA_WIDTH_CHOICES = [ + ("fr-content-media--sm", _("Small")), + ("", _("Medium")), + ("fr-content-media--lg", _("Large")), +] + +TEXT_SIZE_CHOICES = [ + ("fr-text--sm", _("Small")), + ("", _("Medium")), + ("fr-text--lg", _("Large")), +] diff --git a/content_manager/context_processors.py b/content_manager/context_processors.py new file mode 100644 index 000000000..7ba15efee --- /dev/null +++ b/content_manager/context_processors.py @@ -0,0 +1,16 @@ +from content_manager.models import MegaMenu + + +def skiplinks(request) -> dict: + return { + "skiplinks": [ + {"link": "#content", "label": "Contenu"}, + {"link": "#fr-navigation", "label": "Menu"}, + ] + } + + +def mega_menus(request) -> dict: + menus = list(MegaMenu.objects.all().values_list("parent_menu_item_id", flat=True)) + + return {"mega_menus": menus} diff --git a/content_manager/locale/fr/LC_MESSAGES/django.po b/content_manager/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 000000000..e9bc9ac98 --- /dev/null +++ b/content_manager/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,1105 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-11 17:35+0200\n" +"PO-Revision-Date: 2024-07-11 17:36+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.4.2\n" + +#: content_manager/abstract.py:25 +msgid "Show title in header image?" +msgstr "Afficher le titre sur l’image d’en-tête ?" + +#: content_manager/abstract.py:33 +msgid "Header image" +msgstr "Image d’en-tête" + +#: content_manager/abstract.py:37 content_manager/blocks.py:848 +#: content_manager/blocks.py:887 +msgid "Background color" +msgstr "Couleur de fond" + +#: content_manager/abstract.py:41 content_manager/blocks.py:850 +#: content_manager/blocks.py:889 +msgid "Uses the French Design System colors" +msgstr "Utilise les couleurs du système de design de l'État" + +#: content_manager/abstract.py:44 +msgid "Full width" +msgstr "Pleine largeur" + +#: content_manager/abstract.py:45 +msgid "Darken background image" +msgstr "Assombrir l’image de fond" + +#: content_manager/abstract.py:48 +msgid "Call to action text" +msgstr "Texte de l’appel à action" + +#: content_manager/abstract.py:58 content_manager/blocks.py:323 +#: content_manager/blocks.py:637 +msgid "" +"Please use only one primary button. If you use icons, align them on the same " +"side." +msgstr "" +"Merci de n’utiliser qu’un seul bouton primaire. Si vous utilisez des icônes, " +"alignez-les du même côté." + +#: content_manager/abstract.py:67 +msgid "Call to action label" +msgstr "Libellé de l’appel à action" + +#: content_manager/abstract.py:69 content_manager/abstract.py:78 +#: content_manager/blocks.py:648 content_manager/blocks.py:655 +msgid "" +"This field is obsolete and will be removed in the near future. Please " +"replace with the CTA buttons above." +msgstr "" +"Ce champ est obsolète et sera prochainement supprimé. Merci de le remplacer " +"avec les boutons de l’appel à action ci-dessus." + +#: content_manager/abstract.py:76 +msgid "Call to action link" +msgstr "Lien de l’appel à action" + +#: content_manager/abstract.py:85 +msgid "Body" +msgstr "Corps" + +#: content_manager/abstract.py:89 +msgid "Common page configuration" +msgstr "Configuration commune" + +#: content_manager/abstract.py:100 content_manager/blocks.py:641 +msgid "Call-to-action buttons" +msgstr "Boutons de l’appel à action" + +#: content_manager/abstract.py:105 +msgid "Header options" +msgstr "Options d’en-tête" + +#: content_manager/abstract.py:125 +msgid "Base page" +msgstr "Page de base" + +#: content_manager/abstract.py:126 +msgid "Base pages" +msgstr "Pages de base" + +#: content_manager/blocks.py:77 +msgid "Page" +msgstr "Page" + +#: content_manager/blocks.py:79 +msgid "" +"Link to a page of this site. Use either this, the document, or the external " +"URL parameter." +msgstr "" +"Lien vers une page du site. Utilisez soit ce champ, soit le champ document, " +"soit le champ URL externe." + +#: content_manager/blocks.py:82 +msgid "Document" +msgstr "Document" + +#: content_manager/blocks.py:83 +msgid "Use either this, the external URL or the page parameter." +msgstr "Utilisez soit ce champ, soit le champ URL externe, soit le champ Page." + +#: content_manager/blocks.py:87 +msgid "External URL" +msgstr "URL externe" + +#: content_manager/blocks.py:89 +msgid "Use either this, the document or the page parameter." +msgstr "Utilisez soit ce champ, soit le champ Document, soit le champ Page." + +#: content_manager/blocks.py:98 +msgid "Link label" +msgstr "Libellé du lien" + +#: content_manager/blocks.py:106 content_manager/blocks.py:281 +#: content_manager/blocks.py:385 content_manager/blocks.py:525 +#: content_manager/blocks.py:586 +msgid "Link" +msgstr "Lien" + +#: content_manager/blocks.py:114 +msgid "Button type" +msgstr "Type de bouton" + +#: content_manager/blocks.py:115 content_manager/blocks.py:146 +#: content_manager/blocks.py:199 content_manager/blocks.py:450 +msgid "Icon" +msgstr "Icône" + +#: content_manager/blocks.py:117 +msgid "Icon side" +msgstr "Côté de l’icône" + +#: content_manager/blocks.py:129 content_manager/blocks.py:137 +#: content_manager/blocks.py:453 +msgid "Button" +msgstr "Bouton" + +#: content_manager/blocks.py:147 +msgid "Only used for internal links." +msgstr "Uniquement pour les liens internes." + +#: content_manager/blocks.py:153 content_manager/blocks.py:473 +msgid "Size" +msgstr "Taille" + +#: content_manager/blocks.py:167 +msgid "New" +msgstr "Nouveau" + +#: content_manager/blocks.py:167 +msgid "Grey" +msgstr "Gris" + +#: content_manager/blocks.py:168 +msgid "System colors" +msgstr "Couleurs système" + +#: content_manager/blocks.py:169 +msgid "Illustration colors" +msgstr "Couleurs illustratives" + +#: content_manager/blocks.py:174 +msgid "Badge label" +msgstr "Texte du badge" + +#: content_manager/blocks.py:175 +msgid "Badge color" +msgstr "Couleur du badge" + +#: content_manager/blocks.py:176 +msgid "Hide badge icon" +msgstr "Masquer l’icône du badge" + +#: content_manager/blocks.py:183 +msgid "Badge" +msgstr "Badge" + +#: content_manager/blocks.py:191 content_manager/blocks.py:262 +#: content_manager/blocks.py:373 content_manager/blocks.py:417 +#: content_manager/blocks.py:422 content_manager/blocks.py:443 +#: content_manager/blocks.py:485 content_manager/blocks.py:560 +#: content_manager/blocks.py:615 content_manager/blocks.py:624 +#: content_manager/blocks.py:666 content_manager/blocks.py:764 +#: content_manager/blocks.py:861 content_manager/models.py:276 +msgid "Title" +msgstr "Titre" + +#: content_manager/blocks.py:192 +msgid "Small tag" +msgstr "Petit tag" + +#: content_manager/blocks.py:194 +msgid "Tag color" +msgstr "Couleur du tag" + +#: content_manager/blocks.py:197 +msgid "Only for clickable tags" +msgstr "Uniquement pour les tags cliquables" + +#: content_manager/blocks.py:207 +msgctxt "DSFR Tag" +msgid "Tag" +msgstr "Tag" + +#: content_manager/blocks.py:264 content_manager/blocks.py:375 +#: content_manager/blocks.py:431 content_manager/blocks.py:445 +#: content_manager/blocks.py:562 content_manager/blocks.py:766 +#: content_manager/blocks.py:863 +msgid "Heading level" +msgstr "Niveau de titre" + +#: content_manager/blocks.py:267 content_manager/blocks.py:378 +#: content_manager/blocks.py:434 content_manager/blocks.py:448 +#: content_manager/blocks.py:566 +msgid "Adapt to the page layout. Defaults to heading 3." +msgstr "À adapter à la structure de la page. Par défaut en-tête 3." + +#: content_manager/blocks.py:269 content_manager/blocks.py:381 +#: content_manager/blocks.py:418 content_manager/blocks.py:452 +#: content_manager/blocks.py:466 content_manager/blocks.py:891 +msgid "Content" +msgstr "Contenu" + +#: content_manager/blocks.py:270 content_manager/blocks.py:383 +#: content_manager/blocks.py:505 content_manager/blocks.py:568 +#: content_manager/blocks.py:594 content_manager/blocks.py:796 +msgid "Image" +msgstr "Image" + +#: content_manager/blocks.py:272 content_manager/blocks.py:345 +#: content_manager/blocks.py:580 +msgid "Image ratio" +msgstr "Ratio de l’image" + +#: content_manager/blocks.py:278 +msgid "Image area badge" +msgstr "Badge de la zone image" + +#: content_manager/blocks.py:278 +msgid "Only used if the card has an image." +msgstr "Uniquement utilisé si la carte a une image." + +#: content_manager/blocks.py:285 content_manager/blocks.py:653 +msgid "Link (obsolete)" +msgstr "Lien (obsolète)" + +#: content_manager/blocks.py:289 content_manager/blocks.py:297 +#: content_manager/blocks.py:533 content_manager/blocks.py:541 +#: content_manager/blocks.py:549 +msgid "" +"This field is obsolete and will be removed in the near future. Please " +"replace with the Link field above." +msgstr "" +"Ce champ est obsolète et sera prochainement supprimé. Merci de le remplacer " +"avec le champ Lien ci-dessus." + +#: content_manager/blocks.py:293 +msgid "or Document (obsolete)" +msgstr "ou Document (obsolète)" + +#: content_manager/blocks.py:300 +msgid "Top detail: text" +msgstr "Détail du haut : texte" + +#: content_manager/blocks.py:301 +msgid "Top detail: icon" +msgstr "Détail du haut : icône" + +#: content_manager/blocks.py:307 content_manager/blocks.py:393 +msgid "Top detail: badges or tags" +msgstr "Détail du haut : badges ou tags" + +#: content_manager/blocks.py:312 content_manager/blocks.py:351 +msgid "Bottom detail: text" +msgstr "Détail du bas : texte" + +#: content_manager/blocks.py:313 +msgid "Incompatible with the bottom call-to-action." +msgstr "Incompatible avec l’appel à action en bas de carte." + +#: content_manager/blocks.py:316 +msgid "Bottom detail: icon" +msgstr "Détail du bas : icône" + +#: content_manager/blocks.py:327 +msgid "Bottom call-to-action: links or buttons" +msgstr "Appel à action en bas de la carte" + +#: content_manager/blocks.py:328 +msgid "Incompatible with the bottom detail text." +msgstr "Incompatible avec le détail du bas." + +#: content_manager/blocks.py:332 +msgid "Card with grey background" +msgstr "Carte avec arrière-plan gris" + +#: content_manager/blocks.py:333 +msgid "Card without background" +msgstr "Carte sans arrière-plan" + +#: content_manager/blocks.py:334 +msgid "Card without border" +msgstr "Carte sans bordure" + +#: content_manager/blocks.py:335 +msgid "Card with a shadow" +msgstr "Carte avec une ombre" + +#: content_manager/blocks.py:353 +msgid "" +"Incompatible with the bottom call-to-action. If the card links to a " +"downloadable document, the values are pre-filled." +msgstr "" +"Incompatible avec l’appel à action en bas de carte. Si la carte pointe vers " +"un document téléchargeable, les valeurs sont pré-remplies." + +#: content_manager/blocks.py:383 +msgid "Prefer SVG files." +msgstr "Privilégier les fichiers SVG." + +#: content_manager/blocks.py:398 +msgid "Detail text" +msgstr "Texte de détail" + +#: content_manager/blocks.py:400 +msgid "" +"If the tile links to a downloadable document, the values are pre-filled." +msgstr "" +"Si la tuile pointe vers un document téléchargeable, les valeurs sont pré-" +"remplies." + +#: content_manager/blocks.py:402 +msgid "Small tile" +msgstr "Petite tuile" + +#: content_manager/blocks.py:403 +msgid "Tile with grey background" +msgstr "Tuile avec arrière-plan gris" + +#: content_manager/blocks.py:404 +msgid "Tile without background" +msgstr "Tuile sans arrière-plan" + +#: content_manager/blocks.py:405 +msgid "Tile without border" +msgstr "Tuile sans bordure" + +#: content_manager/blocks.py:406 +msgid "Tile with a shadow" +msgstr "Tuile avec une ombre" + +#: content_manager/blocks.py:407 +msgid "Horizontal tile" +msgstr "Tuile horizontale" + +#: content_manager/blocks.py:423 +msgid "Accordion" +msgstr "Accordéon" + +#: content_manager/blocks.py:427 +msgid "Message title" +msgstr "Titre du message" + +#: content_manager/blocks.py:428 +msgid "Message text" +msgstr "Texte du message" + +#: content_manager/blocks.py:429 +msgid "Message type" +msgstr "Type de message" + +#: content_manager/blocks.py:455 content_manager/blocks.py:468 +#: content_manager/blocks.py:599 +msgid "Color" +msgstr "Couleur" + +#: content_manager/blocks.py:486 +msgid "" +"Accessibility: The title should describe, in a clear and concise manner, the " +"embedded content." +msgstr "" +"Accessibilité : Le titre doit décrire, de façon claire et concise, le " +"contenu embarqué." + +#: content_manager/blocks.py:489 +msgid "URL of the iframe" +msgstr "URL de l‘iframe" + +#: content_manager/blocks.py:490 +msgid "Example for Tally: https://tally.so/embed/w2jMRa" +msgstr "Exemple pour Tally : https://tally.so/embed/w2jMRa" + +#: content_manager/blocks.py:492 +msgid "Height (in pixels)" +msgstr "Hauteur (en pixels)" + +#: content_manager/blocks.py:494 +msgid "Parameters" +msgstr "Paramètres" + +#: content_manager/blocks.py:495 +msgid "For example: \"allow='geolocation'\"." +msgstr "Par exemple : « allow='geolocation' »." + +#: content_manager/blocks.py:507 +msgid "Side where the image is displayed" +msgstr "Côté où afficher l’image" + +#: content_manager/blocks.py:509 content_manager/constants.py:11 +msgid "Left" +msgstr "Gauche" + +#: content_manager/blocks.py:510 content_manager/constants.py:12 +msgid "Right" +msgstr "Droite" + +#: content_manager/blocks.py:515 +msgid "Image width" +msgstr "Largeur de l’image" + +#: content_manager/blocks.py:523 content_manager/blocks.py:631 +#: content_manager/blocks.py:795 content_manager/blocks.py:899 +msgid "Rich text" +msgstr "Texte avec mise en forme" + +#: content_manager/blocks.py:527 +msgid "The link is shown at the bottom of the text block, with an arrow" +msgstr "Le lien est affiché en bas du bloc de texte, avec une flèche" + +#: content_manager/blocks.py:530 +msgid "Link label (obsolete)" +msgstr "Libellé du lien (obsolète)" + +#: content_manager/blocks.py:538 +msgid "Internal link (obsolete)" +msgstr "Lien interne (obsolète)" + +#: content_manager/blocks.py:546 +msgid "Link URL (obsolete)" +msgstr "URL du lien (obsolète)" + +#: content_manager/blocks.py:570 +msgid "Alternative text (textual description of the image)" +msgstr "Alternative textuelle (description textuelle de l’image)" + +#: content_manager/blocks.py:574 content_manager/blocks.py:687 +msgid "Witdh" +msgstr "Largeur" + +#: content_manager/blocks.py:585 content_manager/blocks.py:676 +msgid "Caption" +msgstr "Légende" + +#: content_manager/blocks.py:595 content_manager/blocks.py:801 +#: content_manager/blocks.py:905 +msgid "Quote" +msgstr "Citation" + +#: content_manager/blocks.py:596 +msgid "Author name" +msgstr "Nom de l’auteur" + +#: content_manager/blocks.py:597 +msgid "Author title" +msgstr "Titre de l’auteur" + +#: content_manager/blocks.py:610 +msgid "Top margin" +msgstr "Espacement au dessus" + +#: content_manager/blocks.py:611 +msgid "Bottom margin" +msgstr "Espacement en dessous" + +#: content_manager/blocks.py:616 +msgid "Detail" +msgstr "Détail" + +#: content_manager/blocks.py:620 +msgid "Step" +msgstr "Étape" + +#: content_manager/blocks.py:625 +msgid "Number of steps" +msgstr "Nombre d’étapes" + +#: content_manager/blocks.py:626 +msgid "Current step" +msgstr "Étape actuelle" + +#: content_manager/blocks.py:627 +msgid "Steps" +msgstr "Étapes" + +#: content_manager/blocks.py:646 +msgid "Call to action label (obsolete)" +msgstr "Libellé de l’appel à action (obsolète)" + +#: content_manager/blocks.py:667 +msgid "Transcription content" +msgstr "Contenu de la transcription" + +#: content_manager/blocks.py:675 +msgid "Video title" +msgstr "Titre de la vidéo" + +#: content_manager/blocks.py:678 +msgid "Video URL" +msgstr "URL de la vidéo" + +#: content_manager/blocks.py:680 +msgid "" +"Use embed format, with a version that doesn't require a consent banner if " +"available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For " +"Youtube, use Embed video and check Enable privacy-enhanced mode." +msgstr "" +"Utiliser le format d’intégration, avec une version qui ne nécessite pas de " +"bannière de consentement si possible (par exemple : https://www.youtube-" +"nocookie.com/embed/gLzXOViPX-0) Pour Youtube, cliquez sur « Intégrer la " +"vidéo » puis cochez « Activer le mode de confidentialité avancé »." + +#: content_manager/blocks.py:693 +msgid "Video ratio" +msgstr "Ratio de la vidéo" + +#: content_manager/blocks.py:698 content_manager/blocks.py:798 +#: content_manager/blocks.py:907 +msgid "Transcription" +msgstr "Transcription" + +#: content_manager/blocks.py:770 content_manager/blocks.py:867 +msgid "Adapt to the page layout. Defaults to heading 2." +msgstr "À adapter à la structure de la page. Par défaut en-tête 2." + +#: content_manager/blocks.py:772 +msgid "Blog" +msgstr "Blog" + +#: content_manager/blocks.py:774 +msgid "Number of entries" +msgstr "Nombre d’articles" + +#: content_manager/blocks.py:776 +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:11 +msgid "Filter by category" +msgstr "Filtrer par catégorie" + +#: content_manager/blocks.py:777 +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:28 +msgid "Filter by tag" +msgstr "Filtrer par étiquette" + +#: content_manager/blocks.py:778 +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:45 +msgid "Filter by author" +msgstr "Filtrer par auteur" + +#: content_manager/blocks.py:781 +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:60 +msgid "Filter by source" +msgstr "Filtrer par source" + +#: content_manager/blocks.py:782 +msgid "The source is the organization of the post author" +msgstr "" +"La source est l’organisation à laquelle appartient l’auteur de l’article" + +#: content_manager/blocks.py:785 +msgid "Show filters" +msgstr "Afficher les filtres" + +#: content_manager/blocks.py:797 content_manager/blocks.py:906 +msgid "Video" +msgstr "Vidéo" + +#: content_manager/blocks.py:799 content_manager/blocks.py:903 +msgid "Callout" +msgstr "Mise en avant" + +#: content_manager/blocks.py:799 content_manager/blocks.py:800 +#: content_manager/blocks.py:801 content_manager/blocks.py:804 +#: content_manager/blocks.py:805 content_manager/blocks.py:813 +#: content_manager/blocks.py:838 content_manager/blocks.py:878 +#: content_manager/blocks.py:903 content_manager/blocks.py:904 +#: content_manager/blocks.py:905 content_manager/blocks.py:911 +#: content_manager/blocks.py:912 content_manager/blocks.py:913 +#: content_manager/blocks.py:914 +msgid "DSFR components" +msgstr "Composants du DSFR" + +#: content_manager/blocks.py:800 content_manager/blocks.py:904 +msgid "Highlight" +msgstr "Mise en exergue" + +#: content_manager/blocks.py:802 +msgid "Text and call to action" +msgstr "Texte et appel à action" + +#: content_manager/blocks.py:803 content_manager/blocks.py:910 +msgid "Single link" +msgstr "Lien isolé" + +#: content_manager/blocks.py:804 content_manager/blocks.py:916 +msgid "Iframe" +msgstr "Iframe" + +#: content_manager/blocks.py:805 content_manager/blocks.py:912 +msgid "Tile" +msgstr "Tuile" + +#: content_manager/blocks.py:806 content_manager/blocks.py:931 +msgid "Blog recent entries" +msgstr "Articles récents du blog" + +#: content_manager/blocks.py:806 content_manager/blocks.py:926 +#: content_manager/blocks.py:931 +msgid "Website structure" +msgstr "Structure du site" + +#: content_manager/blocks.py:813 content_manager/blocks.py:838 +msgid "Vertical card" +msgstr "Carte verticale" + +#: content_manager/blocks.py:818 +msgid "Column width" +msgstr "Largeur de colonne" + +#: content_manager/blocks.py:828 +msgid "The total width of all columns should be 12." +msgstr "La largeur totale de toutes les colonnes doit être 12." + +#: content_manager/blocks.py:831 +msgid "Column content" +msgstr "Contenu de la colonnne" + +#: content_manager/blocks.py:839 +msgid "Adjustable column" +msgstr "Colonne ajustable" + +#: content_manager/blocks.py:839 content_manager/blocks.py:917 +#: content_manager/blocks.py:918 content_manager/blocks.py:919 +msgid "Page structure" +msgstr "Structure de la page" + +#: content_manager/blocks.py:846 content_manager/blocks.py:885 +msgid "Background image" +msgstr "Image de fond" + +#: content_manager/blocks.py:853 +msgid "Background color, hexadecimal format (obsolete)" +msgstr "Couleur de fond, format hexadécimal (obsolète)" + +#: content_manager/blocks.py:856 +msgid "" +"This field is obsolete and will be removed in the near future. Replace it " +"with the background color." +msgstr "" +"Ce champ est obsolète et sera prochainement supprimé. Merci de le remplacer " +"avec la couleur de fond." + +#: content_manager/blocks.py:858 +msgid "Incorrect color format, must be #fff or #f5f5f5" +msgstr "Format de couleur incorrect, doit être #fff ou #f5f5f5" + +#: content_manager/blocks.py:869 +msgid "Columns" +msgstr "Colonnes" + +#: content_manager/blocks.py:877 content_manager/blocks.py:901 +msgid "Image and text" +msgstr "Image et texte" + +#: content_manager/blocks.py:878 content_manager/blocks.py:911 +msgid "Horizontal card" +msgstr "Carte horizontale" + +#: content_manager/blocks.py:902 +msgid "Alert message" +msgstr "Message d’alerte" + +#: content_manager/blocks.py:908 +msgid "Badge list" +msgstr "Liste de badges" + +#: content_manager/blocks.py:909 +msgid "Tag list" +msgstr "Liste de tags" + +#: content_manager/blocks.py:913 +msgid "Accordions" +msgstr "Accordéons" + +#: content_manager/blocks.py:914 +msgid "Stepper" +msgstr "Étapier" + +#: content_manager/blocks.py:915 +msgid "Markdown" +msgstr "Markdown" + +#: content_manager/blocks.py:915 content_manager/blocks.py:916 +#: content_manager/blocks.py:946 +msgid "Expert syntax" +msgstr "Syntaxe experte" + +#: content_manager/blocks.py:917 +msgid "Separator" +msgstr "Séparateur" + +#: content_manager/blocks.py:918 +msgid "Multiple columns" +msgstr "Multi-colonnes" + +#: content_manager/blocks.py:919 +msgid "Full width background" +msgstr "Fond pleine largeur" + +#: content_manager/blocks.py:923 +msgid "Subpages list" +msgstr "Liste des sous-pages" + +#: content_manager/blocks.py:924 +msgid "A simple, alphabetical list of the subpages of the current page." +msgstr "" +"Une liste alphabétique toute simple des sous-pages de la page actuelle." + +#: content_manager/blocks.py:944 +msgid "" +"Warning: Use HTML block with caution. Malicious code can compromise the " +"security of the site." +msgstr "" +"Avertissement : Utilisez le bloc HTML avec précaution. Un code malveillant " +"peut compromettre la sécurité du site." + +#: content_manager/constants.py:4 +msgid "Primary" +msgstr "Primaire" + +#: content_manager/constants.py:5 +msgid "Secundary" +msgstr "Secondaire" + +#: content_manager/constants.py:6 +msgid "Tertiary" +msgstr "Tertiaire" + +#: content_manager/constants.py:7 +msgid "Tertiary without border" +msgstr "Tertiaire sans bordure" + +#: content_manager/constants.py:16 content_manager/constants.py:25 +msgid "Heading 2" +msgstr "En-tête 2" + +#: content_manager/constants.py:17 content_manager/constants.py:26 +msgid "Heading 3" +msgstr "En-tête 3" + +#: content_manager/constants.py:18 content_manager/constants.py:27 +msgid "Heading 4" +msgstr "En-tête 4" + +#: content_manager/constants.py:19 content_manager/constants.py:28 +msgid "Heading 5" +msgstr "En-tête 5" + +#: content_manager/constants.py:20 +msgid "Heading 6" +msgstr "En-tête 6" + +#: content_manager/constants.py:21 +msgid "Paragraph" +msgstr "Paragraphe" + +#: content_manager/constants.py:37 +msgid "Error" +msgstr "Erreur" + +#: content_manager/constants.py:38 +msgid "Success" +msgstr "Succès" + +#: content_manager/constants.py:39 +msgid "Information" +msgstr "Information" + +#: content_manager/constants.py:40 +msgid "Warning" +msgstr "Avertissement" + +#: content_manager/constants.py:62 content_manager/constants.py:74 +#: content_manager/constants.py:80 +msgid "Small" +msgstr "Petit" + +#: content_manager/constants.py:63 content_manager/constants.py:75 +#: content_manager/constants.py:81 +msgid "Medium" +msgstr "Medium" + +#: content_manager/constants.py:64 content_manager/constants.py:76 +#: content_manager/constants.py:82 +msgid "Large" +msgstr "Large" + +#: content_manager/constants.py:68 +msgid "No icon" +msgstr "Pas d’icône" + +#: content_manager/constants.py:69 +msgid "Icon on the right side" +msgstr "Icône du côté droit" + +#: content_manager/constants.py:70 +msgid "Icon on the left side" +msgstr "Icône du côté gauche" + +#: content_manager/models.py:25 +msgid "Content page" +msgstr "Page de contenu" + +#: content_manager/models.py:42 +msgid "Tag" +msgstr "Étiquette" + +#: content_manager/models.py:94 +msgid "Site configuration" +msgstr "Configuration du site" + +#: content_manager/models.py:95 +msgid "Site configurations" +msgstr "Configurations du site" + +#: content_manager/models.py:98 +msgid "Institution (header)" +msgstr "Institution (en-tête)" + +#: content_manager/models.py:101 +msgid "" +"Institution brand as defined on page https://www.info.gouv.fr/marque-de-" +"letat/le-bloc-marque" +msgstr "" +"Nom de l’institution tel que défini sur la page https://www.info.gouv.fr/" +"marque-de-letat/le-bloc-marque" + +#: content_manager/models.py:105 +msgid "Institution with line break (header)" +msgstr "Institution avec césure (en-tête)" + +#: content_manager/models.py:109 +msgid "Institution brand with
tags for line breaks" +msgstr "Nom de l’institution avec des
pour les retours à la ligne" + +#: content_manager/models.py:112 +msgid "Institution (footer)" +msgstr "Institution (pied)" + +#: content_manager/models.py:119 +msgid "Institution with line break (footer)" +msgstr "Institution avec césure (pied)" + +#: content_manager/models.py:126 content_manager/models.py:128 +msgid "Site title" +msgstr "Titre du site" + +#: content_manager/models.py:132 content_manager/models.py:134 +msgid "Site tagline" +msgstr "Sous-titre du site" + +#: content_manager/models.py:139 +msgid "Important notice" +msgstr "Bandeau d’information importante" + +#: content_manager/models.py:144 +msgid "" +"The important notice banner should only be used for essential and temporary " +"information. (Excessive or continuous use risks “drowning” the " +"message.)" +msgstr "" +"Le bandeau d’information importante doit être utilisé uniquement pour une " +"information primordiale et temporaire. (Une utilisation excessive ou " +"continue risque de “noyer” le message)" + +#: content_manager/models.py:149 +msgid "Show the BETA tag next to the title" +msgstr "Afficher la mention BETA à côté du titre" + +#: content_manager/models.py:152 content_manager/models.py:312 +msgid "Description" +msgstr "Description" + +#: content_manager/models.py:165 content_manager/models.py:209 +msgid "Operator logo" +msgstr "Logo opérateur" + +#: content_manager/models.py:169 +msgid "Logo alt text" +msgstr "Alternative textuelle du logo" + +#: content_manager/models.py:172 +msgid "Must contain the text present in the image." +msgstr "Doit impérativement contenir le texte présent dans l’image." + +#: content_manager/models.py:175 +msgid "Width (em)" +msgstr "Largeur (em)" + +#: content_manager/models.py:181 +msgid "" +"To be adjusted according to the width of the logo. Example for a " +"vertical logo: 3.5, Example for a horizontal logo: 8." +msgstr "" +"À ajuster en fonction de la largeur du logo. Exemple pour un logo vertical: " +"3.5, Exemple pour un logo horizontal: 8." + +#: content_manager/models.py:190 +msgid "Newsletter description" +msgstr "Description de la lettre d’information" + +#: content_manager/models.py:193 +msgid "Newsletter registration URL" +msgstr "URL d‘inscription à la lettre d’information" + +#: content_manager/models.py:218 +msgid "Advanced settings" +msgstr "Paramètres avancés" + +#: content_manager/models.py:228 +msgid "Header" +msgstr "En-tête" + +#: content_manager/models.py:235 +msgid "Footer" +msgstr "Pied de page" + +#: content_manager/models.py:245 +msgid "Newsletter" +msgstr "Lettre d’information" + +#: content_manager/models.py:247 content_manager/models.py:293 +msgid "Social media items" +msgstr "Liens de réseaux sociaux" + +#: content_manager/models.py:251 +msgid "Generic" +msgstr "Génériques" + +#: content_manager/models.py:252 +msgid "Brand block" +msgstr "Bloc-marque" + +#: content_manager/models.py:253 +msgid "Newsletter and social media" +msgstr "Lettre d’information et réseaux sociaux" + +#: content_manager/models.py:279 +msgid "URL" +msgstr "URL" + +#: content_manager/models.py:283 +msgid "Icon class" +msgstr "Classe d’icône" + +#: content_manager/models.py:292 +msgid "Social media item" +msgstr "Lien de réseau social" + +#: content_manager/models.py:299 +msgid "Category" +msgstr "Catégorie" + +#: content_manager/models.py:302 +msgid "Mega menu category" +msgstr "Catégorie de méga menu" + +#: content_manager/models.py:303 +msgid "Mega menu categories" +msgstr "Catégories de méga menu" + +#: content_manager/models.py:308 +msgid "Name" +msgstr "Nom" + +#: content_manager/models.py:313 +msgid "Main link" +msgstr "Lien principal" + +#: content_manager/models.py:323 +msgid "Categories" +msgstr "Catégories" + +#: content_manager/models.py:324 +msgid "Maximum 4 categories, each with maximum 8 links." +msgstr "Maximum 4 catégories, chacune contenant maximum 8 liens." + +#: content_manager/models.py:335 +msgid "Mega menu" +msgstr "Méga menu" + +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:109 +msgid "No article found." +msgstr "Aucun article trouvé." + +#: content_manager/templates/content_manager/blocks/blog_recent_entries.html:114 +msgid "See all posts" +msgstr "Voir tous les articles" + +#: content_manager/templates/content_manager/blocks/card_horizontal.html:11 +#: content_manager/templates/content_manager/blocks/card_vertical.html:11 +#: content_manager/templates/content_manager/blocks/link.html:9 +#: content_manager/templates/content_manager/blocks/tile.html:12 +msgid "Opens a new window" +msgstr "Ouvre une nouvelle fenêtre" + +#: content_manager/templates/content_manager/blocks/download_info.html:5 +msgid "Unknown file format" +msgstr "Format de fichier inconnu" + +#: content_manager/templates/content_manager/blocks/download_info.html:11 +msgid "Unknown file size" +msgstr "Taille de fichier inconnue" + +#: content_manager/templates/content_manager/blocks/image.html:13 +msgid "Go to page" +msgstr "Aller à la page" + +#: content_manager/templates/content_manager/blocks/video.html:10 +msgid "Watch on the site" +msgstr "Voir sur le site" + +#: content_manager/templates/content_manager/tags_list_page.html:31 +#: content_manager/views.py:46 content_manager/views.py:77 +msgid "Tags" +msgstr "Étiquettes" + +#: content_manager/templates/content_manager/widgets/dsfr-icon-picker-widget.html:9 +msgid "Select icon" +msgstr "Sélectionner une icône" + +#: content_manager/urls.py:8 +msgid "search/" +msgstr "recherche/" + +#: content_manager/views.py:52 +msgid "List of all the tags." +msgstr "Liste de toutes les étiquettes." + +#: content_manager/views.py:73 +#, python-brace-format +msgid "Pages tagged with {tag}" +msgstr "Pages avec l’étiquette {tag}" + +#: content_manager/views.py:82 +#, python-brace-format +msgid "List of pages tagged with {tag}" +msgstr "Liste de pages avec l’étiquette {tag}" + +#~ msgid "The link appears as a button under the text block" +#~ msgstr "Le lien apparaît comme un bouton sous le bloc de texte" + +#~ msgid "Can contain HTML." +#~ msgstr "Peut contenir du HTML." + +#~ msgid "Callout title" +#~ msgstr "Titre de l’appel à action" + +#~ msgid "Callout text" +#~ msgstr "Texte de l’appel à action" + +#~ msgid "" +#~ "Select a document to make the card link to it (if the 'Link' field is not " +#~ "populated.)" +#~ msgstr "" +#~ "Sélectionnez un document pour faire pointer la carte dessus (si le champ " +#~ "« Lien » est vide.)" + +#~ msgid "Card" +#~ msgstr "Carte" + +#~ msgid "Link to a page, use this or the external URL parameter" +#~ msgstr "" +#~ "Lien vers une page du site. Utilisez soit ce champ soit le champ URL " +#~ "externe." + +#~ msgid "Use this or the Page parameter" +#~ msgstr "Utilisez soit ce champ soit le champ Page." diff --git a/content_manager/management/__init__.py b/content_manager/management/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/management/commands/__init__.py b/content_manager/management/commands/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/management/commands/create_demo_pages.py b/content_manager/management/commands/create_demo_pages.py new file mode 100644 index 000000000..7b9ccb758 --- /dev/null +++ b/content_manager/management/commands/create_demo_pages.py @@ -0,0 +1,308 @@ +from django.core.management.base import BaseCommand +from faker import Faker +from forms.models import FormField, FormPage +from taggit.models import slugify +from wagtail.models import Site +from wagtail.rich_text import RichText +from wagtailmenus.models.menuitems import FlatMenuItem, MainMenuItem +from wagtailmenus.models.menus import FlatMenu, MainMenu + +from blog.models import BlogIndexPage +from content_manager.models import ContentPage, MegaMenu, MegaMenuCategory + + +ALL_ALLOWED_SLUGS = ["blog_index", "publications", "menu_page", "form"] + +fake = Faker("fr_FR") + + +class Command(BaseCommand): + help = """ + Creates a series of demo pages with a variety of content. + """ + + def add_arguments(self, parser): + parser.add_argument( + "--slug", nargs="+", type=str, help="[Optional] Slug of the page(s) to create", choices=ALL_ALLOWED_SLUGS + ) + + def handle(self, *args, **kwargs): + slugs = kwargs.get("slug") + + if not slugs: + slugs = ALL_ALLOWED_SLUGS + + site = Site.objects.filter(is_default_site=True).first() + + # First, add the home page to the main menu if not already done + home_page = site.root_page + main_menu = MainMenu.objects.first() + if not main_menu: + main_menu = MainMenu.objects.create(site=site) + MainMenuItem.objects.update_or_create( + link_page=home_page, menu=main_menu, defaults={"link_text": "Accueil", "sort_order": 0} + ) + + for slug in slugs: + if slug == "blog_index": + blog_index = self.create_blog_index(home_page) + MainMenuItem.objects.update_or_create(link_page=blog_index, menu=main_menu, defaults={"sort_order": 1}) + + # to/do add example blog pages + + elif slug == "publications": + self.create_publication_pages(site, home_page, main_menu) + + elif slug == "menu_page": + # A blank page that is just destined to have a list of its subpages. + body = [("subpageslist", None)] + menu_page = self.create_content_page(slug, title="Pages d’exemple", body=body, parent_page=home_page) + + # Inserts it right before the last entry + contact_menu_entry = MainMenuItem.objects.filter(menu=main_menu).last() + MainMenuItem.objects.update_or_create( + link_page=menu_page, menu=main_menu, defaults={"sort_order": contact_menu_entry.sort_order} + ) + contact_menu_entry.sort_order += 1 + contact_menu_entry.save() + + elif slug == "form": + menu_page = ContentPage.objects.get(slug="menu_page") + self.create_form_page("form_with_all_fields", parent_page=menu_page) + else: + raise ValueError(f"Valeur inconnue : {slug}") + + def create_blog_index(self, home_page) -> BlogIndexPage: + """ + Create the blog index + """ + + # Don't replace a manually created page + already_exists = BlogIndexPage.objects.filter(slug="actualités").first() + if already_exists: + self.stdout.write(f"The page seem to already exist with id {already_exists.id}") + return already_exists + + # Create the page + body = [] + title = "Actualités" + + text_raw = """

Bienvenue !

+ +

Vous trouverez ici nos dernières actualités

+ """ + + body.append(("paragraph", RichText(text_raw))) + + blog_index = home_page.add_child( + instance=BlogIndexPage(title=title, body=body, slug="actualités", show_in_menus=True) + ) + + self.stdout.write(self.style.SUCCESS(f"Blog index page created with id {blog_index.id}")) + + return blog_index + + def create_content_page(self, slug: str, title: str, body: list, parent_page: ContentPage) -> ContentPage: + """ + Creates a page for the site. + """ + + # Don't replace or duplicate an already existing page + already_exists = ContentPage.objects.filter(slug=slug).first() + if already_exists: + self.stdout.write(f"The {slug} page seem to already exist with id {already_exists.id}") + return already_exists + + new_page = parent_page.add_child(instance=ContentPage(title=title, body=body, slug=slug, show_in_menus=True)) + + self.stdout.write(self.style.SUCCESS(f"Page {slug} created with id {new_page.id}")) + + return new_page + + def create_publication_pages(self, site, home_page, main_menu): + slug = "publications" + title = "Publications" + body = [] + + text_raw = """

Veuillez trouver ici une liste de publications

""" + body.append(("paragraph", RichText(text_raw))) + + publications_page = self.create_content_page(slug=slug, title=title, body=body, parent_page=home_page) + publications_menu_item, _created = MainMenuItem.objects.update_or_create( + link_page=publications_page, menu=main_menu, defaults={"sort_order": 2} + ) + + # Create the mega menu + publications_mega_menu, _created = MegaMenu.objects.get_or_create( + name="Méga-menu publications", + parent_menu_item_id=publications_menu_item.id, + description="Ceci est une description", + ) + + # Create a set of publications sub-pages + for i in range(4): + menu_category_menu, _created = FlatMenu.objects.get_or_create( + site_id=site.id, + title=f"Menu publications > Catégorie {i + 1}", + handle=f"mega_menu_section_{i + 1}", + heading=f"Colonne {i + 1}", + ) + + menu_category, _created = MegaMenuCategory.objects.get_or_create( + mega_menu=publications_mega_menu, sort_order=i, category=menu_category_menu + ) + + for j in range(8): + title = f"Page {i + 1} - {j + 1}" + + body = [] + text = "" + for p in fake.paragraphs(): + text += f"

{p}

\n" + body.append(("paragraph", RichText(text))) + + new_page = self.create_content_page( + slug=slugify(title), title=title, body=body, parent_page=publications_page + ) + + FlatMenuItem.objects.get_or_create(link_page=new_page, menu=menu_category_menu, sort_order=j) + + publications_mega_menu.categories.add(menu_category) + publications_mega_menu.save() + + def create_form_page(self, slug: str, parent_page: ContentPage) -> None: + """ + Creates a form page with all the different forms + """ + + # Don't replace a manually created page + already_exists = ContentPage.objects.filter(slug=slug).first() + if already_exists: + self.stdout.write(f"The page seem to already exist with id {already_exists.id}") + return + + # Create the form page + title = "Formulaire avec tous les champs" + intro = RichText("

Texte d’introduction

") + + thank_you_text = RichText("

Merci pour votre message !

") + + form_page = parent_page.add_child( + instance=FormPage(title=title, slug=slug, intro=intro, thank_you_text=thank_you_text, show_in_menus=True) + ) + + # Create the form fields + fields = [ + { + "sort_order": 0, + "clean_name": "champ_texte", + "label": "Champ texte", + "required": True, + "choices": "", + "default_value": "", + "help_text": "", + "page": form_page, + "field_type": "singleline", + }, + { + "sort_order": 1, + "clean_name": "zone_de_texte", + "label": "Zone de texte", + "required": True, + "page": form_page, + "field_type": "multiline", + }, + { + "sort_order": 2, + "clean_name": "adresse_email", + "label": "Adresse email", + "required": True, + "page": form_page, + "field_type": "email", + }, + { + "sort_order": 3, + "clean_name": "nombre", + "label": "Nombre", + "default_value": 42, + "required": True, + "page": form_page, + "field_type": "number", + }, + { + "sort_order": 4, + "clean_name": "url", + "label": "URL", + "required": True, + "page": form_page, + "field_type": "url", + }, + { + "sort_order": 5, + "clean_name": "case_a_cocher", + "label": "Case à cocher", + "required": True, + "page": form_page, + "field_type": "checkbox", + }, + { + "sort_order": 6, + "clean_name": "cases_a_cocher", + "label": "Cases à cocher", + "required": True, + "choices": "1\r\n2\r\n3", + "default_value": "", + "help_text": "", + "page": form_page, + "field_type": "checkboxes", + }, + { + "sort_order": 7, + "clean_name": "liste_deroulante", + "label": "Liste déroulante", + "required": True, + "choices": "4\r\n5\r\n6", + "default_value": "", + "help_text": "", + "page": form_page, + "field_type": "dropdown", + }, + { + "sort_order": 8, + "clean_name": "boutons_radio", + "label": "Boutons radio", + "required": True, + "choices": "7\r\n8\r\n9", + "default_value": "", + "help_text": "", + "page": form_page, + "field_type": "radio", + }, + { + "sort_order": 9, + "clean_name": "date", + "label": "Date", + "required": True, + "choices": "", + "default_value": "", + "help_text": "", + "page": form_page, + "field_type": "date", + }, + { + "sort_order": 10, + "clean_name": "champ_cache", + "label": "Champ caché", + "required": True, + "choices": "", + "default_value": "valeur", + "help_text": "", + "page": form_page, + "field_type": "hidden", + }, + ] + + for field_data in fields: + FormField.objects.create(**field_data) + + self.stdout.write(self.style.SUCCESS(f"Page {slug} created with id {form_page.id}")) diff --git a/content_manager/management/commands/create_starter_pages.py b/content_manager/management/commands/create_starter_pages.py new file mode 100644 index 000000000..212e5fd09 --- /dev/null +++ b/content_manager/management/commands/create_starter_pages.py @@ -0,0 +1,273 @@ +from django.conf import settings +from django.core.management import call_command +from django.core.management.base import BaseCommand +from django.urls import reverse +from forms.models import FormField, FormPage +from wagtail.images.models import Image +from wagtail.models import Page, Site +from wagtail.rich_text import RichText +from wagtailmenus.models.menuitems import FlatMenuItem, MainMenuItem + +from content_manager.models import ContentPage +from content_manager.utils import get_or_create_footer_menu, get_or_create_main_menu + + +ALL_ALLOWED_SLUGS = ["home", "mentions-legales", "accessibilite", "contact"] + + +class Command(BaseCommand): + help = """ + Creates a series of starter pages, in order to avoid new sites having only a + blank "Welcome to Wagtail" page. + """ + + def add_arguments(self, parser): + parser.add_argument( + "--slug", nargs="+", type=str, help="[Optional] Slug of the page(s) to create", choices=ALL_ALLOWED_SLUGS + ) + + def handle(self, *args, **kwargs): + pictograms_exist = Image.objects.filter(title__contains="Pictogrammes DSFR").count() + if not pictograms_exist: + call_command("import_dsfr_pictograms") + + slugs = kwargs.get("slug") + + if not slugs: + slugs = ALL_ALLOWED_SLUGS + + for slug in slugs: + if slug == "home": + self.create_homepage() + elif slug == "mentions-legales": + title = "Mentions légales" + body = [] + + alert_block = { + "title": title, + "description": """Entrez ici les mentions légales du site.
+ + Que doivent-elles obligatoirement contenir ?""", # noqa + "level": "info", + "heading_tag": "h2", + } + body.append(("alert", alert_block)) + + text_raw = """ +

D’après la documentation du système de design, + le pied de page doit contenir a minima les quatre liens suivants :

+
    +
  • Accessibilité : non/partiellement/totalement conforme
  • +
  • Mentions légales
  • +
  • Données personnelles
  • +
  • Gestion des cookies
  • +
+

Ces deux derniers peuvent pointer vers des pages à part entière ou des sections de cette page.

+ """ # noqa + body.append(("paragraph", RichText(text_raw))) + + self.create_page(slug=slug, title=title, body=body) + elif slug == "accessibilite": + title = "Déclaration d’accessibilité" + body = [] + + alert_block = { + "title": title, + "description": """Entrez ici la déclaration d’accessibilité.
+ + Générateur de déclaration d’accessibilité""", + "level": "info", + "heading_tag": "h2", + } + + body.append(("alert", alert_block)) + self.create_page(slug=slug, title=title, body=body, footer_label="Accessibilité : non conforme") + elif slug == "contact": + self.create_contact_page(slug) + else: + raise ValueError(f"Valeur inconnue : {slug}") + + def create_homepage(self) -> None: + """ + Create the homepage, set it as default and delete the initial page + """ + # Don't replace a manually created home + already_exists = ContentPage.objects.filter(slug="home").first() + if already_exists: + self.stdout.write(f"The home page seem to already exist with id {already_exists.id}") + return + + # Create the page + body = [] + title = "Votre nouveau site avec Sites faciles" + + image = Image.objects.filter(title="Pictogrammes DSFR — Digital — Coding").first() + + text_raw = """

Bienvenue !

+ +

Vous venez de créer un site utilisant le gestionnaire de contenus de l’État.

+ +

Vous pouvez maintenant vous connecter dans l’administration et personnaliser le site.

+ """ + + admin_url = f"{settings.WAGTAILADMIN_BASE_URL}{reverse('wagtailadmin_home')}" + + image_and_text_block = { + "image": image, + "image_ratio": "3", + "text": RichText(text_raw), + "link": {"external_url": admin_url, "text": "Gérer le site"}, + } + + body.append(("imageandtext", image_and_text_block)) + + text_2_raw = """ +

En particulier, vous devrez :

+
    +
  • Configurer le site dans Configuration > Configuration du site
  • +
  • Remplacer le contenu de la page de mentions légales
  • +
  • Remplacer le contenu de cette page d’accueil.
  • +
+ """ + body.append(("paragraph", RichText(text_2_raw))) + + root = Page.objects.get(slug="root") + home_page = root.add_child(instance=ContentPage(title=title, body=body, show_in_menus=True)) + + # Define it as default for the default site + site = Site.objects.filter(is_default_site=True).first() + + site.root_page_id = home_page.id + site.save() + + # Delete the original default page and get its slug + original_home = Page.objects.get(slug="home") + original_home.delete() + + home_page.slug = "home" + home_page.save() + + self.stdout.write(self.style.SUCCESS(f"Homepage created with id {home_page.id}")) + + def create_page(self, slug: str, title: str, body: list, footer_label: str = ""): + """ + Creates a page for the site and adds it to the footer + """ + + # Don't replace a manually created page + already_exists = ContentPage.objects.filter(slug=slug).first() + if already_exists: + self.stdout.write(f"The {slug} page seem to already exist with id {already_exists.id}") + return + + home_page = Site.objects.filter(is_default_site=True).first().root_page + new_page = home_page.add_child(instance=ContentPage(title=title, body=body, slug=slug, show_in_menus=True)) + + footer_menu = get_or_create_footer_menu() + + footer_item = { + "menu": footer_menu, + "link_page": new_page, + } + if footer_label: + footer_item["link_text"] = footer_label + + FlatMenuItem.objects.create(**footer_item) + + self.stdout.write(self.style.SUCCESS(f"Page {slug} created with id {new_page.id}")) + + def create_contact_page(self, slug: str = "contact") -> None: + """ + Creates a contact page for the site and adds it the main menu + """ + + # Don't replace a manually created page + already_exists = ContentPage.objects.filter(slug=slug).first() + if already_exists: + self.stdout.write(f"The contact page seem to already exist with id {already_exists.id}") + return + + # Create the form page + title = "Contact" + intro = RichText( + """ +

Bonjour, n’hésitez pas à nous contacter via le formulaire ci-dessous.

+

+

Vous pouvez également nous contacter via <autres méthodes>.

+

+

Les champs marqués d’une astérisque (*) sont obligatoires.

""" + ) + + thank_you_text = RichText("

Merci pour votre message ! Nous reviendrons vers vous rapidement.

") + + default_site = Site.objects.filter(is_default_site=True).first() + home_page = default_site.root_page + contact_page = home_page.add_child( + instance=FormPage(title=title, slug=slug, intro=intro, thank_you_text=thank_you_text, show_in_menus=True) + ) + + # Create the form fields + fields = [ + { + "sort_order": 0, + "clean_name": "votre_nom_complet", + "label": "Votre nom complet", + "required": True, + "page": contact_page, + "field_type": "singleline", + }, + { + "sort_order": 1, + "clean_name": "votre_adresse_electronique", + "label": "Votre adresse électronique", + "required": True, + "choices": "", + "default_value": "", + "help_text": "Format attendu : nom@domaine.fr", + "page": contact_page, + "field_type": "email", + }, + { + "sort_order": 2, + "clean_name": "votre_numero_de_telephone", + "label": "Votre numéro de téléphone", + "required": False, + "page": contact_page, + "field_type": "singleline", + }, + { + "sort_order": 3, + "clean_name": "titre_de_votre_message", + "label": "Titre de votre message", + "required": True, + "page": contact_page, + "field_type": "singleline", + }, + { + "sort_order": 4, + "clean_name": "votre_message", + "label": "Votre message", + "required": True, + "choices": "", + "default_value": "", + "help_text": "", + "page": contact_page, + "field_type": "multiline", + }, + ] + + for field_data in fields: + FormField.objects.create(**field_data) + + # Menu item + main_menu = get_or_create_main_menu() + + menu_item = { + "sort_order": MainMenuItem.objects.filter(menu=main_menu).count(), + "link_page": contact_page, + "link_text": title, + "menu": main_menu, + } + MainMenuItem.objects.create(**menu_item) + + self.stdout.write(self.style.SUCCESS(f"Form page {slug} created with id {contact_page.id}")) diff --git a/content_manager/management/commands/import_dsfr_pictograms.py b/content_manager/management/commands/import_dsfr_pictograms.py new file mode 100644 index 000000000..15eb68253 --- /dev/null +++ b/content_manager/management/commands/import_dsfr_pictograms.py @@ -0,0 +1,49 @@ +import os + +from django.core.management import call_command +from django.core.management.base import BaseCommand +from wagtail.images.models import Image + +from content_manager.utils import get_or_create_collection, import_image + + +class Command(BaseCommand): + help = """Import all the pictograms from the DSFR""" + + def handle(self, *args, **kwargs): + call_command("collectstatic", interactive=False) + + picto_root = "staticfiles/dsfr/dist/artwork/pictograms/" + picto_folders = os.listdir(picto_root) + picto_folders.sort() + + for folder in picto_folders: + folder_path = os.path.join(picto_root, folder) + files = os.listdir(folder_path) + files.sort() + + folder_title = folder.capitalize() + + for filename in files: + base_file_title = filename.split(".")[0].replace("-", " ").title() + full_image_title = f"Pictogrammes DSFR — {folder_title} — {base_file_title}" + + image_exists = Image.objects.filter(title=full_image_title).count() + + if image_exists: + print(f"A file named {full_image_title} already exists, skipping") + else: + image = import_image( + full_path=os.path.join(folder_path, filename), + title=full_image_title, + ) + + collection = get_or_create_collection("Pictogrammes DSFR") + + image.collection = collection + image.save() + + image.tags.add("DSFR") + image.tags.add("Pictogrammes") + image.tags.add(folder_title) + print(f"File {full_image_title} imported") diff --git a/content_manager/management/commands/set_config.py b/content_manager/management/commands/set_config.py new file mode 100644 index 000000000..f51d6a2c8 --- /dev/null +++ b/content_manager/management/commands/set_config.py @@ -0,0 +1,38 @@ +import json +from os.path import isfile + +from django.conf import settings +from django.core.management.base import BaseCommand +from wagtail.models import Site + +from content_manager.models import CmsDsfrConfig + + +class Command(BaseCommand): + def handle(self, *args, **kwargs): + """ + Sets the site hostname and site_name, + and imports contents from the config.json file if present. + """ + if "http://" in settings.HOST_URL or "https://" in settings.HOST_URL: + raise ValueError( + """The HOST_URL environment variable must contain the domain name only, + without the port or http/https protocol.""" + ) + + site = Site.objects.filter(is_default_site=True).first() + site.hostname = settings.HOST_URL + site.site_name = settings.WAGTAIL_SITE_NAME + site.save() + + if isfile("config.json"): + with open("config.json") as config_file: + config_data = json.load(config_file) + + config_data["site_id"] = site.id + + _config, created = CmsDsfrConfig.objects.get_or_create(id=1, defaults=config_data) + if created: + self.stdout.write(self.style.SUCCESS(f"Config imported for {config_data.get('site_title', '')}")) + else: + self.stdout.write(self.style.SUCCESS("Config already existing, data not imported.")) diff --git a/content_manager/managers.py b/content_manager/managers.py new file mode 100644 index 000000000..05c47d94a --- /dev/null +++ b/content_manager/managers.py @@ -0,0 +1,7 @@ +from django.db import models +from django.db.models import Count + + +class TagManager(models.Manager): + def tags_with_usecount(self, min_count=0): + return self.annotate(usecount=Count("contentpage")).filter(usecount__gte=min_count) diff --git a/content_manager/migrations/0001_initial.py b/content_manager/migrations/0001_initial.py new file mode 100644 index 000000000..c51763000 --- /dev/null +++ b/content_manager/migrations/0001_initial.py @@ -0,0 +1,461 @@ +# Generated by Django 4.1.5 on 2023-01-27 16:50 + +import django.db.models.deletion +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + initial = True + + dependencies = [ + ("wagtailcore", "0078_referenceindex"), + ] + + operations = [ + migrations.CreateModel( + name="ContentPage", + fields=[ + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ( + "body", + wagtail.fields.StreamField( + [ + ( + "title", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "large", + wagtail.blocks.BooleanBlock(label="Large", required=False), + ), + ], + label="Titre de page", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "paragraphlarge", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)"), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("5", "5/12"), + ("6", "6/12"), + ], + label="Largeur de l'image", + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)"), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre du message", required=False), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre de la mise en vant", + required=False, + ), + ), + ( + "text", + wagtail.blocks.TextBlock( + label="Texte mis en avant", + required=False, + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", + required=False, + ), + ), + ( + "quote", + wagtail.blocks.CharBlock(label="Citation"), + ), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende"), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : " + "https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label=( + "Texte alternatif (description textuelle de l'image)" + ), + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Légende", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende"), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : " + "https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text=( + "Sélectionnez un document pour rendre la carte " + "cliquable vers celui ci (si le champ `Lien` " + "n'est pas renseigné)." + ), + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", + required=False, + ), + ), + ( + "quote", + wagtail.blocks.CharBlock(label="Citation"), + ), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Contenu"), + ), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "total", + wagtail.blocks.IntegerBlock(label="Nombre d'étape"), + ), + ( + "current", + wagtail.blocks.IntegerBlock(label="Étape en cours"), + ), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l'étape"), + ), + ( + "detail", + wagtail.blocks.TextBlock(label="Détail"), + ), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ], + options={ + "abstract": False, + }, + bases=("wagtailcore.page",), + ), + ] diff --git a/content_manager/migrations/0002_alter_contentpage_body.py b/content_manager/migrations/0002_alter_contentpage_body.py new file mode 100644 index 000000000..9d38d7fbd --- /dev/null +++ b/content_manager/migrations/0002_alter_contentpage_body.py @@ -0,0 +1,439 @@ +# Generated by Django 4.1.5 on 2023-01-30 17:00 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan"), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "cta_label", + wagtail.blocks.CharBlock(label="Texte du bouton", required=False), + ), + ( + "cta_link", + wagtail.blocks.URLBlock(label="Lien du bouton", required=False), + ), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "large", + wagtail.blocks.BooleanBlock(label="Large", required=False), + ), + ], + label="Titre de page", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "paragraphlarge", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)"), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("5", "5/12"), + ("6", "6/12"), + ], + label="Largeur de l'image", + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)"), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre du message", required=False), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False), + ), + ( + "text", + wagtail.blocks.TextBlock(label="Texte mis en avant", required=False), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : " + "https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende"), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : " + "https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text=( + "Sélectionnez un document pour rendre la carte cliquable " + "vers celui ci (si le champ `Lien` n'est pas renseigné)." + ), + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", + required=False, + ), + ), + ( + "quote", + wagtail.blocks.CharBlock(label="Citation"), + ), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Contenu"), + ), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "total", + wagtail.blocks.IntegerBlock(label="Nombre d'étape"), + ), + ( + "current", + wagtail.blocks.IntegerBlock(label="Étape en cours"), + ), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l'étape"), + ), + ( + "detail", + wagtail.blocks.TextBlock(label="Détail"), + ), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0003_alter_contentpage_body.py b/content_manager/migrations/0003_alter_contentpage_body.py new file mode 100644 index 000000000..ec6b1e637 --- /dev/null +++ b/content_manager/migrations/0003_alter_contentpage_body.py @@ -0,0 +1,520 @@ +# Generated by Django 4.1.5 on 2023-02-24 17:33 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0002_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan"), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "text", + wagtail.blocks.CharBlock(label="Texte", required=False), + ), + ( + "cta_label", + wagtail.blocks.CharBlock(label="Texte du bouton", required=False), + ), + ( + "cta_link", + wagtail.blocks.URLBlock(label="Lien du bouton", required=False), + ), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "large", + wagtail.blocks.BooleanBlock(label="Large", required=False), + ), + ], + label="Titre de page", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "paragraphlarge", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)"), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("5", "5/12"), + ("6", "6/12"), + ], + label="Largeur de l'image", + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)"), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre du message", required=False), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False), + ), + ( + "text", + wagtail.blocks.TextBlock(label="Texte mis en avant", required=False), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d'arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label=( + "Texte alternatif (description textuelle de" + " l'image)" + ), + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Légende", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", + required=False, + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende"), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. :" + " https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text=( + "Sélectionnez un document pour rendre la carte" + " cliquable vers celui ci (si le champ `Lien`" + " n'est pas renseigné)." + ), + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", + required=False, + ), + ), + ( + "quote", + wagtail.blocks.CharBlock(label="Citation"), + ), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Contenu"), + ), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "total", + wagtail.blocks.IntegerBlock(label="Nombre d'étape"), + ), + ( + "current", + wagtail.blocks.IntegerBlock(label="Étape en cours"), + ), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l'étape"), + ), + ( + "detail", + wagtail.blocks.TextBlock(label="Détail"), + ), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, + label="Espacement au dessus", + max_value=15, + min_value=0, + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, + label="Espacement en dessous", + max_value=15, + min_value=0, + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0004_alter_contentpage_body.py b/content_manager/migrations/0004_alter_contentpage_body.py new file mode 100644 index 000000000..e4995ecd4 --- /dev/null +++ b/content_manager/migrations/0004_alter_contentpage_body.py @@ -0,0 +1,554 @@ +# Generated by Django 4.1.5 on 2023-04-06 09:33 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0003_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan"), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "text", + wagtail.blocks.CharBlock(label="Texte", required=False), + ), + ( + "cta_label", + wagtail.blocks.CharBlock(label="Texte du bouton", required=False), + ), + ( + "cta_link", + wagtail.blocks.URLBlock(label="Lien du bouton", required=False), + ), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "large", + wagtail.blocks.BooleanBlock(label="Large", required=False), + ), + ], + label="Titre de page", + ), + ), + ( + "paragraph", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "paragraphlarge", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)"), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("5", "5/12"), + ("6", "6/12"), + ], + label="Largeur de l'image", + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)"), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock(label="Lien", required=False), + ), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre du message", required=False), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte du message", required=False), + ), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False), + ), + ( + "text", + wagtail.blocks.TextBlock(label="Texte mis en avant", required=False), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : " + "https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d'arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit " "être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock(label="Texte avec mise en forme"), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label=( + "Texte alternatif (description " + "textuelle de l'image)" + ), + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Légende", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", + required=False, + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titre", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende"), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' " + "(Ex. : https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "description", + wagtail.blocks.TextBlock(label="Texte"), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Lien", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text=( + "Sélectionnez un document pour rendre " + "la carte cliquable vers celui ci (si le " + "champ `Lien` n'est pas renseigné)." + ), + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", + required=False, + ), + ), + ( + "quote", + wagtail.blocks.CharBlock(label="Citation"), + ), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text=( + "Le lien apparait comme un bouton sous " + "le bloc de texte" + ), + label="Titre de l'appel à l'action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Lien", + required=False, + ), + ), + ], + label="Texte et appel à l'action", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre"), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Contenu"), + ), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "total", + wagtail.blocks.IntegerBlock(label="Nombre d'étape"), + ), + ( + "current", + wagtail.blocks.IntegerBlock(label="Étape en cours"), + ), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre de l'étape"), + ), + ( + "detail", + wagtail.blocks.TextBlock(label="Détail"), + ), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, + label="Espacement au dessus", + max_value=15, + min_value=0, + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, + label="Espacement en dessous", + max_value=15, + min_value=0, + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0005_alter_contentpage_body.py b/content_manager/migrations/0005_alter_contentpage_body.py new file mode 100644 index 000000000..86e8d96c2 --- /dev/null +++ b/content_manager/migrations/0005_alter_contentpage_body.py @@ -0,0 +1,449 @@ +# Generated by Django 4.1.5 on 2023-04-20 09:23 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0004_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)")), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l'image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l'auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l'auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d'arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": ( + "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + ) + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label=( + "Texte alternatif (description textuelle de" + " l'image)" + ), + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "URL au format 'embed' (Ex. :" + " https://www.youtube.com/embed/gLzXOViPX-0)" + ), + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text=( + "Sélectionnez un document pour rendre la carte" + " cliquable vers celui ci (si le champ `Lien`" + " n'est pas renseigné)." + ), + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text=( + "Le lien apparait comme un bouton sous le bloc de" + " texte" + ), + label="Titre de l'appel à l'action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l'action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text=( + "Accessibilité : Le titre doit décrire, de façon" + " claire et concise, le contenu embarqué." + ), + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text=( + "Exemple pour Tally :" + " https://tally.so/embed/w2jMRa" + ), + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d'étape")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l'étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0006_analyticssettings.py b/content_manager/migrations/0006_analyticssettings.py new file mode 100644 index 000000000..81ee2bfec --- /dev/null +++ b/content_manager/migrations/0006_analyticssettings.py @@ -0,0 +1,49 @@ +# Generated by Django 4.1.9 on 2023-07-07 13:56 + +import django.db.models.deletion +from django.db import migrations, models + +import content_manager.models + + +class Migration(migrations.Migration): + dependencies = [ + ("wagtailcore", "0078_referenceindex"), + ("content_manager", "0005_alter_contentpage_body"), + ] + + operations = [ + migrations.CreateModel( + name="AnalyticsSettings", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ( + "head_scripts", + content_manager.models.MonospaceField( + blank=True, + help_text="Ajoutez des scripts de suivi entre les balises .", + null=True, + verbose_name="Scripts de suivi ", + ), + ), + ( + "body_scripts", + content_manager.models.MonospaceField( + blank=True, + help_text="Ajoutez des scripts de suivi vers la fermeture de la balise .", + null=True, + verbose_name="Scripts de suivi ", + ), + ), + ( + "site", + models.OneToOneField( + editable=False, on_delete=django.db.models.deletion.CASCADE, to="wagtailcore.site" + ), + ), + ], + options={ + "verbose_name": "Scripts de suivi", + }, + ), + ] diff --git a/content_manager/migrations/0007_cmsdsfrconfig.py b/content_manager/migrations/0007_cmsdsfrconfig.py new file mode 100644 index 000000000..aef063207 --- /dev/null +++ b/content_manager/migrations/0007_cmsdsfrconfig.py @@ -0,0 +1,83 @@ +# Generated by Django 4.1.10 on 2023-11-13 15:11 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("wagtailcore", "0089_log_entry_data_json_null_to_object"), + ("content_manager", "0006_analyticssettings"), + ] + + operations = [ + migrations.CreateModel( + name="CmsDsfrConfig", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ( + "header_brand", + models.CharField( + blank=True, + default="Intitulé officiel", + help_text="Intitulé du bloc-marques tel que défini sur la page\n https://www.gouvernement.fr/charte/charte-graphique-les-fondamentaux/le-bloc-marque", + max_length=200, + verbose_name="Institution (en-tête)", + ), + ), + ( + "header_brand_html", + models.CharField( + blank=True, + default="Intitulé
officiel", + help_text="Intitulé du bloc-marques avec des balises
\n pour affichage sur plusieurs lignes", + max_length=200, + verbose_name="Institution avec césure (en-tête)", + ), + ), + ( + "footer_brand", + models.CharField( + blank=True, default="Intitulé officiel", max_length=200, verbose_name="Institution (pied)" + ), + ), + ( + "footer_brand_html", + models.CharField( + blank=True, + default="Intitulé
officiel", + max_length=200, + verbose_name="Institution avec césure (pied)", + ), + ), + ( + "site_title", + models.CharField( + blank=True, default="Titre du site", max_length=200, verbose_name="Titre du site" + ), + ), + ( + "site_tagline", + models.CharField( + blank=True, default="Sous-titre du site", max_length=200, verbose_name="Sous-titre du site" + ), + ), + ( + "footer_description", + models.TextField( + blank=True, default="", help_text="Balises HTML autorisés", verbose_name="Description" + ), + ), + ("mourning", models.BooleanField(default=False, verbose_name="Mise en berne")), + ( + "site", + models.OneToOneField( + editable=False, on_delete=django.db.models.deletion.CASCADE, to="wagtailcore.site" + ), + ), + ], + options={ + "verbose_name": "Configuration du site", + }, + ), + ] diff --git a/content_manager/migrations/0008_cmsdsfrconfig_theme_modale_button_and_more.py b/content_manager/migrations/0008_cmsdsfrconfig_theme_modale_button_and_more.py new file mode 100644 index 000000000..cce70f971 --- /dev/null +++ b/content_manager/migrations/0008_cmsdsfrconfig_theme_modale_button_and_more.py @@ -0,0 +1,444 @@ +# Generated by Django 4.2.7 on 2023-11-28 16:55 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0007_cmsdsfrconfig"), + ] + + operations = [ + migrations.AddField( + model_name="cmsdsfrconfig", + name="theme_modale_button", + field=models.BooleanField(default=False, verbose_name="Choix du thème clair/sombre"), + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)")), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l'image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l'auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l'auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d'arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ `Lien` n'est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l'appel à l'action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l'action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d'étape")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l'étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0009_alter_contentpage_body.py b/content_manager/migrations/0009_alter_contentpage_body.py new file mode 100644 index 000000000..e6dab2b9b --- /dev/null +++ b/content_manager/migrations/0009_alter_contentpage_body.py @@ -0,0 +1,454 @@ +# Generated by Django 4.2.7 on 2023-12-05 13:54 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0008_cmsdsfrconfig_theme_modale_button_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d'arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)")), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l'image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l'auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l'auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d'arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n'est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d'arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l'image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format 'embed' (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ `Lien` n'est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l'auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l'auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l'appel à l'action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l'action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d'étape")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l'étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0010_alter_contentpage_body.py b/content_manager/migrations/0010_alter_contentpage_body.py new file mode 100644 index 000000000..bb11ed9a2 --- /dev/null +++ b/content_manager/migrations/0010_alter_contentpage_body.py @@ -0,0 +1,456 @@ +# Generated by Django 4.2.7 on 2023-12-06 16:48 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0009_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d’arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ("darken", wagtail.blocks.BooleanBlock(label="Assombrir", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)")), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ], + blank=True, + use_json_field=True, + ), + ), + ] diff --git a/content_manager/migrations/0011_cmsdsfrconfig_search_bar.py b/content_manager/migrations/0011_cmsdsfrconfig_search_bar.py new file mode 100644 index 000000000..cac415b4e --- /dev/null +++ b/content_manager/migrations/0011_cmsdsfrconfig_search_bar.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.8 on 2024-01-15 11:19 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0010_alter_contentpage_body"), + ] + + operations = [ + migrations.AddField( + model_name="cmsdsfrconfig", + name="search_bar", + field=models.BooleanField(default=False, verbose_name="Barre de recherche dans l’en-tête"), + ), + ] diff --git a/content_manager/migrations/0012_alter_contentpage_body.py b/content_manager/migrations/0012_alter_contentpage_body.py new file mode 100644 index 000000000..01702151b --- /dev/null +++ b/content_manager/migrations/0012_alter_contentpage_body.py @@ -0,0 +1,464 @@ +# Generated by Django 5.0.2 on 2024-02-15 16:01 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0011_cmsdsfrconfig_search_bar"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d’arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ("darken", wagtail.blocks.BooleanBlock(label="Assombrir", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration (à gauche)")), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (à droite)")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("link_url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Bloc image à gauche et texte à droite", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d'alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0013_alter_contentpage_body.py b/content_manager/migrations/0013_alter_contentpage_body.py new file mode 100644 index 000000000..2a96121ad --- /dev/null +++ b/content_manager/migrations/0013_alter_contentpage_body.py @@ -0,0 +1,472 @@ +# Generated by Django 5.0.2 on 2024-02-26 16:41 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0012_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ("bg_image", wagtail.images.blocks.ImageChooserBlock(label="Image d’arrière plan")), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ("darken", wagtail.blocks.BooleanBlock(label="Assombrir", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + label="Couleur d’arrière plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0014_alter_contentpage_body.py b/content_manager/migrations/0014_alter_contentpage_body.py new file mode 100644 index 000000000..d17774422 --- /dev/null +++ b/content_manager/migrations/0014_alter_contentpage_body.py @@ -0,0 +1,553 @@ +# Generated by Django 5.0.2 on 2024-02-29 10:24 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0013_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + (("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")), + ), + ("Couleurs neutres", (("grey", "Gris"),)), + ( + "Couleurs système", + ( + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ), + ), + ], + help_text="Utilise les couleurs du système de design de l'État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ("darken", wagtail.blocks.BooleanBlock(label="Assombrir", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + (("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")), + ), + ("Couleurs neutres", (("grey", "Gris"),)), + ( + "Couleurs système", + ( + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ), + ), + ], + help_text="Utilise les couleurs du système de design de l'État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0015_alter_contentpage_options_and_more.py b/content_manager/migrations/0015_alter_contentpage_options_and_more.py new file mode 100644 index 000000000..f0b6ec085 --- /dev/null +++ b/content_manager/migrations/0015_alter_contentpage_options_and_more.py @@ -0,0 +1,646 @@ +# Generated by Django 5.0.2 on 2024-03-05 15:11 + +import django.db.models.deletion +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0014_alter_contentpage_body"), + ("wagtailimages", "0025_alter_image_file_alter_rendition_file"), + ] + + operations = [ + migrations.AlterModelOptions( + name="contentpage", + options={"verbose_name": "Content page"}, + ), + migrations.AddField( + model_name="contentpage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Couleurs primaires", [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")]), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + migrations.AddField( + model_name="contentpage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="CTA Button label"), + ), + migrations.AddField( + model_name="contentpage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="CTA link"), + ), + migrations.AddField( + model_name="contentpage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background"), + ), + migrations.AddField( + model_name="contentpage", + name="header_image", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + verbose_name="Header image", + ), + ), + migrations.AddField( + model_name="contentpage", + name="header_large", + field=models.BooleanField(default=False, verbose_name="Full width"), + ), + migrations.AddField( + model_name="contentpage", + name="header_with_title", + field=models.BooleanField(default=False, verbose_name="Show title in header image?"), + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ( + "hero", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("text", wagtail.blocks.CharBlock(label="Texte", required=False)), + ("cta_label", wagtail.blocks.CharBlock(label="Texte du bouton", required=False)), + ("cta_link", wagtail.blocks.URLBlock(label="Lien du bouton", required=False)), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ("darken", wagtail.blocks.BooleanBlock(label="Assombrir", required=False)), + ], + label="Section promotionnelle", + ), + ), + ( + "title", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("large", wagtail.blocks.BooleanBlock(label="Large", required=False)), + ], + label="Titre de page", + ), + ), + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ("paragraphlarge", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme (large)")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0016_auto_20240305_1611.py b/content_manager/migrations/0016_auto_20240305_1611.py new file mode 100644 index 000000000..a57c8de0b --- /dev/null +++ b/content_manager/migrations/0016_auto_20240305_1611.py @@ -0,0 +1,59 @@ +# Generated by Django 5.0.2 on 2024-03-04 14:54 + +from django.db import migrations +from wagtail.blocks.migrations.migrate_operation import MigrateStreamData +from wagtail.blocks.migrations.operations import RemoveStreamChildrenOperation, RenameStreamChildrenOperation + + +def update_header_fields(apps, schema_editor): + """ + Update the header settings for pages that had a hero block + in the stream + """ + + ContentPage = apps.get_model("content_manager", "ContentPage") + for page in ContentPage.objects.all(): + for block in page.body.raw_data: + if block["type"] == "hero": + hero_settings = block["value"] + page.header_with_title = True + + if "bg_image" in hero_settings: + page.header_image__id = hero_settings["bg_image"] + + if "bg_color_class" in hero_settings: + page.header_color_class = hero_settings["bg_color_class"] + + if "large" in hero_settings: + page.header_large = hero_settings["large"] + + if "darken" in hero_settings: + page.header_darken = hero_settings["darken"] + + if "cta_link" in hero_settings: + page.header_cta_link = hero_settings["cta_link"] + + if "cta_label" in hero_settings: + page.header_cta_label = hero_settings["cta_label"] + + page.save() + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0015_alter_contentpage_options_and_more"), + ] + + operations = [ + migrations.RunPython(update_header_fields), + MigrateStreamData( + app_name="content_manager", + model_name="ContentPage", + field_name="body", + operations_and_block_paths=[ + (RemoveStreamChildrenOperation(name="hero"), "body"), + (RemoveStreamChildrenOperation(name="title"), "body"), + (RenameStreamChildrenOperation(old_name="paragraphlarge", new_name="paragraph"), ""), + ], + ), + ] diff --git a/content_manager/migrations/0017_tag_contentpage_header_cta_text_and_more.py b/content_manager/migrations/0017_tag_contentpage_header_cta_text_and_more.py new file mode 100644 index 000000000..9e693b08a --- /dev/null +++ b/content_manager/migrations/0017_tag_contentpage_header_cta_text_and_more.py @@ -0,0 +1,557 @@ +# Generated by Django 5.0.2 on 2024-03-05 18:04 + +import django.db.models.deletion +import modelcluster.contrib.taggit +import modelcluster.fields +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0016_auto_20240305_1611"), + ("taggit", "0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx"), + ] + + operations = [ + migrations.CreateModel( + name="Tag", + fields=[], + options={ + "proxy": True, + "indexes": [], + "constraints": [], + }, + bases=("taggit.tag",), + ), + migrations.AddField( + model_name="contentpage", + name="header_cta_text", + field=models.CharField(blank=True, null=True, verbose_name="Call to action text"), + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en vant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="contentpage", + name="header_cta_label", + field=models.CharField(blank=True, null=True, verbose_name="Call to action label"), + ), + migrations.AlterField( + model_name="contentpage", + name="header_cta_link", + field=models.URLField(blank=True, null=True, verbose_name="Call to action link"), + ), + migrations.AlterField( + model_name="contentpage", + name="header_darken", + field=models.BooleanField(default=False, verbose_name="Darken background image"), + ), + migrations.CreateModel( + name="TagContentPage", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ( + "content_object", + modelcluster.fields.ParentalKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="contentpage_tags", + to="content_manager.contentpage", + ), + ), + ( + "tag", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="%(app_label)s_%(class)s_items", + to="taggit.tag", + ), + ), + ], + options={ + "abstract": False, + }, + ), + migrations.AddField( + model_name="contentpage", + name="tags", + field=modelcluster.contrib.taggit.ClusterTaggableManager( + blank=True, + help_text="A comma-separated list of tags.", + through="content_manager.TagContentPage", + to="taggit.Tag", + verbose_name="Tags", + ), + ), + ] diff --git a/content_manager/migrations/0018_megamenu_megamenucategory.py b/content_manager/migrations/0018_megamenu_megamenucategory.py new file mode 100644 index 000000000..cfd087054 --- /dev/null +++ b/content_manager/migrations/0018_megamenu_megamenucategory.py @@ -0,0 +1,62 @@ +# Generated by Django 5.0.3 on 2024-03-20 14:30 + +import django.db.models.deletion +import modelcluster.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0017_tag_contentpage_header_cta_text_and_more"), + ("wagtailmenus", "0023_remove_use_specific"), + ] + + operations = [ + migrations.CreateModel( + name="MegaMenu", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("name", models.CharField(max_length=255, verbose_name="Name")), + ("description", models.TextField(blank=True, verbose_name="Description")), + ("main_link", models.URLField(blank=True, null=True, verbose_name="Main link")), + ( + "parent_menu_item", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="megamenu_parent_menu_items", + to="wagtailmenus.mainmenuitem", + ), + ), + ], + options={ + "verbose_name": "Mega menu", + }, + ), + migrations.CreateModel( + name="MegaMenuCategory", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("sort_order", models.IntegerField(blank=True, editable=False, null=True)), + ( + "category", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to="wagtailmenus.flatmenu", + verbose_name="Category", + ), + ), + ( + "mega_menu", + modelcluster.fields.ParentalKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="categories", + to="content_manager.megamenu", + ), + ), + ], + options={ + "verbose_name": "Mega menu category", + "verbose_name_plural": "Mega menu categories", + }, + ), + ] diff --git a/content_manager/migrations/0019_alter_contentpage_body.py b/content_manager/migrations/0019_alter_contentpage_body.py new file mode 100644 index 000000000..6e99ec0f1 --- /dev/null +++ b/content_manager/migrations/0019_alter_contentpage_body.py @@ -0,0 +1,487 @@ +# Generated by Django 5.0.3 on 2024-03-27 13:33 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0018_megamenu_megamenucategory"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende", required=False)), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Illustration")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Gauche"), ("right", "Droite")], + label="Côté où afficher l’image", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Largeur de l’image", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Link text", required=False)), + ("page", wagtail.blocks.PageChooserBlock(label="Page", required=False)), + ( + "external_url", + wagtail.blocks.URLBlock(label="External URL", required=False), + ), + ], + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait en bas du bloc de droite, avec une flèche", + label="Titre du lien", + required=False, + ), + ), + ("page", wagtail.blocks.PageChooserBlock(label="Lien interne", required=False)), + ("link_url", wagtail.blocks.URLBlock(label="Lien externe", required=False)), + ], + label="Bloc image et texte", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre du message", required=False)), + ("description", wagtail.blocks.TextBlock(label="Texte du message", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Type de message", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Message d’alerte", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de la mise en avant", required=False)), + ("text", wagtail.blocks.TextBlock(label="Texte mis en avant", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="À adapter à la structure de la page. Par défaut en-tête 3.", + label="Niveau de titre", + ), + ), + ], + label="Texte mise en avant", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ("author_name", wagtail.blocks.CharBlock(label="Nom de l’auteur")), + ("author_title", wagtail.blocks.CharBlock(label="Titre de l’auteur")), + ], + label="Citation", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock( + label="Image d’arrière plan", required=False + ), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Couleurs primaires", + [("blue-france", "Bleu France"), ("red-marianne", "Rouge Marianne")], + ), + ("Couleurs neutres", [("grey", "Gris")]), + ( + "Couleurs illustratives", + [ + ("green-tilleul-verveine", "Thilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Utilise les couleurs du système de design de l’État", + label="Couleur d’arrière-plan", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={ + "invalid": "La couleur n’est pas correcte, le format doit être #fff ou #f5f5fe" + }, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Couleur d’arrière-plan au format hexa (Ex: #f5f5fe)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Titre", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Texte avec mise en forme")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Texte alternatif (description textuelle de l’image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Légende", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Titre", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Légende")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="URL au format «\xa0embed\xa0» (Ex. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Lien de la vidéo", + ), + ), + ], + label="Vidéo", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("description", wagtail.blocks.TextBlock(label="Texte")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ("url", wagtail.blocks.URLBlock(label="Lien", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Sélectionnez un document pour rendre la carte cliquable vers celui ci (si le champ «\xa0Lien\xa0» n’est pas renseigné).", + label="ou Document", + required=False, + ), + ), + ], + label="Carte", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Illustration (à gauche)", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Citation")), + ( + "author_name", + wagtail.blocks.CharBlock(label="Nom de l’auteur"), + ), + ( + "author_title", + wagtail.blocks.CharBlock(label="Titre de l’auteur"), + ), + ], + label="Citation", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Texte avec mise en forme", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="Le lien apparait comme un bouton sous le bloc de texte", + label="Titre de l’appel à l’action", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Lien", required=False), + ), + ], + label="Texte et appel à l’action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibilité : Le titre doit décrire, de façon claire et concise, le contenu embarqué.", + label="Titre", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Exemple pour Tally : https://tally.so/embed/w2jMRa", + label="Lien du cadre intégré", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Hauteur en pixels"), + ), + ], + label="Cadre intégré", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ], + label="Multi-colonnes", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("content", wagtail.blocks.RichTextBlock(label="Contenu")), + ], + label="Accordéon", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordéons", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre")), + ("total", wagtail.blocks.IntegerBlock(label="Nombre d’étapes")), + ("current", wagtail.blocks.IntegerBlock(label="Étape en cours")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Titre de l’étape")), + ("detail", wagtail.blocks.TextBlock(label="Détail")), + ], + label="Étape", + ), + ) + ], + label="Les étapes", + ), + ), + ], + label="Étapes", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement au dessus", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Espacement en dessous", max_value=15, min_value=0 + ), + ), + ], + label="Séparateur", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Avertissement : Utilisez le bloc HTML avec précaution.\n Un code malveillant peut compromettre la sécurité du site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0020_alter_contentpage_body_and_more.py b/content_manager/migrations/0020_alter_contentpage_body_and_more.py new file mode 100644 index 000000000..ff78ed89b --- /dev/null +++ b/content_manager/migrations/0020_alter_contentpage_body_and_more.py @@ -0,0 +1,677 @@ +# Generated by Django 5.0.4 on 2024-04-18 12:35 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0019_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title")), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(Obsolète, sera retiré dans une future mise à jour. Remplacez-le par la couleur d’arrière-plan)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Card", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock(label="Author title"), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ], + label="Multiple columns", + ), + ), + ], + label="Multiple columns", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock()), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="contentpage", + name="header_color_class", + field=models.CharField( + blank=True, + choices=[ + ("Primary colors", [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")]), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + null=True, + verbose_name="Background color", + ), + ), + ] diff --git a/content_manager/migrations/0021_alter_contentpage_body.py b/content_manager/migrations/0021_alter_contentpage_body.py new file mode 100644 index 000000000..253614451 --- /dev/null +++ b/content_manager/migrations/0021_alter_contentpage_body.py @@ -0,0 +1,1053 @@ +# Generated by Django 5.0.4 on 2024-04-22 13:34 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0020_alter_contentpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ("new", "New"), + ("grey", "Grey"), + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="(This field is obsolete and will be removed in the near future. Replace it with the background picture)", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("description", wagtail.blocks.TextBlock(label="Content")), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0022_alter_cmsdsfrconfig_options_cmsdsfrconfig_beta_tag_and_more.py b/content_manager/migrations/0022_alter_cmsdsfrconfig_options_cmsdsfrconfig_beta_tag_and_more.py new file mode 100644 index 000000000..8eab4bb05 --- /dev/null +++ b/content_manager/migrations/0022_alter_cmsdsfrconfig_options_cmsdsfrconfig_beta_tag_and_more.py @@ -0,0 +1,126 @@ +# Generated by Django 5.0.4 on 2024-04-22 14:56 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0021_alter_contentpage_body"), + ("wagtailimages", "0025_alter_image_file_alter_rendition_file"), + ] + + operations = [ + migrations.AlterModelOptions( + name="cmsdsfrconfig", + options={"verbose_name": "Site configuration", "verbose_name_plural": "Site configurations"}, + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="beta_tag", + field=models.BooleanField(default=False, verbose_name="Show the BETA tag next to the title"), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="newsletter_description", + field=models.TextField(blank=True, default="", verbose_name="Newsletter description"), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="newsletter_url", + field=models.URLField(blank=True, default="", verbose_name="Newsletter registration URL"), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="notice", + field=models.TextField( + blank=True, + default="", + help_text="The important notice banner should only be used for essential and temporary information. (Excessive or continuous use risks “drowning” the message.)", + verbose_name="Important notice", + ), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="operator_logo_alt", + field=models.CharField( + blank=True, + help_text="Must contain the text present in the image.", + max_length=200, + verbose_name="Logo alt text", + ), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="operator_logo_file", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + verbose_name="Operator logo", + ), + ), + migrations.AddField( + model_name="cmsdsfrconfig", + name="operator_logo_width", + field=models.DecimalField( + decimal_places=1, + default="0.0", + help_text="To be adjusted according to the width of the logo. Example for a vertical logo: 3.5, Example for a horizontal logo: 8.", + max_digits=3, + null=True, + verbose_name="Width (em)", + ), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="footer_brand", + field=models.CharField( + blank=True, default="Intitulé officiel", max_length=200, verbose_name="Institution (footer)" + ), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="footer_brand_html", + field=models.CharField( + blank=True, + default="Intitulé
officiel", + max_length=200, + verbose_name="Institution with line break (footer)", + ), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="header_brand", + field=models.CharField( + blank=True, + default="Intitulé officiel", + help_text="Institution brand as defined on page https://www.info.gouv.fr/marque-de-letat/le-bloc-marque", + max_length=200, + verbose_name="Institution (header)", + ), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="header_brand_html", + field=models.CharField( + blank=True, + default="Intitulé
officiel", + help_text="Institution brand with
tags for line breaks", + max_length=200, + verbose_name="Institution with line break (header)", + ), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="site_tagline", + field=models.CharField(blank=True, default="Site tagline", max_length=200, verbose_name="Site tagline"), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="site_title", + field=models.CharField(blank=True, default="Site title", max_length=200, verbose_name="Site title"), + ), + ] diff --git a/content_manager/migrations/0023_alter_cmsdsfrconfig_footer_description_and_more.py b/content_manager/migrations/0023_alter_cmsdsfrconfig_footer_description_and_more.py new file mode 100644 index 000000000..78a4f0785 --- /dev/null +++ b/content_manager/migrations/0023_alter_cmsdsfrconfig_footer_description_and_more.py @@ -0,0 +1,52 @@ +# Generated by Django 5.0.4 on 2024-04-24 14:08 + +import django.db.models.deletion +import modelcluster.fields +import wagtail.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0022_alter_cmsdsfrconfig_options_cmsdsfrconfig_beta_tag_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="cmsdsfrconfig", + name="footer_description", + field=wagtail.fields.RichTextField(blank=True, default="", verbose_name="Description"), + ), + migrations.AlterField( + model_name="cmsdsfrconfig", + name="notice", + field=wagtail.fields.RichTextField( + blank=True, + default="", + help_text="The important notice banner should only be used for essential and temporary information. (Excessive or continuous use risks “drowning” the message.)", + verbose_name="Important notice", + ), + ), + migrations.CreateModel( + name="SocialMediaItem", + fields=[ + ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), + ("sort_order", models.IntegerField(blank=True, editable=False, null=True)), + ("title", models.CharField(blank=True, default="", max_length=200, verbose_name="Title")), + ("url", models.URLField(blank=True, default="", verbose_name="URL")), + ("icon_class", models.CharField(blank=True, default="", max_length=200, verbose_name="Icon class")), + ( + "site_config", + modelcluster.fields.ParentalKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="social_media_items", + to="content_manager.cmsdsfrconfig", + ), + ), + ], + options={ + "ordering": ["sort_order"], + "abstract": False, + }, + ), + ] diff --git a/content_manager/migrations/0024_alter_socialmediaitem_options.py b/content_manager/migrations/0024_alter_socialmediaitem_options.py new file mode 100644 index 000000000..fedf461d8 --- /dev/null +++ b/content_manager/migrations/0024_alter_socialmediaitem_options.py @@ -0,0 +1,16 @@ +# Generated by Django 5.0.4 on 2024-04-24 15:12 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0023_alter_cmsdsfrconfig_footer_description_and_more"), + ] + + operations = [ + migrations.AlterModelOptions( + name="socialmediaitem", + options={"verbose_name": "Social media item", "verbose_name_plural": "Social media items"}, + ), + ] diff --git a/content_manager/migrations/0025_alter_contentpage_body.py b/content_manager/migrations/0025_alter_contentpage_body.py new file mode 100644 index 000000000..2cdb08cb9 --- /dev/null +++ b/content_manager/migrations/0025_alter_contentpage_body.py @@ -0,0 +1,2799 @@ +# Generated by Django 5.0.6 on 2024-05-23 15:04 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0024_alter_socialmediaitem_options"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Erreur"), + ("success", "Succès"), + ("info", "Information"), + ("warning", "Attention"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption")), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ], + label="Video", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name")), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "En-tête 2"), + ("h3", "En-tête 3"), + ("h4", "En-tête 4"), + ("h5", "En-tête 5"), + ("h6", "En-tête 6"), + ("p", "Paragraphe"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0026_alter_contentpage_body.py b/content_manager/migrations/0026_alter_contentpage_body.py new file mode 100644 index 000000000..6866254e8 --- /dev/null +++ b/content_manager/migrations/0026_alter_contentpage_body.py @@ -0,0 +1,3100 @@ +# Generated by Django 5.0.6 on 2024-05-28 16:13 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0025_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format (e.g. : https://www.youtube.com/embed/gLzXOViPX-0)", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0027_alter_contentpage_body.py b/content_manager/migrations/0027_alter_contentpage_body.py new file mode 100644 index 000000000..16beca2dd --- /dev/null +++ b/content_manager/migrations/0027_alter_contentpage_body.py @@ -0,0 +1,3100 @@ +# Generated by Django 5.0.6 on 2024-05-29 10:02 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0026_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ("url", wagtail.blocks.URLBlock(group="target", label="Link", required=False)), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + label="Stepper", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(label="Markdown")), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", label="Link", required=False + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="Select a document to make the card link to it (if the 'Link' field is not populated.)", + label="or Document", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this or the Page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0028_alter_contentpage_body.py b/content_manager/migrations/0028_alter_contentpage_body.py new file mode 100644 index 000000000..beef91bea --- /dev/null +++ b/content_manager/migrations/0028_alter_contentpage_body.py @@ -0,0 +1,3593 @@ +# Generated by Django 5.0.6 on 2024-05-30 15:30 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0027_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0029_alter_contentpage_body.py b/content_manager/migrations/0029_alter_contentpage_body.py new file mode 100644 index 000000000..5c29f630c --- /dev/null +++ b/content_manager/migrations/0029_alter_contentpage_body.py @@ -0,0 +1,4797 @@ +# Generated by Django 5.0.6 on 2024-06-03 10:37 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0028_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + label="Iframe", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + label="Iframe", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0030_alter_contentpage_body.py b/content_manager/migrations/0030_alter_contentpage_body.py new file mode 100644 index 000000000..34f0e318e --- /dev/null +++ b/content_manager/migrations/0030_alter_contentpage_body.py @@ -0,0 +1,6359 @@ +# Generated by Django 5.0.6 on 2024-06-04 12:08 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0029_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0031_alter_contentpage_body.py b/content_manager/migrations/0031_alter_contentpage_body.py new file mode 100644 index 000000000..a77fe2455 --- /dev/null +++ b/content_manager/migrations/0031_alter_contentpage_body.py @@ -0,0 +1,6360 @@ +# Generated by Django 5.0.6 on 2024-06-04 15:02 + +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0030_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0032_alter_contentpage_body.py b/content_manager/migrations/0032_alter_contentpage_body.py new file mode 100644 index 000000000..272b43743 --- /dev/null +++ b/content_manager/migrations/0032_alter_contentpage_body.py @@ -0,0 +1,6370 @@ +# Generated by Django 5.0.6 on 2024-06-05 15:29 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0031_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Callout title", required=False)), + ("text", wagtail.blocks.TextBlock(label="Callout text", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", label="Content", required=False + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.TextBlock( + help_text="Can contain HTML.", + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0033_alter_contentpage_body.py b/content_manager/migrations/0033_alter_contentpage_body.py new file mode 100644 index 000000000..5905059b9 --- /dev/null +++ b/content_manager/migrations/0033_alter_contentpage_body.py @@ -0,0 +1,7269 @@ +# Generated by Django 5.0.6 on 2024-06-17 10:22 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0032_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0034_alter_contentpage_body.py b/content_manager/migrations/0034_alter_contentpage_body.py new file mode 100644 index 000000000..4a1880f92 --- /dev/null +++ b/content_manager/migrations/0034_alter_contentpage_body.py @@ -0,0 +1,7301 @@ +# Generated by Django 5.0.6 on 2024-06-17 15:46 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0033_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0035_alter_contentpage_body.py b/content_manager/migrations/0035_alter_contentpage_body.py new file mode 100644 index 000000000..351d0930a --- /dev/null +++ b/content_manager/migrations/0035_alter_contentpage_body.py @@ -0,0 +1,7287 @@ +# Generated by Django 5.0.6 on 2024-07-01 14:59 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0034_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + label="Link", required=False + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="The link appears as a button under the text block", + label="Call to action label", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock(label="Link", required=False), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ], + label="Button", + ), + ) + ] + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/0036_contentpage_header_cta_buttons_and_more.py b/content_manager/migrations/0036_contentpage_header_cta_buttons_and_more.py new file mode 100644 index 000000000..1b6ee8c2f --- /dev/null +++ b/content_manager/migrations/0036_contentpage_header_cta_buttons_and_more.py @@ -0,0 +1,7888 @@ +# Generated by Django 5.0.6 on 2024-07-03 09:03 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtailmarkdown.blocks +from django.db import migrations, models + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0035_alter_contentpage_body"), + ] + + operations = [ + migrations.AddField( + model_name="contentpage", + name="header_cta_buttons", + field=wagtail.fields.StreamField( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + blank=True, + null=True, + ), + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + migrations.AlterField( + model_name="contentpage", + name="header_cta_label", + field=models.CharField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action label", + ), + ), + migrations.AlterField( + model_name="contentpage", + name="header_cta_link", + field=models.URLField( + blank=True, + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + null=True, + verbose_name="Call to action link", + ), + ), + migrations.AlterField( + model_name="contentpage", + name="header_cta_text", + field=wagtail.fields.RichTextField(blank=True, null=True, verbose_name="Call to action text"), + ), + ] diff --git a/content_manager/migrations/0037_alter_tag_options_alter_contentpage_body.py b/content_manager/migrations/0037_alter_tag_options_alter_contentpage_body.py new file mode 100644 index 000000000..e509bd031 --- /dev/null +++ b/content_manager/migrations/0037_alter_tag_options_alter_contentpage_body.py @@ -0,0 +1,8100 @@ +# Generated by Django 5.0.6 on 2024-07-11 15:37 + +import wagtail.blocks +import wagtail.blocks.static_block +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks +import wagtail.snippets.blocks +import wagtailmarkdown.blocks +from django.db import migrations + +import content_manager.blocks + + +class Migration(migrations.Migration): + dependencies = [ + ("content_manager", "0036_contentpage_header_cta_buttons_and_more"), + ] + + operations = [ + migrations.AlterModelOptions( + name="tag", + options={"verbose_name": "Tag"}, + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", required=False + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ] + ), + ), + ( + "imageandtext", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "alert", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), + ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), + ( + "level", + wagtail.blocks.ChoiceBlock( + choices=[ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + label="Message type", + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ], + label="Alert message", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), + ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Video title", required=False)), + ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(default="Transcription", label="Title", required=False), + ), + ( + "content", + wagtail.blocks.RichTextBlock(label="Transcription content", required=False), + ), + ], + label="Transcription", + ), + ), + ( + "badges_list", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ("text", wagtail.blocks.CharBlock(label="Badge label", required=False)), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock(label="Hide badge icon", required=False), + ), + ], + label="Badge", + ), + ) + ], + label="Badge list", + ), + ), + ( + "tags_list", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock(label="Small tag", required=False), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock(label="Icon", required=False), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ], + label="Tag list", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ("fr-icon-arrow-right-line fr-link--icon-right", "Icon on the right side"), + ("fr-icon-arrow-right-line fr-link--icon-left", "Icon on the left side"), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock(label="Top detail: text", required=False), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Card without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Card without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=["bold", "italic", "superscript", "subscript", "strikethrough"], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", label="Image", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [("new", "New"), ("grey", "Grey")], + ), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", required=False + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ("label", wagtail.blocks.CharBlock(label="Title")), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ( + "orange-terre-battue", + "Terre battue", + ), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), + ( + "grey_background", + wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock(label="Tile without background", required=False), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock(label="Tile without border", required=False), + ), + ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "accordions", + wagtail.blocks.StreamBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "accordion", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("content", wagtail.blocks.RichTextBlock(label="Content")), + ], + label="Accordion", + max_num=15, + min_num=1, + ), + ), + ], + group="DSFR components", + label="Accordions", + ), + ), + ( + "stepper", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), + ("current", wagtail.blocks.IntegerBlock(label="Current step")), + ( + "steps", + wagtail.blocks.StreamBlock( + [ + ( + "step", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ("detail", wagtail.blocks.TextBlock(label="Detail")), + ], + label="Step", + ), + ) + ], + label="Steps", + ), + ), + ], + group="DSFR components", + label="Stepper", + ), + ), + ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="Expert syntax", + label="Iframe", + ), + ), + ( + "separator", + wagtail.blocks.StructBlock( + [ + ( + "top_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Top margin", max_value=15, min_value=0 + ), + ), + ( + "bottom_margin", + wagtail.blocks.IntegerBlock( + default=3, label="Bottom margin", max_value=15, min_value=0 + ), + ), + ], + group="Page structure", + label="Separator", + ), + ), + ( + "multicolumns", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "bg_color", + wagtail.blocks.RegexBlock( + error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, + help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", + label="Background color, hexadecimal format (obsolete)", + regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", + required=False, + ), + ), + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "columns", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ( + "column", + wagtail.blocks.StructBlock( + [ + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("3", "3/12"), + ("4", "4/12"), + ("5", "5/12"), + ("6", "6/12"), + ("7", "7/12"), + ("8", "8/12"), + ("9", "9/12"), + ], + help_text="The total width of all columns should be 12.", + label="Column width", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text" + ), + ), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image" + ), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + label="Link", required=False + ), + ), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock( + label="Caption", required=False + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-content-media--sm", + "Small", + ), + ("", "Medium"), + ( + "fr-content-media--lg", + "Large", + ), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "quote", + wagtail.blocks.CharBlock( + label="Quote" + ), + ), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", + required=False, + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ("green-menthe", "Menthe"), + ( + "green-archipel", + "Archipel", + ), + ("blue-ecume", "Écume"), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ("pink-tuile", "Tuile"), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ("brown-opera", "Opéra"), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", + required=False, + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock( + label="Height (in pixels)" + ), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", + required=False, + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", + required=False, + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title", required=False + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", + page_type=[ + "blog.BlogIndexPage" + ], + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", + label="Filter by author", + required=False, + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, + label="Show filters", + required=False, + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", + required=False, + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", + required=False, + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", + required=False, + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", + required=False, + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", + required=False, + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", + required=False, + ), + ), + ], + group="DSFR components", + label="Vertical card", + ), + ), + ], + label="Column content", + ), + ), + ], + group="Page structure", + label="Adjustable column", + ), + ), + ], + label="Columns", + ), + ), + ], + group="Page structure", + label="Multiple columns", + ), + ), + ( + "fullwidthbackground", + wagtail.blocks.StructBlock( + [ + ( + "bg_image", + wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), + ), + ( + "bg_color_class", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "Primary colors", + [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], + ), + ("Neutral colors", [("grey", "Grey")]), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + help_text="Uses the French Design System colors", + label="Background color", + required=False, + ), + ), + ( + "content", + wagtail.blocks.StreamBlock( + [ + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "image", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "alt", + wagtail.blocks.CharBlock( + label="Alternative text (textual description of the image)", + required=False, + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ("url", wagtail.blocks.URLBlock(label="Link", required=False)), + ], + label="Image", + ), + ), + ( + "video", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Video title", required=False + ), + ), + ( + "caption", + wagtail.blocks.CharBlock(label="Caption", required=False), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", + label="Video URL", + ), + ), + ( + "width", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + label="Witdh", + required=False, + ), + ), + ( + "video_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ], + label="Video ratio", + required=False, + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", + label="Title", + required=False, + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", + required=False, + ), + ), + ], + label="Transcription", + required=False, + ), + ), + ], + label="Video", + ), + ), + ( + "transcription", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + default="Transcription", label="Title", required=False + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Transcription content", required=False + ), + ), + ], + label="Transcription", + ), + ), + ( + "callout", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn", "Primary"), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", required=False + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-btn--icon-left", "Left"), + ("fr-btn--icon-right", "Right"), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Callout", + ), + ), + ( + "highlight", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-text--sm", "Small"), + ("", "Medium"), + ("fr-text--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + group="DSFR components", + label="Highlight", + ), + ), + ( + "quote", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ("quote", wagtail.blocks.CharBlock(label="Quote")), + ( + "author_name", + wagtail.blocks.CharBlock( + label="Author name", required=False + ), + ), + ( + "author_title", + wagtail.blocks.CharBlock( + label="Author title", required=False + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + label="Color", + required=False, + ), + ), + ], + group="DSFR components", + label="Quote", + ), + ), + ( + "text_cta", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.RichTextBlock( + label="Rich text", required=False + ), + ), + ( + "cta_buttons", + wagtail.blocks.StreamBlock( + [ + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ) + ], + label="Call-to-action buttons", + max_num=1, + required=False, + ), + ), + ( + "cta_label", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Call to action label (obsolete)", + required=False, + ), + ), + ( + "cta_url", + wagtail.blocks.CharBlock( + help_text="This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + label="Link (obsolete)", + required=False, + ), + ), + ], + label="Text and call to action", + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + label="Single link", + ), + ), + ( + "iframe", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + label="Title", + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + help_text="Example for Tally: https://tally.so/embed/w2jMRa", + label="URL of the iframe", + ), + ), + ( + "height", + wagtail.blocks.IntegerBlock(label="Height (in pixels)"), + ), + ( + "parameters", + wagtail.blocks.CharBlock( + help_text="For example: \"allow='geolocation'\".", + label="Parameters", + required=False, + ), + ), + ], + group="DSFR components", + label="Iframe", + ), + ), + ( + "tile", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + help_text="Prefer SVG files.", + label="Image", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "detail_text", + wagtail.blocks.CharBlock( + help_text="If the tile links to a downloadable document, the values are pre-filled.", + label="Detail text", + required=False, + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tile", required=False + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Tile with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Tile without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Tile without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Tile with a shadow", required=False + ), + ), + ( + "is_horizontal", + wagtail.blocks.BooleanBlock( + label="Horizontal tile", required=False + ), + ), + ], + group="DSFR components", + label="Tile", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock(label="Title", required=False), + ), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock( + label="Blog", page_type=["blog.BlogIndexPage"] + ), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, + label="Number of entries", + max_value=8, + min_value=1, + required=False, + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", + label="Filter by category", + required=False, + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", + label="Filter by tag", + required=False, + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock( + default=False, label="Show filters", required=False + ), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "image_and_text", + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock(label="Image"), + ), + ( + "image_side", + wagtail.blocks.ChoiceBlock( + choices=[("left", "Left"), ("right", "Right")], + label="Side where the image is displayed", + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], + label="Image width", + ), + ), + ("text", wagtail.blocks.RichTextBlock(label="Rich text")), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", required=False + ), + ), + ( + "icon", + wagtail.blocks.ChoiceBlock( + choices=[ + ("", "No icon"), + ( + "fr-icon-arrow-right-line fr-link--icon-right", + "Icon on the right side", + ), + ( + "fr-icon-arrow-right-line fr-link--icon-left", + "Icon on the left side", + ), + ], + help_text="Only used for internal links.", + label="Icon", + required=False, + ), + ), + ( + "size", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-link--sm", "Small"), + ("", "Medium"), + ("fr-link--lg", "Large"), + ], + label="Size", + required=False, + ), + ), + ], + help_text="The link is shown at the bottom of the text block, with an arrow", + label="Link", + required=False, + ), + ), + ( + "link_label", + wagtail.blocks.CharBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link label (obsolete)", + required=False, + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Internal link (obsolete)", + required=False, + ), + ), + ( + "link_url", + wagtail.blocks.URLBlock( + group="obsolete", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link URL (obsolete)", + required=False, + ), + ), + ], + label="Image and text", + ), + ), + ( + "card", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title")), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + help_text="Adapt to the page layout. Defaults to heading 3.", + label="Heading level", + ), + ), + ( + "description", + wagtail.blocks.RichTextBlock( + features=[ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + label="Content", + required=False, + ), + ), + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Image", required=False + ), + ), + ( + "image_ratio", + wagtail.blocks.ChoiceBlock( + choices=[ + ("fr-card--horizontal-tier", "1/3"), + ("fr-card--horizontal-half", "50/50"), + ], + label="Image ratio", + required=False, + ), + ), + ( + "image_badge", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ("new", "New"), + ("grey", "Grey"), + ], + ), + ( + "System colors", + [ + ("info", "Info"), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ], + help_text="Only used if the card has an image.", + label="Image area badge", + max_num=1, + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + label="Link", + required=False, + ), + ), + ( + "url", + wagtail.blocks.URLBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="Link (obsolete)", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + group="target", + help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", + label="or Document (obsolete)", + required=False, + ), + ), + ( + "top_detail_text", + wagtail.blocks.CharBlock( + label="Top detail: text", required=False + ), + ), + ( + "top_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Top detail: icon", required=False + ), + ), + ( + "top_detail_badges_tags", + wagtail.blocks.StreamBlock( + [ + ( + "badges", + wagtail.blocks.StreamBlock( + [ + ( + "badge", + wagtail.blocks.StructBlock( + [ + ( + "text", + wagtail.blocks.CharBlock( + label="Badge label", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "", + [ + ( + "new", + "New", + ), + ( + "grey", + "Grey", + ), + ], + ), + ( + "System colors", + [ + ( + "info", + "Info", + ), + ( + "success", + "Success", + ), + ( + "warning", + "Warning", + ), + ( + "error", + "Error", + ), + ], + ), + ( + "Illustration colors", + [ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + ), + ], + label="Badge color", + required=False, + ), + ), + ( + "hide_icon", + wagtail.blocks.BooleanBlock( + label="Hide badge icon", + required=False, + ), + ), + ], + label="Badge", + ), + ) + ] + ), + ), + ( + "tags", + wagtail.blocks.StreamBlock( + [ + ( + "tag", + wagtail.blocks.StructBlock( + [ + ( + "label", + wagtail.blocks.CharBlock( + label="Title" + ), + ), + ( + "is_small", + wagtail.blocks.BooleanBlock( + label="Small tag", + required=False, + ), + ), + ( + "color", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "green-tilleul-verveine", + "Tilleul verveine", + ), + ( + "green-bourgeon", + "Bourgeon", + ), + ( + "green-emeraude", + "Émeraude", + ), + ( + "green-menthe", + "Menthe", + ), + ( + "green-archipel", + "Archipel", + ), + ( + "blue-ecume", + "Écume", + ), + ( + "blue-cumulus", + "Cumulus", + ), + ( + "purple-glycine", + "Glycine", + ), + ( + "pink-macaron", + "Macaron", + ), + ( + "pink-tuile", + "Tuile", + ), + ( + "yellow-tournesol", + "Tournesol", + ), + ( + "yellow-moutarde", + "Moutarde", + ), + ( + "orange-terre-battue", + "Terre battue", + ), + ( + "brown-cafe-creme", + "Café crème", + ), + ( + "brown-caramel", + "Caramel", + ), + ( + "brown-opera", + "Opéra", + ), + ( + "beige-gris-galet", + "Gris galet", + ), + ], + help_text="Only for clickable tags", + label="Tag color", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ], + required=False, + ), + ), + ], + label="Tag", + ), + ) + ] + ), + ), + ], + label="Top detail: badges or tags", + max_num=1, + required=False, + ), + ), + ( + "bottom_detail_text", + wagtail.blocks.CharBlock( + help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", + label="Bottom detail: text", + required=False, + ), + ), + ( + "bottom_detail_icon", + content_manager.blocks.IconPickerBlock( + label="Bottom detail: icon", required=False + ), + ), + ( + "call_to_action", + wagtail.blocks.StreamBlock( + [ + ( + "links", + wagtail.blocks.StreamBlock( + [ + ( + "link", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ], + label="Link", + ), + ) + ] + ), + ), + ( + "buttons", + wagtail.blocks.StreamBlock( + [ + ( + "button", + wagtail.blocks.StructBlock( + [ + ( + "page", + wagtail.blocks.PageChooserBlock( + help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", + label="Page", + required=False, + ), + ), + ( + "document", + wagtail.documents.blocks.DocumentChooserBlock( + help_text="Use either this, the external URL or the page parameter.", + label="Document", + required=False, + ), + ), + ( + "external_url", + wagtail.blocks.URLBlock( + help_text="Use either this, the document or the page parameter.", + label="External URL", + required=False, + ), + ), + ( + "text", + wagtail.blocks.CharBlock( + label="Link label", + required=False, + ), + ), + ( + "button_type", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn", + "Primary", + ), + ( + "fr-btn fr-btn--secondary", + "Secundary", + ), + ( + "fr-btn fr-btn--tertiary", + "Tertiary", + ), + ( + "fr-btn fr-btn--tertiary-no-outline", + "Tertiary without border", + ), + ], + label="Button type", + required=False, + ), + ), + ( + "icon_class", + content_manager.blocks.IconPickerBlock( + label="Icon", + required=False, + ), + ), + ( + "icon_side", + wagtail.blocks.ChoiceBlock( + choices=[ + ( + "fr-btn--icon-left", + "Left", + ), + ( + "fr-btn--icon-right", + "Right", + ), + ], + label="Icon side", + required=False, + ), + ), + ], + label="Button", + ), + ) + ], + help_text="Please use only one primary button. If you use icons, align them on the same side.", + ), + ), + ], + help_text="Incompatible with the bottom detail text.", + label="Bottom call-to-action: links or buttons", + max_num=1, + required=False, + ), + ), + ( + "grey_background", + wagtail.blocks.BooleanBlock( + label="Card with grey background", required=False + ), + ), + ( + "no_background", + wagtail.blocks.BooleanBlock( + label="Card without background", required=False + ), + ), + ( + "no_border", + wagtail.blocks.BooleanBlock( + label="Card without border", required=False + ), + ), + ( + "shadow", + wagtail.blocks.BooleanBlock( + label="Card with a shadow", required=False + ), + ), + ], + group="DSFR components", + label="Horizontal card", + ), + ), + ], + label="Content", + ), + ), + ], + group="Page structure", + label="Full width background", + ), + ), + ( + "subpageslist", + wagtail.blocks.static_block.StaticBlock( + admin_text="A simple, alphabetical list of the subpages of the current page.", + group="Website structure", + label="Subpages list", + template="content_manager/blocks/subpages_list.html", + ), + ), + ( + "blog_recent_entries", + wagtail.blocks.StructBlock( + [ + ("title", wagtail.blocks.CharBlock(label="Title", required=False)), + ( + "heading_tag", + wagtail.blocks.ChoiceBlock( + choices=[ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + help_text="Adapt to the page layout. Defaults to heading 2.", + label="Heading level", + required=False, + ), + ), + ( + "blog", + wagtail.blocks.PageChooserBlock(label="Blog", page_type=["blog.BlogIndexPage"]), + ), + ( + "entries_count", + wagtail.blocks.IntegerBlock( + default=3, label="Number of entries", max_value=8, min_value=1, required=False + ), + ), + ( + "category_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Category", label="Filter by category", required=False + ), + ), + ( + "tag_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "content_manager.Tag", label="Filter by tag", required=False + ), + ), + ( + "author_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Person", label="Filter by author", required=False + ), + ), + ( + "source_filter", + wagtail.snippets.blocks.SnippetChooserBlock( + "blog.Organization", + help_text="The source is the organization of the post author", + label="Filter by source", + required=False, + ), + ), + ( + "show_filters", + wagtail.blocks.BooleanBlock(default=False, label="Show filters", required=False), + ), + ], + group="Website structure", + label="Blog recent entries", + ), + ), + ( + "html", + wagtail.blocks.RawHTMLBlock( + group="Expert syntax", + help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + readonly=True, + ), + ), + ], + blank=True, + ), + ), + ] diff --git a/content_manager/migrations/__init__.py b/content_manager/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/models.py b/content_manager/models.py new file mode 100644 index 000000000..d0af8b507 --- /dev/null +++ b/content_manager/models.py @@ -0,0 +1,335 @@ +from django.db import models +from django.forms.widgets import Textarea +from django.utils.translation import gettext_lazy as _ +from modelcluster.fields import ParentalKey +from modelcluster.models import ClusterableModel +from modelcluster.tags import ClusterTaggableManager +from taggit.models import Tag as TaggitTag, TaggedItemBase +from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel, ObjectList, TabbedInterface +from wagtail.contrib.settings.models import BaseSiteSetting, register_setting +from wagtail.fields import RichTextField +from wagtail.images import get_image_model_string +from wagtail.models import Orderable +from wagtail.snippets.models import register_snippet + +from content_manager.abstract import SitesFacilesBasePage +from content_manager.constants import LIMITED_RICHTEXTFIELD_FEATURES +from content_manager.managers import TagManager +from content_manager.widgets import DsfrIconPickerWidget + + +class ContentPage(SitesFacilesBasePage): + tags = ClusterTaggableManager(through="TagContentPage", blank=True) + + class Meta: + verbose_name = _("Content page") + + settings_panels = SitesFacilesBasePage.settings_panels + [ + FieldPanel("tags"), + ] + + +class TagContentPage(TaggedItemBase): + content_object = ParentalKey("ContentPage", related_name="contentpage_tags") + + +@register_snippet +class Tag(TaggitTag): + objects = TagManager() + + class Meta: + proxy = True + verbose_name = _("Tag") + + +class MonospaceField(models.TextField): + """ + A TextField which renders as a large HTML textarea with monospace font. + """ + + def formfield(self, **kwargs): + kwargs["widget"] = Textarea( + attrs={ + "rows": 12, + "class": "monospace", + "spellcheck": "false", + } + ) + return super().formfield(**kwargs) + + +@register_setting(icon="code") +class AnalyticsSettings(BaseSiteSetting): + class Meta: + verbose_name = "Scripts de suivi" + + head_scripts = MonospaceField( + blank=True, + null=True, + verbose_name="Scripts de suivi ", + help_text="Ajoutez des scripts de suivi entre les balises .", + ) + + body_scripts = MonospaceField( + blank=True, + null=True, + verbose_name="Scripts de suivi ", + help_text="Ajoutez des scripts de suivi vers la fermeture de la balise .", + ) + + panels = [ + MultiFieldPanel( + [ + FieldPanel("head_scripts"), + FieldPanel("body_scripts"), + ], + heading="Scripts de suivi", + ), + ] + + +@register_setting(icon="cog") +class CmsDsfrConfig(ClusterableModel, BaseSiteSetting): + class Meta: + verbose_name = _("Site configuration") + verbose_name_plural = _("Site configurations") + + header_brand = models.CharField( + _("Institution (header)"), + max_length=200, + default="Intitulé officiel", + help_text=_("Institution brand as defined on page https://www.info.gouv.fr/marque-de-letat/le-bloc-marque"), + blank=True, + ) + header_brand_html = models.CharField( + _("Institution with line break (header)"), + max_length=200, + default="Intitulé
officiel", + blank=True, + help_text=_("Institution brand with
tags for line breaks"), + ) + footer_brand = models.CharField( + _("Institution (footer)"), + max_length=200, + default="Intitulé officiel", + blank=True, + ) + + footer_brand_html = models.CharField( + _("Institution with line break (footer)"), + max_length=200, + default="Intitulé
officiel", + blank=True, + ) + + site_title = models.CharField( + _("Site title"), + max_length=200, + default=_("Site title"), + blank=True, + ) + site_tagline = models.CharField( + _("Site tagline"), + max_length=200, + default=_("Site tagline"), + blank=True, + ) + + notice = RichTextField( + _("Important notice"), + default="", + blank=True, + features=LIMITED_RICHTEXTFIELD_FEATURES, + help_text=_( + "The important notice banner should only be used for essential and temporary information. \ + (Excessive or continuous use risks “drowning” the message.)" + ), + ) + + beta_tag = models.BooleanField(_("Show the BETA tag next to the title"), default=False) + + footer_description = RichTextField( + _("Description"), + default="", + blank=True, + features=LIMITED_RICHTEXTFIELD_FEATURES, + ) + + # Operator logo + operator_logo_file = models.ForeignKey( + get_image_model_string(), + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + verbose_name=_("Operator logo"), + ) + + operator_logo_alt = models.CharField( + _("Logo alt text"), + max_length=200, + blank=True, + help_text=_("Must contain the text present in the image."), + ) + operator_logo_width = models.DecimalField( + _("Width (em)"), + max_digits=3, + decimal_places=1, + null=True, + default="0.0", + help_text=_( + "To be adjusted according to the width of the logo.\ + Example for a vertical logo: 3.5, Example for a horizontal logo: 8." + ), + ) + + search_bar = models.BooleanField("Barre de recherche dans l’en-tête", default=False) # type: ignore + theme_modale_button = models.BooleanField("Choix du thème clair/sombre", default=False) # type: ignore + mourning = models.BooleanField("Mise en berne", default=False) # type: ignore + + newsletter_description = models.TextField(_("Newsletter description"), default="", blank=True) + + newsletter_url = models.URLField( + _("Newsletter registration URL"), + default="", + blank=True, + ) + + site_panels = [ + FieldPanel("site_title"), + FieldPanel("site_tagline"), + FieldPanel("footer_description"), + FieldPanel("notice"), + MultiFieldPanel( + [ + FieldPanel("operator_logo_file"), + FieldPanel("operator_logo_alt"), + FieldPanel("operator_logo_width"), + ], + heading=_("Operator logo"), + ), + MultiFieldPanel( + [ + FieldPanel("search_bar"), + FieldPanel("mourning"), + FieldPanel("beta_tag"), + FieldPanel("theme_modale_button"), + ], + heading=_("Advanced settings"), + ), + ] + + brand_panels = [ + MultiFieldPanel( + [ + FieldPanel("header_brand"), + FieldPanel("header_brand_html"), + ], + heading=_("Header"), + ), + MultiFieldPanel( + [ + FieldPanel("footer_brand"), + FieldPanel("footer_brand_html"), + ], + heading=_("Footer"), + ), + ] + + newsletter_social_media_panels = [ + MultiFieldPanel( + [ + FieldPanel("newsletter_description"), + FieldPanel("newsletter_url"), + ], + heading=_("Newsletter"), + ), + InlinePanel("social_media_items", label=_("Social media items")), + ] + edit_handler = TabbedInterface( + [ + ObjectList(site_panels, heading=_("Generic")), + ObjectList(brand_panels, heading=_("Brand block")), + ObjectList(newsletter_social_media_panels, heading=_("Newsletter and social media")), + ] + ) + + def show_newsletter_block(self): + if self.newsletter_description and self.newsletter_url: + return True + else: + return False + + def show_social_block(self): + return bool(self.social_media_items.count()) + + def show_newsletter_and_social_block(self): + # Returns true if at least one of the two blocks is used + if self.show_newsletter_block() or self.show_social_block(): + return True + else: + return False + + +class SocialMediaItem(Orderable): + site_config = ParentalKey(CmsDsfrConfig, related_name="social_media_items") + title = models.CharField(_("Title"), max_length=200, default="", blank=True) + + url = models.URLField( + _("URL"), + default="", + blank=True, + ) + icon_class = models.CharField(_("Icon class"), max_length=200, default="", blank=True) + + panels = [ + FieldPanel("title"), + FieldPanel("url"), + FieldPanel("icon_class", widget=DsfrIconPickerWidget), + ] + + class Meta: + verbose_name = _("Social media item") + verbose_name_plural = _("Social media items") + + +# Mega-Menus +class MegaMenuCategory(Orderable): + mega_menu = ParentalKey("content_manager.MegaMenu", related_name="categories", on_delete=models.CASCADE) + category = models.ForeignKey("wagtailmenus.FlatMenu", on_delete=models.CASCADE, verbose_name=_("Category")) + + class Meta: + verbose_name = _("Mega menu category") + verbose_name_plural = _("Mega menu categories") + + +@register_snippet +class MegaMenu(ClusterableModel): + name = models.CharField(_("Name"), max_length=255) + parent_menu_item = models.ForeignKey( + "wagtailmenus.MainMenuItem", on_delete=models.CASCADE, related_name="megamenu_parent_menu_items" + ) + description = models.TextField(_("Description"), blank=True) + main_link = models.URLField(_("Main link"), blank=True, null=True) + + panels = [ + FieldPanel("name"), + FieldPanel("parent_menu_item"), + FieldPanel("description"), + FieldPanel("main_link"), + InlinePanel( + "categories", + max_num=4, + heading=_("Categories"), + help_text=_("Maximum 4 categories, each with maximum 8 links."), + ), + ] + + def __str__(self): # type: ignore + return self.name + + def get_categories(self): + return self.categories.order_by("sort_order") + + class Meta: + verbose_name = _("Mega menu") diff --git a/content_manager/templates/content_manager/blocks/accordions.html b/content_manager/templates/content_manager/blocks/accordions.html new file mode 100644 index 000000000..2615ee139 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/accordions.html @@ -0,0 +1,25 @@ +{% load dsfr_tags wagtailcore_tags %} +
+
+
+ {% for subblock in block.value %} + {% if subblock.block_type == 'title' %} +
+

{{ subblock.value }}

+
+ {% endif %} + {% endfor %} +
+ {% for subblock in block.value %} + {% if subblock.block_type == 'accordion' %} + {% with forloop.counter0|lower as str_counter %} + {% with "accordion-"|add:accordions_id|add:"-"|add:str_counter as accordion_id %} + {% dsfr_accordion id=accordion_id title=subblock.value.title content=subblock.value.content|richtext %} + {% endwith %} + {% endwith %} + {% endif %} + {% endfor %} +
+
+
+
diff --git a/content_manager/templates/content_manager/blocks/alert.html b/content_manager/templates/content_manager/blocks/alert.html new file mode 100644 index 000000000..0542eb3d9 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/alert.html @@ -0,0 +1,2 @@ +{% load dsfr_tags %} +{% dsfr_alert title=block.value.title type=block.value.level content=block.value.description heading_tag=block.value.heading_tag %} diff --git a/content_manager/templates/content_manager/blocks/badge.html b/content_manager/templates/content_manager/blocks/badge.html new file mode 100644 index 000000000..7a0cf5e6a --- /dev/null +++ b/content_manager/templates/content_manager/blocks/badge.html @@ -0,0 +1,3 @@ +

+ {{ value.text }} +

diff --git a/content_manager/templates/content_manager/blocks/badges_list.html b/content_manager/templates/content_manager/blocks/badges_list.html new file mode 100644 index 000000000..7deaef897 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/badges_list.html @@ -0,0 +1,7 @@ +{% load static wagtailcore_tags %} + +
    + {% for badge in block.value %} +
  • {% include_block badge %}
  • + {% endfor %} +
diff --git a/content_manager/templates/content_manager/blocks/blocks_stream.html b/content_manager/templates/content_manager/blocks/blocks_stream.html new file mode 100644 index 000000000..260970331 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/blocks_stream.html @@ -0,0 +1,39 @@ +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags wagtailmarkdown %} + +{% for block in stream %} + {% if block.block_type == 'callout' %} +
{% include_block block %}
+ {% elif block.block_type == 'image' %} +
+
+
{% include_block block %}
+
+
+ {% elif block.block_type == 'multicolumns' %} + {% include_block block %} + {% elif block.block_type == 'fullwidthbackground' %} + {% include_block block %} + {% elif block.block_type == 'paragraph' %} +
{{ block.value|richtext }}
+ {% elif block.block_type == 'alert' %} +
{% include_block block %}
+ {% elif block.block_type == 'card' %} +
{% include_block block %}
+ {% elif block.block_type == 'tile' %} +
{% include_block block %}
+ {% elif block.block_type == 'accordions' %} + {% include "content_manager/blocks/accordions.html" with accordions_id=forloop.counter0|lower %} + {% elif block.block_type == 'stepper' %} + {% include "content_manager/blocks/stepper.html" %} + {% elif block.block_type == 'separator' %} +
+
+
+ {% elif block.block_type == 'markdown' %} +
{{ block.value|markdown }}
+ {% elif block.block_type == 'html' %} +
{{ block.value|safe }}
+ {% else %} +
{% include_block block %}
+ {% endif %} +{% endfor %} diff --git a/content_manager/templates/content_manager/blocks/blog_recent_entries.html b/content_manager/templates/content_manager/blocks/blog_recent_entries.html new file mode 100644 index 000000000..4eb6b05f3 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/blog_recent_entries.html @@ -0,0 +1,117 @@ +{% load i18n wagtailcore_tags wagtail_dsfr_tags %} + +
+ {% if value.title %} + <{{ value.heading_tag|default:"h2" }}>{{ value.title }} + {% endif %} + + {% if value.show_filters %} + {% if value.category_filter and value.blog.get_categories.count %} +
+ <{{ value.sub_heading_tag }} class="fr-h6">{% translate "Filter by category" %} + +
+ {% endif %} + + {% if value.tag_filter and value.blog.get_tags.count %} +
+ <{{ value.sub_heading_tag }} class="fr-h6">{% translate "Filter by tag" %} +
    + {% for tag in value.blog.get_tags %} +
  • + + {{ tag }} + +
  • + {% endfor %} +
+
+ {% endif %} + + {% if value.author_filter and value.blog.get_authors.count %} +
+ <{{ value.sub_heading_tag }} class="fr-h6">{% translate "Filter by author" %} +
    + {% for author in value.blog.get_authors %} +
  • + {{ author.name }} +
  • + {% endfor %} +
+
+ {% endif %} + + {% if value.source_filter and value.blog.get_sources.count %} +
+ <{{ value.sub_heading_tag }} class="fr-h6">{% translate "Filter by source" %} +
    + {% for source in value.blog.get_sources %} +
  • + {{ source.name }} +
  • + {% endfor %} +
+
+ {% endif %} + {% endif %} + +
+ {% for post in value.posts %} +
+ +
+ {% empty %} +

{% translate "No article found." %}

+ {% endfor %} +
+ +
diff --git a/content_manager/templates/content_manager/blocks/breadcrumbs.html b/content_manager/templates/content_manager/blocks/breadcrumbs.html new file mode 100644 index 000000000..f64f1b826 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/breadcrumbs.html @@ -0,0 +1,25 @@ +{% if self.get_ancestors|length > 1 %} + +{% endif %} diff --git a/content_manager/templates/content_manager/blocks/button.html b/content_manager/templates/content_manager/blocks/button.html new file mode 100644 index 000000000..d7931c6b6 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/button.html @@ -0,0 +1,9 @@ +{% if button.external_url %} + {{ button.text }} +{% else %} + {{ button.text }} +{% endif %} diff --git a/content_manager/templates/content_manager/blocks/buttons_horizontal_list.html b/content_manager/templates/content_manager/blocks/buttons_horizontal_list.html new file mode 100644 index 000000000..916fb869d --- /dev/null +++ b/content_manager/templates/content_manager/blocks/buttons_horizontal_list.html @@ -0,0 +1,9 @@ +{% load static wagtailcore_tags %} + +{% with block.value.0.value.icon_side as icons_side %} +
    + {% for button in block.value %} +
  • {% include "content_manager/blocks/button.html" with button=button.value %}
  • + {% endfor %} +
+{% endwith %} diff --git a/content_manager/templates/content_manager/blocks/buttons_vertical_list.html b/content_manager/templates/content_manager/blocks/buttons_vertical_list.html new file mode 100644 index 000000000..23173bfa4 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/buttons_vertical_list.html @@ -0,0 +1,7 @@ +{% load static wagtailcore_tags %} + +
    + {% for button in block.value %} +
  • {% include "content_manager/blocks/button.html" with button=button.value %}
  • + {% endfor %} +
diff --git a/content_manager/templates/content_manager/blocks/callout.html b/content_manager/templates/content_manager/blocks/callout.html new file mode 100644 index 000000000..12de18e8b --- /dev/null +++ b/content_manager/templates/content_manager/blocks/callout.html @@ -0,0 +1,12 @@ +{% load wagtailcore_tags wagtail_dsfr_tags %} +
+ {% if value.title %} + <{{ value.heading_tag | default:"p" }} class="fr-callout__title"> + {{ value.title }} + + {% endif %} + {{ value.text | richtext_p_add_class:"fr-callout__text" }} + {% if value.button.url %} + {% include "content_manager/blocks/button.html" with button=value.button %} + {% endif %} +
diff --git a/content_manager/templates/content_manager/blocks/card_horizontal.html b/content_manager/templates/content_manager/blocks/card_horizontal.html new file mode 100644 index 000000000..e1285e527 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/card_horizontal.html @@ -0,0 +1,73 @@ +{% load i18n wagtailimages_tags wagtailcore_tags dsfr_tags wagtail_dsfr_tags %} + diff --git a/content_manager/templates/content_manager/blocks/card_vertical.html b/content_manager/templates/content_manager/blocks/card_vertical.html new file mode 100644 index 000000000..9eb90d311 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/card_vertical.html @@ -0,0 +1,66 @@ +{% load i18n wagtailimages_tags wagtailcore_tags dsfr_tags wagtail_dsfr_tags %} + diff --git a/content_manager/templates/content_manager/blocks/download_info.html b/content_manager/templates/content_manager/blocks/download_info.html new file mode 100644 index 000000000..3ef3181ce --- /dev/null +++ b/content_manager/templates/content_manager/blocks/download_info.html @@ -0,0 +1,12 @@ +{% load i18n %} +{% if document.file_extension %} + {{ document.file_extension|upper }} +{% else %} + {% translate "Unknown file format" %} +{% endif %} +- +{% if document.file_size %} + {{ document.file_size|filesizeformat }} +{% else %} + {% translate "Unknown file size" %} +{% endif %} diff --git a/content_manager/templates/content_manager/blocks/full_width_background.html b/content_manager/templates/content_manager/blocks/full_width_background.html new file mode 100644 index 000000000..a8c372a50 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/full_width_background.html @@ -0,0 +1,9 @@ +{% load dsfr_tags wagtailcore_tags wagtailimages_tags %} +{% image value.bg_image original as bg_img %} +
+
{% include "content_manager/blocks/blocks_stream.html" with stream=value.content %}
+
diff --git a/content_manager/templates/content_manager/blocks/heading.html b/content_manager/templates/content_manager/blocks/heading.html new file mode 100644 index 000000000..8624f223a --- /dev/null +++ b/content_manager/templates/content_manager/blocks/heading.html @@ -0,0 +1,32 @@ +{% load static wagtailcore_tags wagtailimages_tags %} +{% if page.header_image or page.header_color_class %} + {% image page.header_image fill-1200x350 as bg_img %} +
+ {% if page.header_with_title or page.header_cta_buttons or page.header_cta_link and page.header_cta_label %} +
+
+
+ {% if page.header_with_title %} +

+ {{ page.title }} + {% if extra_title %}: {{ extra_title }}{% endif %} +

+ {% endif %} + {% if page.header_cta_text %}{{ page.header_cta_text|richtext }}{% endif %} + {% if page.header_cta_buttons %} + {% for block in page.header_cta_buttons %} + {% include_block block %} + {% endfor %} + {% elif page.header_cta_url and page.header_cta_label %} + {{ page.header_cta_label }} + {% endif %} +
+
+
+ {% endif %} +
+{% endif %} diff --git a/content_manager/templates/content_manager/blocks/highlight.html b/content_manager/templates/content_manager/blocks/highlight.html new file mode 100644 index 000000000..6149fbfe9 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/highlight.html @@ -0,0 +1,5 @@ +{% load wagtailcore_tags wagtail_dsfr_tags %} + +
+ {{ value.text | richtext_p_add_class:value.size }} +
diff --git a/content_manager/templates/content_manager/blocks/iframe.html b/content_manager/templates/content_manager/blocks/iframe.html new file mode 100644 index 000000000..e2eb0ba31 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/iframe.html @@ -0,0 +1 @@ + diff --git a/content_manager/templates/content_manager/blocks/image.html b/content_manager/templates/content_manager/blocks/image.html new file mode 100644 index 000000000..d93e73848 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/image.html @@ -0,0 +1,21 @@ +{% load i18n wagtailimages_tags dsfr_tags %} +{% if value.title %} + <{{ value.heading_tag|default:"h3" }}>{{ value.title }} +{% endif %} +
+
+ {% with "fr-responsive-img "|concatenate:value.image_ratio as extra_classes %} + {% if value.url %} + + {% image value.image original class=extra_classes alt=value.alt %} + {% translate "Go to page" %} {{ value.url }} + + {% else %} + {% image value.image original class=extra_classes alt=value.alt %} + {% endif %} + {% endwith %} +
+ {% if value.caption %}
{{ value.caption }}
{% endif %} +
diff --git a/content_manager/templates/content_manager/blocks/image_and_text.html b/content_manager/templates/content_manager/blocks/image_and_text.html new file mode 100644 index 000000000..0e18fe271 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/image_and_text.html @@ -0,0 +1,40 @@ +{% load static wagtailcore_tags wagtailimages_tags %} +
+
+ {% if value.image_side == "left" %} +
+
{% image value.image original class="fr-responsive-img" alt="" %}
+
+
+ {{ value.text|richtext }} + + {% if value.link is not None and value.link.url %} + {% include_block value.link %} + {% elif value.page and value.link_label %} + {{ value.link_label }} + {% elif value.link_url and value.link_label %} + {{ value.link_label }} + {% endif %} +
+ {% else %} +
+ {{ value.text|richtext }} + + {% if value.link is not None and value.link.url %} + {% include_block value.link %} + {% elif value.page and value.link_label %} + {{ value.link_label }} + {% elif value.link_url and value.link_label %} + {{ value.link_label }} + {% endif %} +
+
+
{% image value.image original class="fr-responsive-img" alt="" %}
+
+ {% endif %} +
+
diff --git a/content_manager/templates/content_manager/blocks/link.html b/content_manager/templates/content_manager/blocks/link.html new file mode 100644 index 000000000..80e555f91 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/link.html @@ -0,0 +1,17 @@ +{% load i18n dsfr_tags wagtailcore_tags wagtail_dsfr_tags %} +{% settings_value "WAGTAILADMIN_PATH" as admin_path %} + diff --git a/content_manager/templates/content_manager/blocks/links_vertical_list.html b/content_manager/templates/content_manager/blocks/links_vertical_list.html new file mode 100644 index 000000000..53b981654 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/links_vertical_list.html @@ -0,0 +1,13 @@ +{% load static wagtailcore_tags %} + + diff --git a/content_manager/templates/content_manager/blocks/messages.html b/content_manager/templates/content_manager/blocks/messages.html new file mode 100644 index 000000000..4f8105984 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/messages.html @@ -0,0 +1,25 @@ +{# Display Django message info from previous form #} +{% if messages %} +
+
+
+ {% for message in messages %} + {% if message.tags == "success" %} +
+

{{ message }}

+
+ {% elif message.tags == "info" %} +
+

{{ message }}

+
+ {% elif message.tags == "error" %} + + {% endif %} + {% endfor %} +
+
+
+{% endif %} diff --git a/content_manager/templates/content_manager/blocks/multicolumns.html b/content_manager/templates/content_manager/blocks/multicolumns.html new file mode 100644 index 000000000..5070f7872 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/multicolumns.html @@ -0,0 +1,35 @@ +{% load dsfr_tags wagtailcore_tags wagtailimages_tags %} +{% image value.bg_image original as bg_img %} +
+
+ {% if value.title %} +
+
+ <{{ value.heading_tag|default:"h2" }}>{{ value.title }} +
+
+ {% endif %} +
+ {% for subblock in value.columns %} + {% if subblock.block_type == 'column' %} +
+ {% include_block subblock.value.content %} +
+ {% elif subblock.block_type == 'text' %} +
{{ subblock.value|richtext }}
+ {% elif subblock.block_type == 'video' %} +
+

{{ subblock.value.title }}

+ {% include_block subblock %} +
+ {% else %} +
{% include_block subblock %}
+ {% endif %} + {% endfor %} +
+
+
diff --git a/content_manager/templates/content_manager/blocks/quote.html b/content_manager/templates/content_manager/blocks/quote.html new file mode 100644 index 000000000..0a7486903 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/quote.html @@ -0,0 +1,10 @@ +{% load dsfr_tags wagtailcore_tags wagtailimages_tags %} +{% image value.image original as img %} + +{% if value.color %} + {% with "fr-quote--"|concatenate:value.color as extra_classes %} + {% dsfr_quote text=value.quote author=value.author_name source=value.author_title image_url=img.url extra_classes=extra_classes %} + {% endwith %} +{% else %} + {% dsfr_quote text=value.quote author=value.author_name source=value.author_title image_url=img.url %} +{% endif %} diff --git a/content_manager/templates/content_manager/blocks/stepper.html b/content_manager/templates/content_manager/blocks/stepper.html new file mode 100644 index 000000000..feb89ac12 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/stepper.html @@ -0,0 +1,19 @@ +
+
+

{{ block.value.title }}

+
+
+
+ {% for subblock in block.value.steps %} +
+

+ {{ subblock.value.title }} +

+

{{ subblock.value.detail|linebreaksbr }}

+
+ {% endfor %} +
+
+
diff --git a/content_manager/templates/content_manager/blocks/subpages_list.html b/content_manager/templates/content_manager/blocks/subpages_list.html new file mode 100644 index 000000000..c15c20b0a --- /dev/null +++ b/content_manager/templates/content_manager/blocks/subpages_list.html @@ -0,0 +1,8 @@ +{% load wagtailcore_tags %} +
    + {% for subpage in page.get_children.live.all|dictsort:"title" %} +
  • + {{ subpage.title }} +
  • + {% endfor %} +
diff --git a/content_manager/templates/content_manager/blocks/tag.html b/content_manager/templates/content_manager/blocks/tag.html new file mode 100644 index 000000000..c1dea8fc8 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/tag.html @@ -0,0 +1,4 @@ +{% load i18n %} +{# djlint:off #} +<{% if value.link is not None and value.link.url %}a href="{{ value.link.url }}"{% else %}p{% endif %} class="fr-tag{% if value.is_small %} fr-tag--sm{% endif %}{% if value.color %} fr-tag--{{ value.color }}{% endif %}{% if value.icon_class %} {{ value.icon_class }} fr-tag--icon-left{% endif %}">{{ value.label }} +{# djlint:on #} diff --git a/content_manager/templates/content_manager/blocks/tags_list.html b/content_manager/templates/content_manager/blocks/tags_list.html new file mode 100644 index 000000000..30ee07b35 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/tags_list.html @@ -0,0 +1,7 @@ +{% load static wagtailcore_tags %} + +
    + {% for tag in block.value %} +
  • {% include_block tag %}
  • + {% endfor %} +
diff --git a/content_manager/templates/content_manager/blocks/text_and_cta.html b/content_manager/templates/content_manager/blocks/text_and_cta.html new file mode 100644 index 000000000..bd7bb54ec --- /dev/null +++ b/content_manager/templates/content_manager/blocks/text_and_cta.html @@ -0,0 +1,17 @@ +{% load wagtailcore_tags %} +
+ {{ value.text|richtext }} + + {% if value.cta_buttons %} +
+ {% for block in value.cta_buttons %} + {% include_block block %} + {% endfor %} +
+ {% elif value.cta_url and value.cta_label %} +

+ {# It doesn't use dsfr_link or dsfr_button because it's a link with a button style #} + {{ value.cta_label }} +

+ {% endif %} +
diff --git a/content_manager/templates/content_manager/blocks/tile.html b/content_manager/templates/content_manager/blocks/tile.html new file mode 100644 index 000000000..0fef53652 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/tile.html @@ -0,0 +1,58 @@ + +{% load i18n dsfr_tags wagtailcore_tags wagtailimages_tags wagtail_dsfr_tags %} + diff --git a/content_manager/templates/content_manager/blocks/transcription.html b/content_manager/templates/content_manager/blocks/transcription.html new file mode 100644 index 000000000..89412fcbe --- /dev/null +++ b/content_manager/templates/content_manager/blocks/transcription.html @@ -0,0 +1,2 @@ +{% load dsfr_tags wagtailcore_tags %} +{% dsfr_transcription content=value.content|richtext title=value.title %} diff --git a/content_manager/templates/content_manager/blocks/video.html b/content_manager/templates/content_manager/blocks/video.html new file mode 100644 index 000000000..23ffe9435 --- /dev/null +++ b/content_manager/templates/content_manager/blocks/video.html @@ -0,0 +1,15 @@ +{% load i18n wagtailcore_tags %} +
+ +
+ {{ value.caption }} + {% translate "Watch on the site" %} +
+ {% if value.transcription.content %} + {% include_block value.transcription %} + {% endif %} +
diff --git a/content_manager/templates/content_manager/content_page.html b/content_manager/templates/content_manager/content_page.html new file mode 100644 index 000000000..3f3a02646 --- /dev/null +++ b/content_manager/templates/content_manager/content_page.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags i18n %} + +{% block title %} + {{ page.seo_title|default:page.title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% block description %} + {% if page.search_description %}{% endif %} +{% endblock description %} + +{% block social_media %} + + + + + + + + {% if page.get_translations.live %} + {% for translation in page.get_translations.live %} + + {% endfor %} + {% endif %} + + + + + {% if page.header_image %} + + {% image page.header_image fill-1200x627 as header_image %} + + + {% else %} + + {% endif %} +{% endblock social_media %} + +{% block content %} + {% include "content_manager/blocks/heading.html" %} +
+ {% include "content_manager/blocks/breadcrumbs.html" %} + {% if not page.header_with_title %}

{{ page.title }}

{% endif %} +
+ + {% include "content_manager/blocks/messages.html" %} + + {% include "content_manager/blocks/blocks_stream.html" with stream=page.body %} + +
+ {% for tag in page.tags.all|dictsort:"slug" %} + {{ tag }} + {% endfor %} +
+{% endblock content %} diff --git a/content_manager/templates/content_manager/menus/mega_menu.html b/content_manager/templates/content_manager/menus/mega_menu.html new file mode 100644 index 000000000..3365c6cbf --- /dev/null +++ b/content_manager/templates/content_manager/menus/mega_menu.html @@ -0,0 +1,35 @@ +{% load menu_tags %} + diff --git a/content_manager/templates/content_manager/menus/mega_menu_category.html b/content_manager/templates/content_manager/menus/mega_menu_category.html new file mode 100644 index 000000000..2734ec5ca --- /dev/null +++ b/content_manager/templates/content_manager/menus/mega_menu_category.html @@ -0,0 +1,13 @@ +{% load menu_tags %} +{% if menu_items %} + +{% endif %} diff --git a/content_manager/templates/content_manager/search_results.html b/content_manager/templates/content_manager/search_results.html new file mode 100644 index 000000000..0fedc5826 --- /dev/null +++ b/content_manager/templates/content_manager/search_results.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags %} + +{% block title %} + + {% if object_list.count %} + {{ object_list.count }} résultat{{ object_list.count|pluralize }} + {% else %} + Aucun résultat + {% endif %} + pour la recherche « {{ query }} » — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% if page.search_description %} + {% block description %} + + {% endblock description %} +{% endif %} + +{% block content %} +
+

+ {% if object_list.count %} + {{ object_list.count }} résultat{{ object_list.count|pluralize }} + {% else %} + Aucun résultat + {% endif %} + pour la recherche « {{ query }} » +

+ {% if object_list.count %} +
    + {% for result in object_list %} +
  1. +

    + {{ result }} +

    + {% if result.search_description %}

    {{ result.search_description|safe }}

    {% endif %} + +
  2. + {% endfor %} +
+ {% else %} +
+
+

Nous n’avons trouvé aucun contenu correspondant à votre recherche.

+

Pour continuer votre visite, vous pouvez consulter notre page d’accueil.

+ +
+
+ +
+
+ {% endif %} +
+ +{% endblock content %} diff --git a/content_manager/templates/content_manager/tag_page.html b/content_manager/templates/content_manager/tag_page.html new file mode 100644 index 000000000..750c9d36f --- /dev/null +++ b/content_manager/templates/content_manager/tag_page.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags i18n %} + +{% block title %} + {{ title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% block description %} + +{% endblock description %} + +{% block social_media %} + + + + + + + + + +{% endblock social_media %} + +{% block content %} + {% include "content_manager/blocks/messages.html" %} + +
+ {% dsfr_breadcrumb breadcrumb %} +

{{ title }}

+
+ +
+
+ {% for entry in object_list %} +
+ +
+ {% empty %} +

Aucun article trouvé.

+ {% endfor %} +
+
+ + {% if posts.paginator.num_pages > 1 %} +
{% dsfr_pagination posts %}
+ {% endif %} + +{% endblock content %} diff --git a/content_manager/templates/content_manager/tags_list_page.html b/content_manager/templates/content_manager/tags_list_page.html new file mode 100644 index 000000000..68055a38c --- /dev/null +++ b/content_manager/templates/content_manager/tags_list_page.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} + +{% load static dsfr_tags wagtailcore_tags wagtailimages_tags i18n %} + +{% block title %} + {{ title }} — {{ settings.content_manager.CmsDsfrConfig.site_title }} +{% endblock title %} + +{% block description %} + +{% endblock description %} + +{% block social_media %} + + + + + + + + + +{% endblock social_media %} + +{% block content %} + {% include "content_manager/blocks/messages.html" %} + +
+ {% dsfr_breadcrumb breadcrumb %} +

{% translate "Tags" %}

+ +
+ {% for first_letter in sorted_tags.keys|dictsort:0 %} + {{ first_letter }} + {% endfor %} +
+ + {% for first_letter, tags in sorted_tags.items|dictsort:0 %} +

{{ first_letter }}

+ + {% endfor %} +
+{% endblock content %} diff --git a/content_manager/templates/content_manager/widgets/dsfr-icon-picker-widget.html b/content_manager/templates/content_manager/widgets/dsfr-icon-picker-widget.html new file mode 100644 index 000000000..1b6b90951 --- /dev/null +++ b/content_manager/templates/content_manager/widgets/dsfr-icon-picker-widget.html @@ -0,0 +1,53 @@ +{% load static i18n %} +
+
{% include "django/forms/widgets/text.html" %}
+ + {% with widget.attrs.id as widget_id %} + + + + {% endwith %} +
diff --git a/content_manager/templatetags/__init__.py b/content_manager/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/templatetags/wagtail_dsfr_tags.py b/content_manager/templatetags/wagtail_dsfr_tags.py new file mode 100644 index 000000000..b8a8a8525 --- /dev/null +++ b/content_manager/templatetags/wagtail_dsfr_tags.py @@ -0,0 +1,87 @@ +from bs4 import BeautifulSoup +from django import template +from django.conf import settings +from django.template.context import Context +from django.utils.html import mark_safe +from wagtail.rich_text import RichText + +from content_manager.models import MegaMenu + + +register = template.Library() + + +@register.inclusion_tag("content_manager/menus/mega_menu.html", takes_context=True) +def mega_menu(context: Context, parent_menu_id: int) -> dict: + """ + Returns a mega_menu item. Takes the parent menu id as parameter, + """ + menu = MegaMenu.objects.filter(parent_menu_item_id=parent_menu_id).first() + + return {"request": context["request"], "menu": menu} + + +@register.simple_tag +def settings_value(name): + return getattr(settings, name, "") + + +@register.filter +def richtext_p_add_class(value, class_name: str): + """ + Adds a CSS class to a Richtext-generated paragraph. + + Intended to be used right after a `| richext` filter in case of a RichTextField + (not necessary for a RichTextBlock) + """ + + if not class_name: + return value + + if isinstance(value, RichText): + # In case of a RichTextBlock, first render it + value = str(value) + + soup = BeautifulSoup(value, "html.parser") + + paragraphs = soup.find_all("p") + + for p in paragraphs: + p["class"] = p.get("class", []) + [class_name] + + return mark_safe(str(soup)) + + +@register.simple_tag(takes_context=True) +def toggle_url_filter(context, *_, **kwargs): + """ + Sets a URL filter, or removes it if it is already in use. + + The other filters can be passed through a dictionary or the GET parameters + """ + + filters_dict = kwargs.get("filters_dict", {}) + if filters_dict: + url_params = filters_dict.copy() + else: + url_params = context["request"].GET.copy() + + filters = [("author", "id"), ("category", "slug"), ("source", "slug"), ("tag", "slug")] + + for f in filters: + param = f[0] + attr = f[1] + val = kwargs.get(param, "") + current_val = context.get(f"current_{param}", "") + + if val and val != current_val: + url_params[param] = getattr(val, attr) + elif val and val == current_val: + url_params.pop(param) + + url_string = "&".join(["{}={}".format(x[0], x[1]) for x in url_params.items()]) + + if url_string: + return f"?{url_string}" + else: + return "" diff --git a/content_manager/tests/__init__.py b/content_manager/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/content_manager/tests/test_blocks.py b/content_manager/tests/test_blocks.py new file mode 100644 index 000000000..f31b12ed4 --- /dev/null +++ b/content_manager/tests/test_blocks.py @@ -0,0 +1,319 @@ +from django.contrib.auth.models import User +from wagtail.models import Page +from wagtail.rich_text import RichText +from wagtail.test.utils import WagtailPageTestCase + +from content_manager.models import ContentPage +from content_manager.utils import import_image + + +class HorizontalCardBlockCase(WagtailPageTestCase): + # Logic *should* be the same for a vertical card, but inside of a multiple columns block. + def setUp(self): + home = Page.objects.get(slug="home") + self.admin = User.objects.create_superuser("test", "test@test.test", "pass") + self.admin.save() + + body = [ + ( + "card", + { + "title": "Sample card", + "description": RichText('

This is a sample card.

'), + }, + ) + ] + self.content_page = home.add_child( + instance=ContentPage(title="Sample cards page", slug="content-page", owner=self.admin, body=body) + ) + self.content_page.save() + + def test_basic_card_is_renderable(self): + self.assertPageIsRenderable(self.content_page) + + def test_basic_card_has_structure_and_content(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertContains( + response, + "fr-card fr-card--horizontal", + ) + self.assertInHTML("""

Sample card

""", response.content.decode()) + self.assertInHTML( + """

This is a sample card.

""", response.content.decode() + ) + + def test_card_with_no_link_does_not_have_enlarge_class(self): + url = self.content_page.url + response = self.client.get(url) + + # The page header and footer have the class on the bloc-marque, + # The card with no link should not, so count should be 2 + self.assertContains(response, "fr-enlarge-link", count=2) + + def test_card_with_main_link(self): + body = [ + ( + "card", + {"title": "Sample card", "description": "This is a sample card.", "url": "https://www.info.gouv.fr"}, + ) + ] + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + response = self.client.get(url) + + # Count = 3 (page header and footer, card) + self.assertContains(response, "fr-enlarge-link", count=3) + + self.assertInHTML("""Sample card""", response.content.decode()) + + def test_card_with_cta_links(self): + body = [ + ( + "card", + { + "title": "Sample card", + "description": "This is a sample card.", + "url": "https://www.info.gouv.fr", + "call_to_action": [ + { + "type": "links", + "value": [ + { + "type": "link", + "value": { + "page": None, + "text": "Lien externe", + "external_url": "https://numerique.gouv.fr", + }, + } + ], + } + ], + }, + ) + ] + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + response = self.client.get(url) + + # Count = 3 (page header and footer, but not the card as it has several links) + self.assertContains(response, "fr-enlarge-link", count=2) + + self.assertInHTML("""Sample card""", response.content.decode()) + + self.assertInHTML( + """""", + response.content.decode(), + ) + + def test_card_with_cta_buttons(self): + body = [ + ( + "card", + { + "title": "Sample card", + "description": "This is a sample card.", + "url": "https://www.info.gouv.fr", + "call_to_action": [ + { + "type": "buttons", + "value": [ + { + "type": "button", + "value": { + "page": None, + "text": "Label", + "button_type": "fr-btn fr-btn--secondary", + "external_url": "https://numerique.gouv.fr", + }, + }, + ], + } + ], + }, + ) + ] + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + response = self.client.get(url) + + # Count = 3 (page header and footer, but not the card as it has several links) + self.assertContains(response, "fr-enlarge-link", count=2) + + self.assertInHTML("""Sample card""", response.content.decode()) + + self.assertInHTML( + """""", + response.content.decode(), + ) + + def test_card_with_basic_top_tag(self): + body = [ + ( + "card", + { + "title": "Sample card", + "description": "This is a sample card.", + "url": "https://www.info.gouv.fr", + "top_detail_badges_tags": [ + { + "type": "tags", + "value": [ + { + "type": "tag", + "value": { + "link": {"page": None, "external_url": ""}, + "color": "purple-glycine", + "label": "Tag 1", + "is_small": False, + "icon_class": "fr-icon-community-fill", + }, + }, + ], + } + ], + }, + ) + ] + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + response = self.client.get(url) + + # Count = 3 (page header and footer, card) + self.assertContains(response, "fr-enlarge-link", count=3) + + self.assertInHTML("""Sample card""", response.content.decode()) + + self.assertInHTML( + """
    +
  • +

    Tag 1

    +
  • +
""", + response.content.decode(), + ) + + def test_card_with_linked_top_tag(self): + body = [ + ( + "card", + { + "title": "Sample card", + "description": "This is a sample card.", + "url": "https://www.info.gouv.fr", + "top_detail_badges_tags": [ + { + "type": "tags", + "value": [ + { + "type": "tag", + "value": { + "link": {"page": None, "external_url": "https://numerique.gouv.fr"}, + "color": "purple-glycine", + "label": "Tag 1", + "is_small": False, + "icon_class": "fr-icon-community-fill", + }, + }, + ], + } + ], + }, + ) + ] + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + response = self.client.get(url) + + # Count = 3 (page header and footer, but not the card as it has several links) + self.assertContains(response, "fr-enlarge-link", count=2) + + self.assertInHTML("""Sample card""", response.content.decode()) + + self.assertInHTML( + """""", + response.content.decode(), + ) + + +class TileBlockCase(WagtailPageTestCase): + def setUp(self): + home = Page.objects.get(slug="home") + self.admin = User.objects.create_superuser("test", "test@test.test", "pass") + self.admin.save() + + body = [ + ( + "tile", + { + "title": "Sample tile", + "description": RichText('

This is a sample tile.

'), + }, + ) + ] + self.content_page = home.add_child( + instance=ContentPage(title="Sample tiles page", slug="content-page", owner=self.admin, body=body) + ) + self.content_page.save() + + def test_basic_tile_is_renderable(self): + self.assertPageIsRenderable(self.content_page) + + def test_basic_tile_has_no_header_div(self): + url = self.content_page.url + + response = self.client.get(url) + + self.assertNotContains(response, "fr-tile__header") + + def test_tile_with_image_has_div(self): + image_file = "static/artwork/technical-error.svg" + image = import_image(image_file, "Sample image") + + body = [ + ( + "tile", + { + "title": "Sample tile", + "description": RichText('

This is a sample tile.

'), + "image": image, + }, + ) + ] + + self.content_page.body = body + self.content_page.save() + + url = self.content_page.url + + response = self.client.get(url) + + self.assertContains(response, "fr-tile__header") diff --git a/content_manager/tests/test_utils.py b/content_manager/tests/test_utils.py new file mode 100644 index 000000000..ff6bbc456 --- /dev/null +++ b/content_manager/tests/test_utils.py @@ -0,0 +1,22 @@ +from wagtail.images.models import Image +from wagtail.test.utils import WagtailPageTestCase +from wagtailmenus.models.menus import FlatMenu + +from content_manager.utils import get_or_create_footer_menu, import_image + + +class UtilsTestCase(WagtailPageTestCase): + def test_import_image(self): + image_file = "static/artwork/technical-error.svg" + image = import_image(image_file, "Sample image") + + assert isinstance(image, Image) + assert image.title == "Sample image" + + def test_get_or_create_footer_menu(self): + assert FlatMenu.objects.count() == 0 + + flat_menu = get_or_create_footer_menu() + + assert FlatMenu.objects.count() == 1 + assert flat_menu.handle == "footer" diff --git a/content_manager/tests/test_views.py b/content_manager/tests/test_views.py new file mode 100644 index 000000000..f442546f4 --- /dev/null +++ b/content_manager/tests/test_views.py @@ -0,0 +1,295 @@ +from django.contrib.auth.models import User +from django.core.management import call_command +from wagtail.models import Page, Site +from wagtail.rich_text import RichText +from wagtail.test.utils import WagtailPageTestCase +from wagtailmenus.models.menuitems import FlatMenuItem, MainMenuItem +from wagtailmenus.models.menus import FlatMenu, MainMenu + +from content_manager.models import CmsDsfrConfig, ContentPage, MegaMenu, MegaMenuCategory + + +class ContentPageTestCase(WagtailPageTestCase): + def setUp(self): + home = Page.objects.get(slug="home") + self.admin = User.objects.create_superuser("test", "test@test.test", "pass") + self.admin.save() + self.content_page = home.add_child( + instance=ContentPage( + title="Page de contenu", + slug="content-page", + owner=self.admin, + ) + ) + self.content_page.save() + + def test_content_page_is_renderable(self): + self.assertPageIsRenderable(self.content_page) + + def test_content_page_has_minimal_content(self): + url = self.content_page.url + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + + self.assertContains( + response, + "Page de contenu — Titre du site", + ) + + +class ConfigTestCase(WagtailPageTestCase): + def setUp(self): + home = Page.objects.get(slug="home") + self.admin = User.objects.create_superuser("test", "test@test.test", "pass") + self.admin.save() + self.content_page = home.add_child( + instance=ContentPage( + title="Page de contenu", + slug="content-page", + owner=self.admin, + ) + ) + self.content_page.save() + + self.config, _created = CmsDsfrConfig.objects.update_or_create( + site_id=1, + defaults={ + "site_title": "Site title", + "site_tagline": "Site tagline", + "header_brand": "République française", + "header_brand_html": "République
française", + "footer_brand": "République française", + "footer_brand_html": "République
française", + "footer_description": "Site description.", + }, + ) + self.config.save() + + def test_header_brand_block_uses_conf(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertInHTML( + """ + + """, + response.content.decode(), + ) + + def test_footer_brand_block_uses_conf(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertInHTML( + """""", + response.content.decode(), + ) + + def test_header_title_block_uses_conf(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertInHTML( + """
+ +

Site title

+
+

Site tagline

+
""", + response.content.decode(), + ) + + def test_notice_is_not_set_by_default(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertNotContains( + response, + "fr-notice__body", + ) + + def test_notice_can_be_set(self): + self.config.notice = "Ceci est une information importante et temporaire." + self.config.save() + + url = self.content_page.url + response = self.client.get(url) + + self.assertInHTML( + """
+
+
+

+ Ceci est une information importante et temporaire. +

+
+
+
""", + response.content.decode(), + ) + + def test_beta_tag_is_not_set_by_default(self): + url = self.content_page.url + response = self.client.get(url) + + self.assertNotContains( + response, + 'BETA', + ) + + def test_beta_tag_can_be_set(self): + self.config.beta_tag = True + self.config.save() + + url = self.content_page.url + response = self.client.get(url) + + self.assertContains( + response, + 'BETA', + ) + + def test_footer_description_uses_conf(self): + url = self.content_page.url + response = self.client.get(url) + + self.config.refresh_from_db() + + self.assertContains( + response, + self.config.footer_description, + ) + + +class MenusTestCase(WagtailPageTestCase): + @classmethod + def setUpTestData(cls) -> None: + call_command("create_starter_pages") + + def setUp(self) -> None: + self.site = Site.objects.filter(is_default_site=True).first() + self.home_page = self.site.root_page + + self.main_menu = MainMenu.objects.first() + + body = [] + + text_raw = """

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

""" + body.append(("paragraph", RichText(text_raw))) + + self.publications_page = self.home_page.add_child( + instance=ContentPage(title="Publications", body=body, show_in_menus=True) + ) + + self.example_publication_page = self.publications_page.add_child( + instance=ContentPage(title="Publication 1", body=body, show_in_menus=True) + ) + self.publications_menu_item = MainMenuItem.objects.create( + link_page=self.publications_page, menu=self.main_menu, sort_order=2 + ) + + def test_basic_menu_is_rendered(self): + self.assertPageIsRenderable(self.home_page) + response = self.client.get(self.home_page.url) + + # Selected menu item : home page + self.assertInHTML( + 'Accueil', + response.content.decode(), + ) + + self.assertInHTML( + f"""""", + response.content.decode(), + ) + + self.assertInHTML( + 'Publication 1', + response.content.decode(), + ) + + # Selected menu item : publication 1 + response = self.client.get(self.example_publication_page.url) + self.assertInHTML( + 'Accueil', + response.content.decode(), + ) + + self.assertInHTML( + f"""""", + response.content.decode(), + ) + + self.assertInHTML( + """ + Publication 1 + """, + response.content.decode(), + ) + + def test_mega_menu_is_rendered(self): + publications_mega_menu = MegaMenu.objects.create( + name="Méga-menu publications", + parent_menu_item=self.publications_menu_item, + description="Ceci est une description", + ) + + menu_category_menu = FlatMenu.objects.create( + site_id=self.site.id, + title="Menu publications > Catégorie 1", + handle="mega_menu_section_1", + heading="Colonne 1", + ) + + MegaMenuCategory.objects.create(mega_menu=publications_mega_menu, sort_order=0, category=menu_category_menu) + + FlatMenuItem.objects.get_or_create( + link_page=self.example_publication_page, menu=menu_category_menu, sort_order=0 + ) + + self.assertPageIsRenderable(self.example_publication_page) + response = self.client.get(self.example_publication_page.url) + + self.assertInHTML( + '

Ceci est une description

', + response.content.decode(), + ) + + self.assertInHTML( + f""" + """, + response.content.decode(), + ) + + self.assertInHTML( + """ + Publication 1 + """, + response.content.decode(), + ) diff --git a/content_manager/urls.py b/content_manager/urls.py new file mode 100644 index 000000000..8575c9af8 --- /dev/null +++ b/content_manager/urls.py @@ -0,0 +1,13 @@ +from django.urls import include, path +from django.utils.translation import gettext_lazy as _ +from wagtail import urls as wagtail_urls + +from content_manager.views import SearchResultsView, TagsListView, TagView + + +urlpatterns = [ + path(_("search/"), SearchResultsView.as_view(), name="cms_search"), + path("tags//", TagView.as_view(), name="global_tag"), + path("tags/", TagsListView.as_view(), name="global_tags_list"), + path("", include(wagtail_urls)), +] diff --git a/content_manager/utils.py b/content_manager/utils.py new file mode 100644 index 000000000..f94e23b10 --- /dev/null +++ b/content_manager/utils.py @@ -0,0 +1,122 @@ +import re +from html import unescape +from io import BytesIO + +from bs4 import BeautifulSoup +from django.core.files.images import ImageFile +from wagtail.images.models import Image +from wagtail.models import Collection, Site +from wagtailmenus.models.menuitems import MainMenuItem +from wagtailmenus.models.menus import FlatMenu, MainMenu + + +def import_image(full_path: str, title: str) -> Image: + """ + Import an image to the Wagtail medias based on its full path and return it. + """ + with open(full_path, "rb") as image_file: + image = Image( + file=ImageFile(BytesIO(image_file.read()), name=title), + title=title, + ) + image.save() + return image + + +def get_or_create_collection(col_name: str) -> Collection: + qs = Collection.objects.filter(name=col_name) + if qs.count(): + return qs.first() + else: + root_coll = Collection.get_first_root_node() + result = root_coll.add_child(name=col_name) + return result + + +def get_or_create_footer_menu() -> FlatMenu: + """ + Get the footer menu or create it if it doesn't already exist + + In any case, return it. + """ + + default_site = Site.objects.filter(is_default_site=True).first() + footer_menu = FlatMenu.objects.filter(handle="footer", site=default_site).first() + + if not footer_menu: + footer_menu = FlatMenu.objects.create(title="Pied de page", handle="footer", site=default_site) + + return footer_menu + + +def get_or_create_main_menu() -> MainMenu: + """ + Get the main menu or create it if it doesn't already exist + + In any case, return it. + """ + + default_site = Site.objects.filter(is_default_site=True).first() + main_menu = MainMenu.objects.filter(site=default_site).first() + + if not main_menu: + main_menu = MainMenu.objects.create(site=default_site, max_levels=2) + + # Init the main menu with the home page + home_page = default_site.root_page + + menu_item = { + "sort_order": 0, + "link_page": home_page, + "link_text": "Accueil", + "menu": main_menu, + } + MainMenuItem.objects.create(**menu_item) + + return main_menu + + +def get_streamblock_raw_text(block) -> str: + """ + Get the raw text of a streamblock. + """ + + # Remove entirely some block types + removable_blocks = ["image", "alert", "video", "stepper", "separator", "html", "iframe"] + + raw_text = "" + if block.block.name == "imageandtext": + raw_text += block.value["text"].source + elif block.block.name == "multicolumns": + for column in block.value["columns"]: + raw_text += get_streamblock_raw_text(column) + elif block.block.name not in removable_blocks: + raw_text += block.render() + + return raw_text + + +def get_streamfield_raw_text(streamfield, max_words: int | None = None) -> str: + """ + Get the raw text of a streamfield. Used to pre-fill the search description field + """ + + raw_html = "" + raw_text = "" + for block in streamfield: + raw_html += get_streamblock_raw_text(block) + + if not raw_html: + return "" + + soup = BeautifulSoup(raw_html, "html.parser") + raw_text += soup.get_text(" ") + + raw_text = unescape(raw_text) + raw_text = re.sub(r" +", " ", raw_text).strip() + + if max_words: + words = raw_text.split() + raw_text = " ".join(words[:max_words]) + " […]" + + return raw_text diff --git a/content_manager/views.py b/content_manager/views.py new file mode 100644 index 000000000..c2cff10a8 --- /dev/null +++ b/content_manager/views.py @@ -0,0 +1,84 @@ +from django.shortcuts import get_object_or_404 +from django.urls import reverse +from django.utils.translation import gettext_lazy as _ +from django.views.generic import ListView, TemplateView +from unidecode import unidecode + +from content_manager.models import ContentPage, Tag + + +class SearchResultsView(ListView): + model = ContentPage + template_name = "content_manager/search_results.html" + + def get_queryset(self): + query = self.request.GET.get("q", None) + if query: + object_list = ContentPage.objects.live().search(query) + + else: + object_list = ContentPage.objects.none() + return object_list + + def get_context_data(self, **kwargs): + context = super(SearchResultsView, self).get_context_data(**kwargs) + context["query"] = self.request.GET.get("q") + return context + + +class TagsListView(TemplateView): + template_name = "content_manager/tags_list_page.html" + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + tags = Tag.objects.tags_with_usecount(1) + + tags_by_first_letter = {} + for tag in tags: + first_letter = unidecode(tag.slug[0].upper()) + if first_letter not in tags_by_first_letter: + tags_by_first_letter[first_letter] = [] + tags_by_first_letter[first_letter].append(tag) + + context["sorted_tags"] = tags_by_first_letter + + title = _("Tags") + context["title"] = title + context["breadcrumb"] = { + "links": [], + "current": title, + } + context["search_description"] = _("List of all the tags.") + + return context + + +class TagView(ListView): + template_name = "content_manager/tag_page.html" + model = ContentPage + paginate_by = 10 + + def get_queryset(self, **kwargs): + tag_slug = self.kwargs.get("tag") + return ContentPage.objects.filter(tags__slug=tag_slug) + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + tag_slug = self.kwargs.get("tag") + + tag = get_object_or_404(Tag, slug=tag_slug) + context["tag"] = tag + + title = _("Pages tagged with {tag}").format(tag=tag.name) + context["title"] = title + context["breadcrumb"] = { + "links": [ + {"url": reverse("global_tags_list"), "title": _("Tags")}, + ], + "current": title, + } + + context["search_description"] = _("List of pages tagged with {tag}").format(tag=tag.name) + + return context diff --git a/content_manager/widgets.py b/content_manager/widgets.py new file mode 100644 index 000000000..fd5baf31b --- /dev/null +++ b/content_manager/widgets.py @@ -0,0 +1,18 @@ +from django.forms import Media, widgets + + +class DsfrIconPickerWidget(widgets.TextInput): + template_name = "content_manager/widgets/dsfr-icon-picker-widget.html" + + def __init__(self, attrs=None): + default_attrs = {} + attrs = attrs or {} + attrs = {**default_attrs, **attrs} + super().__init__(attrs=attrs) + + @property + def media(self): + return Media( + css={"all": ["css/icon-picker.css", "dsfr/dist/utility/utility.min.css"]}, + js=["django-dsfr/icon-picker/assets/js/universal-icon-picker.min.js"], + ) diff --git a/poetry.lock b/poetry.lock index 4f6783641..243fc10fc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohttp" @@ -112,13 +112,13 @@ frozenlist = ">=1.1.0" [[package]] name = "annotated-types" -version = "0.6.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [[package]] @@ -199,19 +199,22 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "beautifulsoup4" -version = "4.11.2" +version = "4.12.3" description = "Screen-scraping library" optional = false python-versions = ">=3.6.0" files = [ - {file = "beautifulsoup4-4.11.2-py3-none-any.whl", hash = "sha256:0e79446b10b3ecb499c1556f7e228a53e64a2bfcebd455f370d8927cb5b59e39"}, - {file = "beautifulsoup4-4.11.2.tar.gz", hash = "sha256:bc4bdda6717de5a2987436fb8d72f45dc90dd856bdfd512a1314ce90349a0106"}, + {file = "beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed"}, + {file = "beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051"}, ] [package.dependencies] soupsieve = ">1.2" [package.extras] +cchardet = ["cchardet"] +chardet = ["chardet"] +charset-normalizer = ["charset-normalizer"] html5lib = ["html5lib"] lxml = ["lxml"] @@ -261,6 +264,22 @@ d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] +[[package]] +name = "bleach" +version = "4.1.0" +description = "An easy safelist-based HTML-sanitizing tool." +optional = false +python-versions = ">=3.6" +files = [ + {file = "bleach-4.1.0-py2.py3-none-any.whl", hash = "sha256:4d2651ab93271d1129ac9cbc679f524565cc8a1b791909c4a51eac4446a15994"}, + {file = "bleach-4.1.0.tar.gz", hash = "sha256:0900d8b37eba61a802ee40ac0061f8c2b5dee29c1927dd1d233e075ebf5a71da"}, +] + +[package.dependencies] +packaging = "*" +six = ">=1.9.0" +webencodings = "*" + [[package]] name = "boto" version = "2.49.0" @@ -274,17 +293,17 @@ files = [ [[package]] name = "boto3" -version = "1.34.104" +version = "1.34.144" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.34.104-py3-none-any.whl", hash = "sha256:bec91a3bca63320e5f68a25b5eaa7bab65e35bb9253a544875c2e03679f1d5fb"}, - {file = "boto3-1.34.104.tar.gz", hash = "sha256:5b37c8f4ea6f408147994a6e230c49ca755da57f5964ccea8b8fd4ff5f11759e"}, + {file = "boto3-1.34.144-py3-none-any.whl", hash = "sha256:b8433d481d50b68a0162c0379c0dd4aabfc3d1ad901800beb5b87815997511c1"}, + {file = "boto3-1.34.144.tar.gz", hash = "sha256:2f3e88b10b8fcc5f6100a9d74cd28230edc9d4fa226d99dd40a3ab38ac213673"}, ] [package.dependencies] -botocore = ">=1.34.104,<1.35.0" +botocore = ">=1.34.144,<1.35.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -293,13 +312,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.34.104" +version = "1.34.144" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.34.104-py3-none-any.whl", hash = "sha256:b68ed482e9b4c313129c9948af5a91d0e84840558e6d232a1a27ab0b9733e5b9"}, - {file = "botocore-1.34.104.tar.gz", hash = "sha256:fe36dd3cea4160fbbe27dc1cf89cb7018234350555a26933b2977947052a346a"}, + {file = "botocore-1.34.144-py3-none-any.whl", hash = "sha256:a2cf26e1bf10d5917a2285e50257bc44e94a1d16574f282f3274f7a5d8d1f08b"}, + {file = "botocore-1.34.144.tar.gz", hash = "sha256:4215db28d25309d59c99507f1f77df9089e5bebbad35f6e19c7c44ec5383a3e8"}, ] [package.dependencies] @@ -308,17 +327,17 @@ python-dateutil = ">=2.1,<3.0.0" urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""} [package.extras] -crt = ["awscrt (==0.20.9)"] +crt = ["awscrt (==0.20.11)"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.7.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, + {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] [[package]] @@ -522,63 +541,63 @@ files = [ [[package]] name = "coverage" -version = "7.5.1" +version = "7.6.0" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c0884920835a033b78d1c73b6d3bbcda8161a900f38a488829a83982925f6c2e"}, - {file = "coverage-7.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:39afcd3d4339329c5f58de48a52f6e4e50f6578dd6099961cf22228feb25f38f"}, - {file = "coverage-7.5.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a7b0ceee8147444347da6a66be737c9d78f3353b0681715b668b72e79203e4a"}, - {file = "coverage-7.5.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a9ca3f2fae0088c3c71d743d85404cec8df9be818a005ea065495bedc33da35"}, - {file = "coverage-7.5.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd215c0c7d7aab005221608a3c2b46f58c0285a819565887ee0b718c052aa4e"}, - {file = "coverage-7.5.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4bf0655ab60d754491004a5efd7f9cccefcc1081a74c9ef2da4735d6ee4a6223"}, - {file = "coverage-7.5.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:61c4bf1ba021817de12b813338c9be9f0ad5b1e781b9b340a6d29fc13e7c1b5e"}, - {file = "coverage-7.5.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:db66fc317a046556a96b453a58eced5024af4582a8dbdc0c23ca4dbc0d5b3146"}, - {file = "coverage-7.5.1-cp310-cp310-win32.whl", hash = "sha256:b016ea6b959d3b9556cb401c55a37547135a587db0115635a443b2ce8f1c7228"}, - {file = "coverage-7.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:df4e745a81c110e7446b1cc8131bf986157770fa405fe90e15e850aaf7619bc8"}, - {file = "coverage-7.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:796a79f63eca8814ca3317a1ea443645c9ff0d18b188de470ed7ccd45ae79428"}, - {file = "coverage-7.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4fc84a37bfd98db31beae3c2748811a3fa72bf2007ff7902f68746d9757f3746"}, - {file = "coverage-7.5.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6175d1a0559986c6ee3f7fccfc4a90ecd12ba0a383dcc2da30c2b9918d67d8a3"}, - {file = "coverage-7.5.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fc81d5878cd6274ce971e0a3a18a8803c3fe25457165314271cf78e3aae3aa2"}, - {file = "coverage-7.5.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:556cf1a7cbc8028cb60e1ff0be806be2eded2daf8129b8811c63e2b9a6c43bca"}, - {file = "coverage-7.5.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9981706d300c18d8b220995ad22627647be11a4276721c10911e0e9fa44c83e8"}, - {file = "coverage-7.5.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d7fed867ee50edf1a0b4a11e8e5d0895150e572af1cd6d315d557758bfa9c057"}, - {file = "coverage-7.5.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef48e2707fb320c8f139424a596f5b69955a85b178f15af261bab871873bb987"}, - {file = "coverage-7.5.1-cp311-cp311-win32.whl", hash = "sha256:9314d5678dcc665330df5b69c1e726a0e49b27df0461c08ca12674bcc19ef136"}, - {file = "coverage-7.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:5fa567e99765fe98f4e7d7394ce623e794d7cabb170f2ca2ac5a4174437e90dd"}, - {file = "coverage-7.5.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b6cf3764c030e5338e7f61f95bd21147963cf6aa16e09d2f74f1fa52013c1206"}, - {file = "coverage-7.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2ec92012fefebee89a6b9c79bc39051a6cb3891d562b9270ab10ecfdadbc0c34"}, - {file = "coverage-7.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16db7f26000a07efcf6aea00316f6ac57e7d9a96501e990a36f40c965ec7a95d"}, - {file = "coverage-7.5.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:beccf7b8a10b09c4ae543582c1319c6df47d78fd732f854ac68d518ee1fb97fa"}, - {file = "coverage-7.5.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8748731ad392d736cc9ccac03c9845b13bb07d020a33423fa5b3a36521ac6e4e"}, - {file = "coverage-7.5.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7352b9161b33fd0b643ccd1f21f3a3908daaddf414f1c6cb9d3a2fd618bf2572"}, - {file = "coverage-7.5.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:7a588d39e0925f6a2bff87154752481273cdb1736270642aeb3635cb9b4cad07"}, - {file = "coverage-7.5.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:68f962d9b72ce69ea8621f57551b2fa9c70509af757ee3b8105d4f51b92b41a7"}, - {file = "coverage-7.5.1-cp312-cp312-win32.whl", hash = "sha256:f152cbf5b88aaeb836127d920dd0f5e7edff5a66f10c079157306c4343d86c19"}, - {file = "coverage-7.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:5a5740d1fb60ddf268a3811bcd353de34eb56dc24e8f52a7f05ee513b2d4f596"}, - {file = "coverage-7.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e2213def81a50519d7cc56ed643c9e93e0247f5bbe0d1247d15fa520814a7cd7"}, - {file = "coverage-7.5.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5037f8fcc2a95b1f0e80585bd9d1ec31068a9bcb157d9750a172836e98bc7a90"}, - {file = "coverage-7.5.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c3721c2c9e4c4953a41a26c14f4cef64330392a6d2d675c8b1db3b645e31f0e"}, - {file = "coverage-7.5.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca498687ca46a62ae590253fba634a1fe9836bc56f626852fb2720f334c9e4e5"}, - {file = "coverage-7.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0cdcbc320b14c3e5877ee79e649677cb7d89ef588852e9583e6b24c2e5072661"}, - {file = "coverage-7.5.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:57e0204b5b745594e5bc14b9b50006da722827f0b8c776949f1135677e88d0b8"}, - {file = "coverage-7.5.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8fe7502616b67b234482c3ce276ff26f39ffe88adca2acf0261df4b8454668b4"}, - {file = "coverage-7.5.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:9e78295f4144f9dacfed4f92935fbe1780021247c2fabf73a819b17f0ccfff8d"}, - {file = "coverage-7.5.1-cp38-cp38-win32.whl", hash = "sha256:1434e088b41594baa71188a17533083eabf5609e8e72f16ce8c186001e6b8c41"}, - {file = "coverage-7.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:0646599e9b139988b63704d704af8e8df7fa4cbc4a1f33df69d97f36cb0a38de"}, - {file = "coverage-7.5.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4cc37def103a2725bc672f84bd939a6fe4522310503207aae4d56351644682f1"}, - {file = "coverage-7.5.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc0b4d8bfeabd25ea75e94632f5b6e047eef8adaed0c2161ada1e922e7f7cece"}, - {file = "coverage-7.5.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d0a0f5e06881ecedfe6f3dd2f56dcb057b6dbeb3327fd32d4b12854df36bf26"}, - {file = "coverage-7.5.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9735317685ba6ec7e3754798c8871c2f49aa5e687cc794a0b1d284b2389d1bd5"}, - {file = "coverage-7.5.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d21918e9ef11edf36764b93101e2ae8cc82aa5efdc7c5a4e9c6c35a48496d601"}, - {file = "coverage-7.5.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c3e757949f268364b96ca894b4c342b41dc6f8f8b66c37878aacef5930db61be"}, - {file = "coverage-7.5.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:79afb6197e2f7f60c4824dd4b2d4c2ec5801ceb6ba9ce5d2c3080e5660d51a4f"}, - {file = "coverage-7.5.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d1d0d98d95dd18fe29dc66808e1accf59f037d5716f86a501fc0256455219668"}, - {file = "coverage-7.5.1-cp39-cp39-win32.whl", hash = "sha256:1cc0fe9b0b3a8364093c53b0b4c0c2dd4bb23acbec4c9240b5f284095ccf7981"}, - {file = "coverage-7.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:dde0070c40ea8bb3641e811c1cfbf18e265d024deff6de52c5950677a8fb1e0f"}, - {file = "coverage-7.5.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:6537e7c10cc47c595828b8a8be04c72144725c383c4702703ff4e42e44577312"}, - {file = "coverage-7.5.1.tar.gz", hash = "sha256:54de9ef3a9da981f7af93eafde4ede199e0846cd819eb27c88e2b712aae9708c"}, + {file = "coverage-7.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dff044f661f59dace805eedb4a7404c573b6ff0cdba4a524141bc63d7be5c7fd"}, + {file = "coverage-7.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a8659fd33ee9e6ca03950cfdcdf271d645cf681609153f218826dd9805ab585c"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7792f0ab20df8071d669d929c75c97fecfa6bcab82c10ee4adb91c7a54055463"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4b3cd1ca7cd73d229487fa5caca9e4bc1f0bca96526b922d61053ea751fe791"}, + {file = "coverage-7.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7e128f85c0b419907d1f38e616c4f1e9f1d1b37a7949f44df9a73d5da5cd53c"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a94925102c89247530ae1dab7dc02c690942566f22e189cbd53579b0693c0783"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dcd070b5b585b50e6617e8972f3fbbee786afca71b1936ac06257f7e178f00f6"}, + {file = "coverage-7.6.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d50a252b23b9b4dfeefc1f663c568a221092cbaded20a05a11665d0dbec9b8fb"}, + {file = "coverage-7.6.0-cp310-cp310-win32.whl", hash = "sha256:0e7b27d04131c46e6894f23a4ae186a6a2207209a05df5b6ad4caee6d54a222c"}, + {file = "coverage-7.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:54dece71673b3187c86226c3ca793c5f891f9fc3d8aa183f2e3653da18566169"}, + {file = "coverage-7.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7b525ab52ce18c57ae232ba6f7010297a87ced82a2383b1afd238849c1ff933"}, + {file = "coverage-7.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bea27c4269234e06f621f3fac3925f56ff34bc14521484b8f66a580aacc2e7d"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed8d1d1821ba5fc88d4a4f45387b65de52382fa3ef1f0115a4f7a20cdfab0e94"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01c322ef2bbe15057bc4bf132b525b7e3f7206f071799eb8aa6ad1940bcf5fb1"}, + {file = "coverage-7.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03cafe82c1b32b770a29fd6de923625ccac3185a54a5e66606da26d105f37dac"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0d1b923fc4a40c5832be4f35a5dab0e5ff89cddf83bb4174499e02ea089daf57"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4b03741e70fb811d1a9a1d75355cf391f274ed85847f4b78e35459899f57af4d"}, + {file = "coverage-7.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a73d18625f6a8a1cbb11eadc1d03929f9510f4131879288e3f7922097a429f63"}, + {file = "coverage-7.6.0-cp311-cp311-win32.whl", hash = "sha256:65fa405b837060db569a61ec368b74688f429b32fa47a8929a7a2f9b47183713"}, + {file = "coverage-7.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:6379688fb4cfa921ae349c76eb1a9ab26b65f32b03d46bb0eed841fd4cb6afb1"}, + {file = "coverage-7.6.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f7db0b6ae1f96ae41afe626095149ecd1b212b424626175a6633c2999eaad45b"}, + {file = "coverage-7.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bbdf9a72403110a3bdae77948b8011f644571311c2fb35ee15f0f10a8fc082e8"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc44bf0315268e253bf563f3560e6c004efe38f76db03a1558274a6e04bf5d5"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da8549d17489cd52f85a9829d0e1d91059359b3c54a26f28bec2c5d369524807"}, + {file = "coverage-7.6.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0086cd4fc71b7d485ac93ca4239c8f75732c2ae3ba83f6be1c9be59d9e2c6382"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1fad32ee9b27350687035cb5fdf9145bc9cf0a094a9577d43e909948ebcfa27b"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:044a0985a4f25b335882b0966625270a8d9db3d3409ddc49a4eb00b0ef5e8cee"}, + {file = "coverage-7.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:76d5f82213aa78098b9b964ea89de4617e70e0d43e97900c2778a50856dac605"}, + {file = "coverage-7.6.0-cp312-cp312-win32.whl", hash = "sha256:3c59105f8d58ce500f348c5b56163a4113a440dad6daa2294b5052a10db866da"}, + {file = "coverage-7.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:ca5d79cfdae420a1d52bf177de4bc2289c321d6c961ae321503b2ca59c17ae67"}, + {file = "coverage-7.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d39bd10f0ae453554798b125d2f39884290c480f56e8a02ba7a6ed552005243b"}, + {file = "coverage-7.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:beb08e8508e53a568811016e59f3234d29c2583f6b6e28572f0954a6b4f7e03d"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2e16f4cd2bc4d88ba30ca2d3bbf2f21f00f382cf4e1ce3b1ddc96c634bc48ca"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6616d1c9bf1e3faea78711ee42a8b972367d82ceae233ec0ac61cc7fec09fa6b"}, + {file = "coverage-7.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad4567d6c334c46046d1c4c20024de2a1c3abc626817ae21ae3da600f5779b44"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d17c6a415d68cfe1091d3296ba5749d3d8696e42c37fca5d4860c5bf7b729f03"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9146579352d7b5f6412735d0f203bbd8d00113a680b66565e205bc605ef81bc6"}, + {file = "coverage-7.6.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:cdab02a0a941af190df8782aafc591ef3ad08824f97850b015c8c6a8b3877b0b"}, + {file = "coverage-7.6.0-cp38-cp38-win32.whl", hash = "sha256:df423f351b162a702c053d5dddc0fc0ef9a9e27ea3f449781ace5f906b664428"}, + {file = "coverage-7.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:f2501d60d7497fd55e391f423f965bbe9e650e9ffc3c627d5f0ac516026000b8"}, + {file = "coverage-7.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7221f9ac9dad9492cecab6f676b3eaf9185141539d5c9689d13fd6b0d7de840c"}, + {file = "coverage-7.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ddaaa91bfc4477d2871442bbf30a125e8fe6b05da8a0015507bfbf4718228ab2"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4cbe651f3904e28f3a55d6f371203049034b4ddbce65a54527a3f189ca3b390"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:831b476d79408ab6ccfadaaf199906c833f02fdb32c9ab907b1d4aa0713cfa3b"}, + {file = "coverage-7.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46c3d091059ad0b9c59d1034de74a7f36dcfa7f6d3bde782c49deb42438f2450"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4d5fae0a22dc86259dee66f2cc6c1d3e490c4a1214d7daa2a93d07491c5c04b6"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:07ed352205574aad067482e53dd606926afebcb5590653121063fbf4e2175166"}, + {file = "coverage-7.6.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:49c76cdfa13015c4560702574bad67f0e15ca5a2872c6a125f6327ead2b731dd"}, + {file = "coverage-7.6.0-cp39-cp39-win32.whl", hash = "sha256:482855914928c8175735a2a59c8dc5806cf7d8f032e4820d52e845d1f731dca2"}, + {file = "coverage-7.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:543ef9179bc55edfd895154a51792b01c017c87af0ebaae092720152e19e42ca"}, + {file = "coverage-7.6.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:6fe885135c8a479d3e37a7aae61cbd3a0fb2deccb4dda3c25f92a49189f766d6"}, + {file = "coverage-7.6.0.tar.gz", hash = "sha256:289cc803fa1dc901f84701ac10c9ee873619320f2f9aff38794db4a4a0268d51"}, ] [package.extras] @@ -597,13 +616,13 @@ files = [ [[package]] name = "dataclasses-json" -version = "0.6.6" +version = "0.6.7" description = "Easily serialize dataclasses to and from JSON." optional = false python-versions = "<4.0,>=3.7" files = [ - {file = "dataclasses_json-0.6.6-py3-none-any.whl", hash = "sha256:e54c5c87497741ad454070ba0ed411523d46beb5da102e221efb873801b0ba85"}, - {file = "dataclasses_json-0.6.6.tar.gz", hash = "sha256:0c09827d26fffda27f1be2fed7a7a01a29c5ddcd2eb6393ad5ebf9d77e9deae8"}, + {file = "dataclasses_json-0.6.7-py3-none-any.whl", hash = "sha256:0dbf33f26c8d5305befd61b39d2b3414e8a407bedc2834dea9b8d642666fb40a"}, + {file = "dataclasses_json-0.6.7.tar.gz", hash = "sha256:b6b3e528266ea45b9535223bc53ca645f5208833c29229e847b3f26a1cc55fc0"}, ] [package.dependencies] @@ -749,21 +768,38 @@ files = [ Django = ">=3.2" django-js-asset = ">=2.0" +[[package]] +name = "django-cogwheels" +version = "0.3" +description = "A consistent, user-friendly solution for adding app-specific settings your Django package, reusable app or framework." +optional = false +python-versions = ">=3.4" +files = [ + {file = "django-cogwheels-0.3.tar.gz", hash = "sha256:848a4d9f2c96c582a4a4f2e7c276dfd95ab3905748cae13bb7c4b365a6717e94"}, + {file = "django_cogwheels-0.3-py3-none-any.whl", hash = "sha256:197bd05e7114403d7301214b3f8a371c4fb6039cf21c811f099438b167b5ed21"}, +] + +[package.extras] +development = ["Django (>=2.0,<2.1)", "django-extensions", "ipdb", "werkzeug"] +docs = ["Sphinx (>=1.7.4)", "pyenchant (>=2.0)", "sphinx-rtd-theme (>=0.3)", "sphinxcontrib-spelling (>=1.4)"] +testing = ["coverage"] + [[package]] name = "django-compressor" -version = "4.4" +version = "4.5" description = "('Compresses linked and inline JavaScript or CSS into single cached files.',)" optional = false -python-versions = "*" +python-versions = ">=3.8" files = [ - {file = "django_compressor-4.4-py2.py3-none-any.whl", hash = "sha256:6e2b0c0becb9607f5099c2546a824c5b84a6918a34bc37a8a622ffa250313596"}, - {file = "django_compressor-4.4.tar.gz", hash = "sha256:1b0acc9cfba9f69bc38e7c41da9b0d70a20bc95587b643ffef9609cf46064f67"}, + {file = "django_compressor-4.5-py2.py3-none-any.whl", hash = "sha256:2c14e1a80a234432153e64035ae1adaf638c1ba8d7fc9e60a7be2fad5697fdbe"}, + {file = "django_compressor-4.5.tar.gz", hash = "sha256:9d98c905b741be6cb09ad828c1d22a9ff9244dd08823e2926af8ddd1871c3c65"}, ] [package.dependencies] +Django = ">=4.2" django-appconf = ">=1.0.3" -rcssmin = "1.1.1" -rjsmin = "1.2.1" +rcssmin = "1.1.2" +rjsmin = "1.2.2" [[package]] name = "django-cors-headers" @@ -872,17 +908,17 @@ resolved_reference = "068dd492fdf53f245a6c5666fa136f6df214b1a5" [[package]] name = "django-filter" -version = "21.1" +version = "23.5" description = "Django-filter is a reusable Django application for allowing users to filter querysets dynamically." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "django-filter-21.1.tar.gz", hash = "sha256:632a251fa8f1aadb4b8cceff932bb52fe2f826dd7dfe7f3eac40e5c463d6836e"}, - {file = "django_filter-21.1-py3-none-any.whl", hash = "sha256:f4a6737a30104c98d2e2a5fb93043f36dd7978e0c7ddc92f5998e85433ea5063"}, + {file = "django-filter-23.5.tar.gz", hash = "sha256:67583aa43b91fe8c49f74a832d95f4d8442be628fd4c6d65e9f811f5153a4e5c"}, + {file = "django_filter-23.5-py3-none-any.whl", hash = "sha256:99122a201d83860aef4fe77758b69dda913e874cc5e0eaa50a86b0b18d708400"}, ] [package.dependencies] -Django = ">=2.2" +Django = ">=3.2" [[package]] name = "django-formtools" @@ -900,18 +936,18 @@ Django = ">=3.2" [[package]] name = "django-htmx" -version = "1.17.3" +version = "1.18.0" description = "Extensions for using Django with htmx." optional = false python-versions = ">=3.8" files = [ - {file = "django-htmx-1.17.3.tar.gz", hash = "sha256:a2069219920d7ef0883ddbf5e8d931069db145a0d4a8a032a2708f840c7a68a6"}, - {file = "django_htmx-1.17.3-py3-none-any.whl", hash = "sha256:0de964ca257eda2a4ebeeaa8181320119378fa5f95a2fc2f2bfbdd35034ed424"}, + {file = "django_htmx-1.18.0-py3-none-any.whl", hash = "sha256:48f3b8a784467bfcc30562067b87ecbc4ad9b739cc269eec5f3789c16d2cb2ce"}, + {file = "django_htmx-1.18.0.tar.gz", hash = "sha256:db8a0cc15bcd0f7ae929bcb9108d9e6be228843092aca7956d977c31c4d95aae"}, ] [package.dependencies] asgiref = ">=3.6" -Django = ">=3.2" +django = ">=3.2" [[package]] name = "django-js-asset" @@ -1052,13 +1088,13 @@ django = ">=4.2" [[package]] name = "django-storages" -version = "1.14.3" +version = "1.14.4" description = "Support for many storage backends in Django" optional = false python-versions = ">=3.7" files = [ - {file = "django-storages-1.14.3.tar.gz", hash = "sha256:95a12836cd998d4c7a4512347322331c662d9114c4344f932f5e9c0fce000608"}, - {file = "django_storages-1.14.3-py3-none-any.whl", hash = "sha256:31f263389e95ce3a1b902fb5f739a7ed32895f7d8b80179fe7453ecc0dfe102e"}, + {file = "django-storages-1.14.4.tar.gz", hash = "sha256:69aca94d26e6714d14ad63f33d13619e697508ee33ede184e462ed766dc2a73f"}, + {file = "django_storages-1.14.4-py3-none-any.whl", hash = "sha256:d61930acb4a25e3aebebc6addaf946a3b1df31c803a6bf1af2f31c9047febaa3"}, ] [package.dependencies] @@ -1075,17 +1111,17 @@ sftp = ["paramiko (>=1.15)"] [[package]] name = "django-taggit" -version = "4.0.0" +version = "5.0.1" description = "django-taggit is a reusable Django application for simple tagging." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "django-taggit-4.0.0.tar.gz", hash = "sha256:4d52de9d37245a9b9f98c0ec71fdccf1d2283e38e8866d40a7ae6a3b6787a161"}, - {file = "django_taggit-4.0.0-py3-none-any.whl", hash = "sha256:eb800dabef5f0a4e047ab0751f82cf805bc4a9e972037ef12bf519f52cd92480"}, + {file = "django-taggit-5.0.1.tar.gz", hash = "sha256:edcd7db1e0f35c304e082a2f631ddac2e16ef5296029524eb792af7430cab4cc"}, + {file = "django_taggit-5.0.1-py3-none-any.whl", hash = "sha256:a0ca8a28b03c4b26c2630fd762cb76ec39b5e41abf727a7b66f897a625c5e647"}, ] [package.dependencies] -Django = ">=3.2" +Django = ">=4.1" [[package]] name = "django-treebeard" @@ -1114,33 +1150,32 @@ files = [ [[package]] name = "djangorestframework" -version = "3.15.1" +version = "3.15.2" description = "Web APIs for Django, made easy." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "djangorestframework-3.15.1-py3-none-any.whl", hash = "sha256:3ccc0475bce968608cf30d07fb17d8e52d1d7fc8bfe779c905463200750cbca6"}, - {file = "djangorestframework-3.15.1.tar.gz", hash = "sha256:f88fad74183dfc7144b2756d0d2ac716ea5b4c7c9840995ac3bfd8ec034333c1"}, + {file = "djangorestframework-3.15.2-py3-none-any.whl", hash = "sha256:2b8871b062ba1aefc2de01f773875441a961fefbf79f5eed1e32b2f096944b20"}, + {file = "djangorestframework-3.15.2.tar.gz", hash = "sha256:36fe88cd2d6c6bec23dca9804bab2ba5517a8bb9d8f47ebc68981b56840107ad"}, ] [package.dependencies] -django = ">=3.0" +django = ">=4.2" [[package]] name = "draftjs-exporter" -version = "2.1.7" +version = "5.0.0" description = "Library to convert rich text from Draft.js raw ContentState to HTML" optional = false python-versions = "*" files = [ - {file = "draftjs_exporter-2.1.7-py3-none-any.whl", hash = "sha256:d415a9964690a2cddb66a31ef32dd46c277e9b80434b94e39e3043188ed83e33"}, - {file = "draftjs_exporter-2.1.7.tar.gz", hash = "sha256:5839cbc29d7bce2fb99837a404ca40c3a07313f2a20e2700de7ad6aa9a9a18fb"}, + {file = "draftjs_exporter-5.0.0-py3-none-any.whl", hash = "sha256:8cb9d2d51284233decfe274802f1c53e257158c62b9f53ed2399de3fa80ac561"}, + {file = "draftjs_exporter-5.0.0.tar.gz", hash = "sha256:2efee45d4bb4c0aaacc3e5ea2983a29a29381e02037f3f92a6b12706d7b87e1e"}, ] [package.extras] -html5lib = ["beautifulsoup4 (>=4.4.1,<5)", "html5lib (>=0.999,<=1.0.1)"] +html5lib = ["beautifulsoup4 (>=4.4.1,<5)", "html5lib (>=0.999,<2)"] lxml = ["lxml (>=4.2.0,<5)"] -testing = ["beautifulsoup4 (>=4.4.1,<5)", "coverage (>=4.1.0)", "flake8 (>=3.2.0)", "html5lib (>=0.999,<=1.0.1)", "isort (==4.2.5)", "lxml (>=4.2.0,<5)", "markov-draftjs (==0.1.1)", "memory-profiler (==0.47)", "psutil (==5.4.1)", "tox (>=2.3.1)"] [[package]] name = "drf-spectacular" @@ -1167,13 +1202,13 @@ sidecar = ["drf-spectacular-sidecar"] [[package]] name = "ecs-logging" -version = "2.1.0" +version = "2.2.0" description = "Logging formatters for ECS (Elastic Common Schema) in Python" optional = false python-versions = ">=3.6" files = [ - {file = "ecs_logging-2.1.0-py3-none-any.whl", hash = "sha256:02581a56b7fc6cbae2de121a4a398ba3bd73d7bb2d67cd029a8a03df0b144098"}, - {file = "ecs_logging-2.1.0.tar.gz", hash = "sha256:222cc158d4331157d128bc903629010f7724eab8ba4b642efbffd0cb482f4cde"}, + {file = "ecs_logging-2.2.0-py3-none-any.whl", hash = "sha256:f6e22d267770b06f797076f49b5fcc9d97108b22f452f5f9ed4b5367b1e61b5b"}, + {file = "ecs_logging-2.2.0.tar.gz", hash = "sha256:1dc9e216f614129db0e6a2f9f926da4e4cf8edf8de16d1045a20aa8e950291d3"}, ] [package.extras] @@ -1181,20 +1216,20 @@ develop = ["elastic-apm", "mock", "pytest", "pytest-cov", "structlog"] [[package]] name = "elastic-apm" -version = "6.22.0" +version = "6.22.3" description = "The official Python module for Elastic APM" optional = false python-versions = "<4,>=3.6" files = [ - {file = "elastic-apm-6.22.0.tar.gz", hash = "sha256:6c4aaf15466d05201137e2d1d398fe94dbddacd0bd2233ba4e3309749bd0315e"}, - {file = "elastic_apm-6.22.0-py2.py3-none-any.whl", hash = "sha256:83b6e9cc2961bac44f427375e91d42e43751478c588f7395f48c07e3455e94c9"}, + {file = "elastic-apm-6.22.3.tar.gz", hash = "sha256:244e5dbf1d530f2f2b899af1ba33918c68ff6d0a1d634d62e556d815ea044b70"}, + {file = "elastic_apm-6.22.3-py2.py3-none-any.whl", hash = "sha256:7144ea3ba0ef8aeb31b93719c6a2574cc8ede35908e07dda5647addd36c70ce6"}, ] [package.dependencies] certifi = "*" ecs-logging = "*" urllib3 = "<2.0.0 || >2.0.0,<3.0.0" -wrapt = ">=1.14.1,<1.15.0" +wrapt = ">=1.14.1,<1.15.0 || >1.15.0" [package.extras] aiohttp = ["aiohttp"] @@ -1207,13 +1242,13 @@ tornado = ["tornado"] [[package]] name = "elastic-transport" -version = "8.13.0" +version = "8.13.1" description = "Transport classes and utilities shared among Python Elastic client libraries" optional = false python-versions = ">=3.7" files = [ - {file = "elastic-transport-8.13.0.tar.gz", hash = "sha256:2410ec1ff51221e8b3a01c0afa9f0d0498e1386a269283801f5c12f98e42dc45"}, - {file = "elastic_transport-8.13.0-py3-none-any.whl", hash = "sha256:aec890afdddd057762b27ff3553b0be8fa4673ec1a4fd922dfbd00325874bb3d"}, + {file = "elastic_transport-8.13.1-py3-none-any.whl", hash = "sha256:5d4bb6b8e9d74a9c16de274e91a5caf65a3a8d12876f1e99152975e15b2746fe"}, + {file = "elastic_transport-8.13.1.tar.gz", hash = "sha256:16339d392b4bbe86ad00b4bdeecff10edf516d32bc6c16053846625f2c6ea250"}, ] [package.dependencies] @@ -1225,13 +1260,13 @@ develop = ["aiohttp", "furo", "httpx", "mock", "opentelemetry-api", "opentelemet [[package]] name = "elasticsearch" -version = "8.13.1" +version = "8.14.0" description = "Python client for Elasticsearch" optional = false python-versions = ">=3.7" files = [ - {file = "elasticsearch-8.13.1-py3-none-any.whl", hash = "sha256:ba2b3f8b30a7a81beae690f1cede52fbcfd29baf3ef5bb028d4fa86972feebd8"}, - {file = "elasticsearch-8.13.1.tar.gz", hash = "sha256:1594d2d1293672db62525bc4688d86cdaf118db0f901808db28dc90ad19b81e1"}, + {file = "elasticsearch-8.14.0-py3-none-any.whl", hash = "sha256:cef8ef70a81af027f3da74a4f7d9296b390c636903088439087b8262a468c130"}, + {file = "elasticsearch-8.14.0.tar.gz", hash = "sha256:aa2490029dd96f4015b333c1827aa21fd6c0a4d223b00dfb0fe933b8d09a511b"}, ] [package.dependencies] @@ -1240,7 +1275,7 @@ elastic-transport = ">=8.13,<9" [package.extras] async = ["aiohttp (>=3,<4)"] orjson = ["orjson (>=3)"] -requests = ["requests (>=2.4.0,<3.0.0)"] +requests = ["requests (>=2.4.0,!=2.32.2,<3.0.0)"] vectorstore-mmr = ["numpy (>=1)", "simsimd (>=3)"] [[package]] @@ -1256,13 +1291,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.1" +version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, - {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -1302,13 +1337,13 @@ doc = ["Sphinx", "sphinx-rtd-theme", "sphinxcontrib-spelling"] [[package]] name = "faker" -version = "25.2.0" +version = "26.0.0" description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" files = [ - {file = "Faker-25.2.0-py3-none-any.whl", hash = "sha256:cfe97c4857c4c36ee32ea4aaabef884895992e209bae4cbd26807cf3e05c6918"}, - {file = "Faker-25.2.0.tar.gz", hash = "sha256:45b84f47ff1ef86e3d1a8d11583ca871ecf6730fad0660edadc02576583a2423"}, + {file = "Faker-26.0.0-py3-none-any.whl", hash = "sha256:886ee28219be96949cd21ecc96c4c742ee1680e77f687b095202c8def1a08f06"}, + {file = "Faker-26.0.0.tar.gz", hash = "sha256:0f60978314973de02c00474c2ae899785a42b2cf4f41b7987e93c132a2b8a4a9"}, ] [package.dependencies] @@ -1316,18 +1351,18 @@ python-dateutil = ">=2.4" [[package]] name = "filelock" -version = "3.14.0" +version = "3.15.4" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.14.0-py3-none-any.whl", hash = "sha256:43339835842f110ca7ae60f1e1c160714c5a6afd15a2873419ab185334975c0f"}, - {file = "filelock-3.14.0.tar.gz", hash = "sha256:6ea72da3be9b8c82afd3edcf99f2fffbb5076335a5ae4d03248bb5b6c3eae78a"}, + {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"}, + {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"] typing = ["typing-extensions (>=4.8)"] [[package]] @@ -1562,12 +1597,12 @@ lxml = ["lxml"] [[package]] name = "huey" -version = "2.5.0" +version = "2.5.1" description = "huey, a little task queue" optional = false python-versions = "*" files = [ - {file = "huey-2.5.0.tar.gz", hash = "sha256:2ffb52fb5c46a1b0d53c79d59df3622312b27e2ab68d81a580985a8ea4ca3480"}, + {file = "huey-2.5.1.tar.gz", hash = "sha256:8a323783ab434a095a4e72b8c48c5b8f957f9031fa860474a390a0927e957112"}, ] [package.extras] @@ -1576,13 +1611,13 @@ redis = ["redis (>=3.0.0)"] [[package]] name = "identify" -version = "2.5.36" +version = "2.6.0" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.36-py2.py3-none-any.whl", hash = "sha256:37d93f380f4de590500d9dba7db359d0d3da95ffe7f9de1753faa159e71e7dfa"}, - {file = "identify-2.5.36.tar.gz", hash = "sha256:e5e00f54165f9047fbebeb4a560f9acfb8af4c88232be60a488e9b68d122745d"}, + {file = "identify-2.6.0-py2.py3-none-any.whl", hash = "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0"}, + {file = "identify-2.6.0.tar.gz", hash = "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf"}, ] [package.extras] @@ -1639,13 +1674,13 @@ tomli = {version = "*", markers = "python_version > \"3.6\" and python_version < [[package]] name = "ipython" -version = "8.24.0" +version = "8.26.0" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.10" files = [ - {file = "ipython-8.24.0-py3-none-any.whl", hash = "sha256:d7bf2f6c4314984e3e02393213bab8703cf163ede39672ce5918c51fe253a2a3"}, - {file = "ipython-8.24.0.tar.gz", hash = "sha256:010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501"}, + {file = "ipython-8.26.0-py3-none-any.whl", hash = "sha256:e6b347c27bdf9c32ee9d31ae85defc525755a1869f14057e900675b9e8d6e6ff"}, + {file = "ipython-8.26.0.tar.gz", hash = "sha256:1cec0fbba8404af13facebe83d04436a7434c7400e59f47acf467c64abd0956c"}, ] [package.dependencies] @@ -1664,7 +1699,7 @@ typing-extensions = {version = ">=4.6", markers = "python_version < \"3.12\""} [package.extras] all = ["ipython[black,doc,kernel,matplotlib,nbconvert,nbformat,notebook,parallel,qtconsole]", "ipython[test,test-extra]"] black = ["black"] -doc = ["docrepr", "exceptiongroup", "ipykernel", "ipython[test]", "matplotlib", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "sphinxcontrib-jquery", "stack-data", "typing-extensions"] +doc = ["docrepr", "exceptiongroup", "intersphinx-registry", "ipykernel", "ipython[test]", "matplotlib", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "sphinxcontrib-jquery", "tomli", "typing-extensions"] kernel = ["ipykernel"] matplotlib = ["matplotlib"] nbconvert = ["nbconvert"] @@ -1672,7 +1707,7 @@ nbformat = ["nbformat"] notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] +test = ["packaging", "pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] [[package]] @@ -1735,24 +1770,24 @@ jsonpointer = ">=1.9" [[package]] name = "jsonpointer" -version = "2.4" +version = "3.0.0" description = "Identify specific nodes in a JSON document (RFC 6901)" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" +python-versions = ">=3.7" files = [ - {file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"}, - {file = "jsonpointer-2.4.tar.gz", hash = "sha256:585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"}, + {file = "jsonpointer-3.0.0-py2.py3-none-any.whl", hash = "sha256:13e088adc14fca8b6aa8177c044e12701e6ad4b28ff10e65f2267a90109c9942"}, + {file = "jsonpointer-3.0.0.tar.gz", hash = "sha256:2b2d729f2091522d61c3b31f82e11870f60b68f43fbc705cb76bf4b832af59ef"}, ] [[package]] name = "jsonschema" -version = "4.22.0" +version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.22.0-py3-none-any.whl", hash = "sha256:ff4cfd6b1367a40e7bc6411caec72effadd3db0bbe5017de188f2d6108335802"}, - {file = "jsonschema-4.22.0.tar.gz", hash = "sha256:5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7"}, + {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, + {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, ] [package.dependencies] @@ -1763,7 +1798,7 @@ rpds-py = ">=0.7.1" [package.extras] format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] -format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=24.6.0)"] [[package]] name = "jsonschema-specifications" @@ -1794,6 +1829,24 @@ files = [ pytz = ">=2020.1" six = "*" +[[package]] +name = "laces" +version = "0.1.1" +description = "Django components that know how to render themselves." +optional = false +python-versions = ">=3.8" +files = [ + {file = "laces-0.1.1-py3-none-any.whl", hash = "sha256:ae2c575b9aaa46154e5518c61c9f86f5a9478f753a51e9c5547c7d275d361242"}, + {file = "laces-0.1.1.tar.gz", hash = "sha256:e45159c46f6adca33010d34e9af869e57201b70675c6dc088e919b16c89456a4"}, +] + +[package.dependencies] +Django = ">=3.2" + +[package.extras] +dev = ["black (==24.1.1)", "blacken-docs (==1.16.0)", "coverage (==7.3.4)", "django-stubs[compatible-mypy] (==4.2.7)", "flake8 (==7.0.0)", "flake8-bugbear", "flake8-comprehensions", "isort (==5.13.2)", "mypy (==1.7.1)", "pre-commit (==3.4.0)", "tox (==4.12.1)", "tox-gh-actions (==3.2.0)", "types-requests (==2.31.0.20240125)", "virtualenv-pyenv (==0.4.0)"] +testing = ["coverage (==7.3.4)", "dj-database-url (==2.1.0)"] + [[package]] name = "langchain" version = "0.1.20" @@ -1884,35 +1937,38 @@ extended-testing = ["jinja2 (>=3,<4)"] [[package]] name = "langchain-text-splitters" -version = "0.0.1" +version = "0.0.2" description = "LangChain text splitting utilities" optional = false -python-versions = ">=3.8.1,<4.0" +python-versions = "<4.0,>=3.8.1" files = [ - {file = "langchain_text_splitters-0.0.1-py3-none-any.whl", hash = "sha256:f5b802f873f5ff6a8b9259ff34d53ed989666ef4e1582e6d1adb3b5520e3839a"}, - {file = "langchain_text_splitters-0.0.1.tar.gz", hash = "sha256:ac459fa98799f5117ad5425a9330b21961321e30bc19a2a2f9f761ddadd62aa1"}, + {file = "langchain_text_splitters-0.0.2-py3-none-any.whl", hash = "sha256:13887f32705862c1e1454213cb7834a63aae57c26fcd80346703a1d09c46168d"}, + {file = "langchain_text_splitters-0.0.2.tar.gz", hash = "sha256:ac8927dc0ba08eba702f6961c9ed7df7cead8de19a9f7101ab2b5ea34201b3c1"}, ] [package.dependencies] -langchain-core = ">=0.1.28,<0.2.0" +langchain-core = ">=0.1.28,<0.3" [package.extras] -extended-testing = ["lxml (>=5.1.0,<6.0.0)"] +extended-testing = ["beautifulsoup4 (>=4.12.3,<5.0.0)", "lxml (>=4.9.3,<6.0)"] [[package]] name = "langsmith" -version = "0.1.57" +version = "0.1.85" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langsmith-0.1.57-py3-none-any.whl", hash = "sha256:dbd83b0944a2fbea4151f0aa053530d93fcf6784a580621bc60633cb890b57dc"}, - {file = "langsmith-0.1.57.tar.gz", hash = "sha256:4682204de19f0218029c2b8445ce2cc3485c8d0df9796b31e2ce4c9051fce365"}, + {file = "langsmith-0.1.85-py3-none-any.whl", hash = "sha256:c1f94384f10cea96f7b4d33fd3db7ec180c03c7468877d50846f881d2017ff94"}, + {file = "langsmith-0.1.85.tar.gz", hash = "sha256:acff31f9e53efa48586cf8e32f65625a335c74d7c4fa306d1655ac18452296f6"}, ] [package.dependencies] orjson = ">=3.9.14,<4.0.0" -pydantic = ">=1,<3" +pydantic = [ + {version = ">=1,<3", markers = "python_full_version < \"3.12.4\""}, + {version = ">=2.7.4,<3.0.0", markers = "python_full_version >= \"3.12.4\""}, +] requests = ">=2,<3" [[package]] @@ -1930,15 +1986,30 @@ files = [ {file = "libsass-0.23.0.tar.gz", hash = "sha256:6f209955ede26684e76912caf329f4ccb57e4a043fd77fe0e7348dd9574f1880"}, ] +[[package]] +name = "markdown" +version = "3.6" +description = "Python implementation of John Gruber's Markdown." +optional = false +python-versions = ">=3.8" +files = [ + {file = "Markdown-3.6-py3-none-any.whl", hash = "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f"}, + {file = "Markdown-3.6.tar.gz", hash = "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224"}, +] + +[package.extras] +docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] +testing = ["coverage", "pyyaml"] + [[package]] name = "marshmallow" -version = "3.21.2" +version = "3.21.3" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.8" files = [ - {file = "marshmallow-3.21.2-py3-none-any.whl", hash = "sha256:70b54a6282f4704d12c0a41599682c5c5450e843b9ec406308653b47c59648a1"}, - {file = "marshmallow-3.21.2.tar.gz", hash = "sha256:82408deadd8b33d56338d2182d455db632c6313aa2af61916672146bb32edc56"}, + {file = "marshmallow-3.21.3-py3-none-any.whl", hash = "sha256:86ce7fb914aa865001a4b2092c4c2872d13bc347f3d42673272cabfdbad386f1"}, + {file = "marshmallow-3.21.3.tar.gz", hash = "sha256:4f57c5e050a54d66361e826f94fba213eb10b67b2fdb02c3e0343ce207ba1662"}, ] [package.dependencies] @@ -2086,18 +2157,15 @@ files = [ [[package]] name = "nodeenv" -version = "1.8.0" +version = "1.9.1" description = "Node.js virtual environment builder" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, + {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, + {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] -[package.dependencies] -setuptools = "*" - [[package]] name = "numpy" version = "1.26.4" @@ -2167,13 +2235,13 @@ wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1 [[package]] name = "openpyxl" -version = "3.1.2" +version = "3.1.5" description = "A Python library to read/write Excel 2010 xlsx/xlsm files" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "openpyxl-3.1.2-py2.py3-none-any.whl", hash = "sha256:f91456ead12ab3c6c2e9491cf33ba6d08357d802192379bb482f1033ade496f5"}, - {file = "openpyxl-3.1.2.tar.gz", hash = "sha256:a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184"}, + {file = "openpyxl-3.1.5-py2.py3-none-any.whl", hash = "sha256:5282c12b107bffeef825f4617dc029afaf41d0ea60823bbb665ef3079dc79de2"}, + {file = "openpyxl-3.1.5.tar.gz", hash = "sha256:cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050"}, ] [package.dependencies] @@ -2181,57 +2249,62 @@ et-xmlfile = "*" [[package]] name = "orjson" -version = "3.10.3" +version = "3.10.6" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.8" files = [ - {file = "orjson-3.10.3-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9fb6c3f9f5490a3eb4ddd46fc1b6eadb0d6fc16fb3f07320149c3286a1409dd8"}, - {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:252124b198662eee80428f1af8c63f7ff077c88723fe206a25df8dc57a57b1fa"}, - {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9f3e87733823089a338ef9bbf363ef4de45e5c599a9bf50a7a9b82e86d0228da"}, - {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c8334c0d87103bb9fbbe59b78129f1f40d1d1e8355bbed2ca71853af15fa4ed3"}, - {file = "orjson-3.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1952c03439e4dce23482ac846e7961f9d4ec62086eb98ae76d97bd41d72644d7"}, - {file = "orjson-3.10.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c0403ed9c706dcd2809f1600ed18f4aae50be263bd7112e54b50e2c2bc3ebd6d"}, - {file = "orjson-3.10.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:382e52aa4270a037d41f325e7d1dfa395b7de0c367800b6f337d8157367bf3a7"}, - {file = "orjson-3.10.3-cp310-none-win32.whl", hash = "sha256:be2aab54313752c04f2cbaab4515291ef5af8c2256ce22abc007f89f42f49109"}, - {file = "orjson-3.10.3-cp310-none-win_amd64.whl", hash = "sha256:416b195f78ae461601893f482287cee1e3059ec49b4f99479aedf22a20b1098b"}, - {file = "orjson-3.10.3-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:73100d9abbbe730331f2242c1fc0bcb46a3ea3b4ae3348847e5a141265479700"}, - {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:544a12eee96e3ab828dbfcb4d5a0023aa971b27143a1d35dc214c176fdfb29b3"}, - {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:520de5e2ef0b4ae546bea25129d6c7c74edb43fc6cf5213f511a927f2b28148b"}, - {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ccaa0a401fc02e8828a5bedfd80f8cd389d24f65e5ca3954d72c6582495b4bcf"}, - {file = "orjson-3.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a7bc9e8bc11bac40f905640acd41cbeaa87209e7e1f57ade386da658092dc16"}, - {file = "orjson-3.10.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3582b34b70543a1ed6944aca75e219e1192661a63da4d039d088a09c67543b08"}, - {file = "orjson-3.10.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c23dfa91481de880890d17aa7b91d586a4746a4c2aa9a145bebdbaf233768d5"}, - {file = "orjson-3.10.3-cp311-none-win32.whl", hash = "sha256:1770e2a0eae728b050705206d84eda8b074b65ee835e7f85c919f5705b006c9b"}, - {file = "orjson-3.10.3-cp311-none-win_amd64.whl", hash = "sha256:93433b3c1f852660eb5abdc1f4dd0ced2be031ba30900433223b28ee0140cde5"}, - {file = "orjson-3.10.3-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a39aa73e53bec8d410875683bfa3a8edf61e5a1c7bb4014f65f81d36467ea098"}, - {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0943a96b3fa09bee1afdfccc2cb236c9c64715afa375b2af296c73d91c23eab2"}, - {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e852baafceff8da3c9defae29414cc8513a1586ad93e45f27b89a639c68e8176"}, - {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18566beb5acd76f3769c1d1a7ec06cdb81edc4d55d2765fb677e3eaa10fa99e0"}, - {file = "orjson-3.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bd2218d5a3aa43060efe649ec564ebedec8ce6ae0a43654b81376216d5ebd42"}, - {file = "orjson-3.10.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cf20465e74c6e17a104ecf01bf8cd3b7b252565b4ccee4548f18b012ff2f8069"}, - {file = "orjson-3.10.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ba7f67aa7f983c4345eeda16054a4677289011a478ca947cd69c0a86ea45e534"}, - {file = "orjson-3.10.3-cp312-none-win32.whl", hash = "sha256:17e0713fc159abc261eea0f4feda611d32eabc35708b74bef6ad44f6c78d5ea0"}, - {file = "orjson-3.10.3-cp312-none-win_amd64.whl", hash = "sha256:4c895383b1ec42b017dd2c75ae8a5b862fc489006afde06f14afbdd0309b2af0"}, - {file = "orjson-3.10.3-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:be2719e5041e9fb76c8c2c06b9600fe8e8584e6980061ff88dcbc2691a16d20d"}, - {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0175a5798bdc878956099f5c54b9837cb62cfbf5d0b86ba6d77e43861bcec2"}, - {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:978be58a68ade24f1af7758626806e13cff7748a677faf95fbb298359aa1e20d"}, - {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16bda83b5c61586f6f788333d3cf3ed19015e3b9019188c56983b5a299210eb5"}, - {file = "orjson-3.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ad1f26bea425041e0a1adad34630c4825a9e3adec49079b1fb6ac8d36f8b754"}, - {file = "orjson-3.10.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:9e253498bee561fe85d6325ba55ff2ff08fb5e7184cd6a4d7754133bd19c9195"}, - {file = "orjson-3.10.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0a62f9968bab8a676a164263e485f30a0b748255ee2f4ae49a0224be95f4532b"}, - {file = "orjson-3.10.3-cp38-none-win32.whl", hash = "sha256:8d0b84403d287d4bfa9bf7d1dc298d5c1c5d9f444f3737929a66f2fe4fb8f134"}, - {file = "orjson-3.10.3-cp38-none-win_amd64.whl", hash = "sha256:8bc7a4df90da5d535e18157220d7915780d07198b54f4de0110eca6b6c11e290"}, - {file = "orjson-3.10.3-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9059d15c30e675a58fdcd6f95465c1522b8426e092de9fff20edebfdc15e1cb0"}, - {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d40c7f7938c9c2b934b297412c067936d0b54e4b8ab916fd1a9eb8f54c02294"}, - {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d4a654ec1de8fdaae1d80d55cee65893cb06494e124681ab335218be6a0691e7"}, - {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:831c6ef73f9aa53c5f40ae8f949ff7681b38eaddb6904aab89dca4d85099cb78"}, - {file = "orjson-3.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99b880d7e34542db89f48d14ddecbd26f06838b12427d5a25d71baceb5ba119d"}, - {file = "orjson-3.10.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2e5e176c994ce4bd434d7aafb9ecc893c15f347d3d2bbd8e7ce0b63071c52e25"}, - {file = "orjson-3.10.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b69a58a37dab856491bf2d3bbf259775fdce262b727f96aafbda359cb1d114d8"}, - {file = "orjson-3.10.3-cp39-none-win32.whl", hash = "sha256:b8d4d1a6868cde356f1402c8faeb50d62cee765a1f7ffcfd6de732ab0581e063"}, - {file = "orjson-3.10.3-cp39-none-win_amd64.whl", hash = "sha256:5102f50c5fc46d94f2033fe00d392588564378260d64377aec702f21a7a22912"}, - {file = "orjson-3.10.3.tar.gz", hash = "sha256:2b166507acae7ba2f7c315dcf185a9111ad5e992ac81f2d507aac39193c2c818"}, + {file = "orjson-3.10.6-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:fb0ee33124db6eaa517d00890fc1a55c3bfe1cf78ba4a8899d71a06f2d6ff5c7"}, + {file = "orjson-3.10.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c1c4b53b24a4c06547ce43e5fee6ec4e0d8fe2d597f4647fc033fd205707365"}, + {file = "orjson-3.10.6-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eadc8fd310edb4bdbd333374f2c8fec6794bbbae99b592f448d8214a5e4050c0"}, + {file = "orjson-3.10.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:61272a5aec2b2661f4fa2b37c907ce9701e821b2c1285d5c3ab0207ebd358d38"}, + {file = "orjson-3.10.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57985ee7e91d6214c837936dc1608f40f330a6b88bb13f5a57ce5257807da143"}, + {file = "orjson-3.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:633a3b31d9d7c9f02d49c4ab4d0a86065c4a6f6adc297d63d272e043472acab5"}, + {file = "orjson-3.10.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1c680b269d33ec444afe2bdc647c9eb73166fa47a16d9a75ee56a374f4a45f43"}, + {file = "orjson-3.10.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f759503a97a6ace19e55461395ab0d618b5a117e8d0fbb20e70cfd68a47327f2"}, + {file = "orjson-3.10.6-cp310-none-win32.whl", hash = "sha256:95a0cce17f969fb5391762e5719575217bd10ac5a189d1979442ee54456393f3"}, + {file = "orjson-3.10.6-cp310-none-win_amd64.whl", hash = "sha256:df25d9271270ba2133cc88ee83c318372bdc0f2cd6f32e7a450809a111efc45c"}, + {file = "orjson-3.10.6-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:b1ec490e10d2a77c345def52599311849fc063ae0e67cf4f84528073152bb2ba"}, + {file = "orjson-3.10.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55d43d3feb8f19d07e9f01e5b9be4f28801cf7c60d0fa0d279951b18fae1932b"}, + {file = "orjson-3.10.6-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac3045267e98fe749408eee1593a142e02357c5c99be0802185ef2170086a863"}, + {file = "orjson-3.10.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c27bc6a28ae95923350ab382c57113abd38f3928af3c80be6f2ba7eb8d8db0b0"}, + {file = "orjson-3.10.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d27456491ca79532d11e507cadca37fb8c9324a3976294f68fb1eff2dc6ced5a"}, + {file = "orjson-3.10.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05ac3d3916023745aa3b3b388e91b9166be1ca02b7c7e41045da6d12985685f0"}, + {file = "orjson-3.10.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1335d4ef59ab85cab66fe73fd7a4e881c298ee7f63ede918b7faa1b27cbe5212"}, + {file = "orjson-3.10.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4bbc6d0af24c1575edc79994c20e1b29e6fb3c6a570371306db0993ecf144dc5"}, + {file = "orjson-3.10.6-cp311-none-win32.whl", hash = "sha256:450e39ab1f7694465060a0550b3f6d328d20297bf2e06aa947b97c21e5241fbd"}, + {file = "orjson-3.10.6-cp311-none-win_amd64.whl", hash = "sha256:227df19441372610b20e05bdb906e1742ec2ad7a66ac8350dcfd29a63014a83b"}, + {file = "orjson-3.10.6-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:ea2977b21f8d5d9b758bb3f344a75e55ca78e3ff85595d248eee813ae23ecdfb"}, + {file = "orjson-3.10.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b6f3d167d13a16ed263b52dbfedff52c962bfd3d270b46b7518365bcc2121eed"}, + {file = "orjson-3.10.6-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f710f346e4c44a4e8bdf23daa974faede58f83334289df80bc9cd12fe82573c7"}, + {file = "orjson-3.10.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7275664f84e027dcb1ad5200b8b18373e9c669b2a9ec33d410c40f5ccf4b257e"}, + {file = "orjson-3.10.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0943e4c701196b23c240b3d10ed8ecd674f03089198cf503105b474a4f77f21f"}, + {file = "orjson-3.10.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:446dee5a491b5bc7d8f825d80d9637e7af43f86a331207b9c9610e2f93fee22a"}, + {file = "orjson-3.10.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:64c81456d2a050d380786413786b057983892db105516639cb5d3ee3c7fd5148"}, + {file = "orjson-3.10.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:960db0e31c4e52fa0fc3ecbaea5b2d3b58f379e32a95ae6b0ebeaa25b93dfd34"}, + {file = "orjson-3.10.6-cp312-none-win32.whl", hash = "sha256:a6ea7afb5b30b2317e0bee03c8d34c8181bc5a36f2afd4d0952f378972c4efd5"}, + {file = "orjson-3.10.6-cp312-none-win_amd64.whl", hash = "sha256:874ce88264b7e655dde4aeaacdc8fd772a7962faadfb41abe63e2a4861abc3dc"}, + {file = "orjson-3.10.6-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:66680eae4c4e7fc193d91cfc1353ad6d01b4801ae9b5314f17e11ba55e934183"}, + {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:caff75b425db5ef8e8f23af93c80f072f97b4fb3afd4af44482905c9f588da28"}, + {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3722fddb821b6036fd2a3c814f6bd9b57a89dc6337b9924ecd614ebce3271394"}, + {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2c116072a8533f2fec435fde4d134610f806bdac20188c7bd2081f3e9e0133f"}, + {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6eeb13218c8cf34c61912e9df2de2853f1d009de0e46ea09ccdf3d757896af0a"}, + {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:965a916373382674e323c957d560b953d81d7a8603fbeee26f7b8248638bd48b"}, + {file = "orjson-3.10.6-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:03c95484d53ed8e479cade8628c9cea00fd9d67f5554764a1110e0d5aa2de96e"}, + {file = "orjson-3.10.6-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:e060748a04cccf1e0a6f2358dffea9c080b849a4a68c28b1b907f272b5127e9b"}, + {file = "orjson-3.10.6-cp38-none-win32.whl", hash = "sha256:738dbe3ef909c4b019d69afc19caf6b5ed0e2f1c786b5d6215fbb7539246e4c6"}, + {file = "orjson-3.10.6-cp38-none-win_amd64.whl", hash = "sha256:d40f839dddf6a7d77114fe6b8a70218556408c71d4d6e29413bb5f150a692ff7"}, + {file = "orjson-3.10.6-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:697a35a083c4f834807a6232b3e62c8b280f7a44ad0b759fd4dce748951e70db"}, + {file = "orjson-3.10.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd502f96bf5ea9a61cbc0b2b5900d0dd68aa0da197179042bdd2be67e51a1e4b"}, + {file = "orjson-3.10.6-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f215789fb1667cdc874c1b8af6a84dc939fd802bf293a8334fce185c79cd359b"}, + {file = "orjson-3.10.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2debd8ddce948a8c0938c8c93ade191d2f4ba4649a54302a7da905a81f00b56"}, + {file = "orjson-3.10.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5410111d7b6681d4b0d65e0f58a13be588d01b473822483f77f513c7f93bd3b2"}, + {file = "orjson-3.10.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb1f28a137337fdc18384079fa5726810681055b32b92253fa15ae5656e1dddb"}, + {file = "orjson-3.10.6-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:bf2fbbce5fe7cd1aa177ea3eab2b8e6a6bc6e8592e4279ed3db2d62e57c0e1b2"}, + {file = "orjson-3.10.6-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:79b9b9e33bd4c517445a62b90ca0cc279b0f1f3970655c3df9e608bc3f91741a"}, + {file = "orjson-3.10.6-cp39-none-win32.whl", hash = "sha256:30b0a09a2014e621b1adf66a4f705f0809358350a757508ee80209b2d8dae219"}, + {file = "orjson-3.10.6-cp39-none-win_amd64.whl", hash = "sha256:49e3bc615652617d463069f91b867a4458114c5b104e13b7ae6872e5f79d0844"}, + {file = "orjson-3.10.6.tar.gz", hash = "sha256:e54b63d0a7c6c54a5f5f726bc93a2078111ef060fec4ecbf34c5db800ca3b3a7"}, ] [[package]] @@ -2312,95 +2385,106 @@ ptyprocess = ">=0.5" [[package]] name = "phonenumbers" -version = "8.13.36" +version = "8.13.40" description = "Python version of Google's common library for parsing, formatting, storing and validating international phone numbers." optional = false python-versions = "*" files = [ - {file = "phonenumbers-8.13.36-py2.py3-none-any.whl", hash = "sha256:68e06d20ae2f8fe5c7c7fd5b433f4257bc3cc747dc5196a029c7898ea449b012"}, - {file = "phonenumbers-8.13.36.tar.gz", hash = "sha256:b4e2371e35a1172aa2c91c9200b1e48e87b9355eb575768dd38058fc8d72c9ff"}, + {file = "phonenumbers-8.13.40-py2.py3-none-any.whl", hash = "sha256:9582752c20a1da5ec4449f7f97542bf8a793c8e2fec0ab57f767177bb8fc0b1d"}, + {file = "phonenumbers-8.13.40.tar.gz", hash = "sha256:f137c2848b8e83dd064b71881b65680584417efa202177fd330e2f7ff6c68113"}, ] [[package]] name = "pillow" -version = "10.3.0" +version = "10.4.0" description = "Python Imaging Library (Fork)" optional = false python-versions = ">=3.8" files = [ - {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, - {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, - {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, - {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, - {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, - {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, - {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, - {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, - {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, - {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, - {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, - {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, - {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, - {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, - {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, - {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, - {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, + {file = "pillow-10.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e"}, + {file = "pillow-10.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7928ecbf1ece13956b95d9cbcfc77137652b02763ba384d9ab508099a2eca856"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4d49b85c4348ea0b31ea63bc75a9f3857869174e2bf17e7aba02945cd218e6f"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:6c762a5b0997f5659a5ef2266abc1d8851ad7749ad9a6a5506eb23d314e4f46b"}, + {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a985e028fc183bf12a77a8bbf36318db4238a3ded7fa9df1b9a133f1cb79f8fc"}, + {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:812f7342b0eee081eaec84d91423d1b4650bb9828eb53d8511bcef8ce5aecf1e"}, + {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ac1452d2fbe4978c2eec89fb5a23b8387aba707ac72810d9490118817d9c0b46"}, + {file = "pillow-10.4.0-cp310-cp310-win32.whl", hash = "sha256:bcd5e41a859bf2e84fdc42f4edb7d9aba0a13d29a2abadccafad99de3feff984"}, + {file = "pillow-10.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:ecd85a8d3e79cd7158dec1c9e5808e821feea088e2f69a974db5edf84dc53141"}, + {file = "pillow-10.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:ff337c552345e95702c5fde3158acb0625111017d0e5f24bf3acdb9cc16b90d1"}, + {file = "pillow-10.4.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:0a9ec697746f268507404647e531e92889890a087e03681a3606d9b920fbee3c"}, + {file = "pillow-10.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe91cb65544a1321e631e696759491ae04a2ea11d36715eca01ce07284738be"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5dc6761a6efc781e6a1544206f22c80c3af4c8cf461206d46a1e6006e4429ff3"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e84b6cc6a4a3d76c153a6b19270b3526a5a8ed6b09501d3af891daa2a9de7d6"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:bbc527b519bd3aa9d7f429d152fea69f9ad37c95f0b02aebddff592688998abe"}, + {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:76a911dfe51a36041f2e756b00f96ed84677cdeb75d25c767f296c1c1eda1319"}, + {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59291fb29317122398786c2d44427bbd1a6d7ff54017075b22be9d21aa59bd8d"}, + {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:416d3a5d0e8cfe4f27f574362435bc9bae57f679a7158e0096ad2beb427b8696"}, + {file = "pillow-10.4.0-cp311-cp311-win32.whl", hash = "sha256:7086cc1d5eebb91ad24ded9f58bec6c688e9f0ed7eb3dbbf1e4800280a896496"}, + {file = "pillow-10.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cbed61494057c0f83b83eb3a310f0bf774b09513307c434d4366ed64f4128a91"}, + {file = "pillow-10.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:f5f0c3e969c8f12dd2bb7e0b15d5c468b51e5017e01e2e867335c81903046a22"}, + {file = "pillow-10.4.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:673655af3eadf4df6b5457033f086e90299fdd7a47983a13827acf7459c15d94"}, + {file = "pillow-10.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:866b6942a92f56300012f5fbac71f2d610312ee65e22f1aa2609e491284e5597"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29dbdc4207642ea6aad70fbde1a9338753d33fb23ed6956e706936706f52dd80"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf2342ac639c4cf38799a44950bbc2dfcb685f052b9e262f446482afaf4bffca"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:f5b92f4d70791b4a67157321c4e8225d60b119c5cc9aee8ecf153aace4aad4ef"}, + {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:86dcb5a1eb778d8b25659d5e4341269e8590ad6b4e8b44d9f4b07f8d136c414a"}, + {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:780c072c2e11c9b2c7ca37f9a2ee8ba66f44367ac3e5c7832afcfe5104fd6d1b"}, + {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37fb69d905be665f68f28a8bba3c6d3223c8efe1edf14cc4cfa06c241f8c81d9"}, + {file = "pillow-10.4.0-cp312-cp312-win32.whl", hash = "sha256:7dfecdbad5c301d7b5bde160150b4db4c659cee2b69589705b6f8a0c509d9f42"}, + {file = "pillow-10.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:1d846aea995ad352d4bdcc847535bd56e0fd88d36829d2c90be880ef1ee4668a"}, + {file = "pillow-10.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:e553cad5179a66ba15bb18b353a19020e73a7921296a7979c4a2b7f6a5cd57f9"}, + {file = "pillow-10.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8bc1a764ed8c957a2e9cacf97c8b2b053b70307cf2996aafd70e91a082e70df3"}, + {file = "pillow-10.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6209bb41dc692ddfee4942517c19ee81b86c864b626dbfca272ec0f7cff5d9fb"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bee197b30783295d2eb680b311af15a20a8b24024a19c3a26431ff83eb8d1f70"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ef61f5dd14c300786318482456481463b9d6b91ebe5ef12f405afbba77ed0be"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:297e388da6e248c98bc4a02e018966af0c5f92dfacf5a5ca22fa01cb3179bca0"}, + {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e4db64794ccdf6cb83a59d73405f63adbe2a1887012e308828596100a0b2f6cc"}, + {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bd2880a07482090a3bcb01f4265f1936a903d70bc740bfcb1fd4e8a2ffe5cf5a"}, + {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4b35b21b819ac1dbd1233317adeecd63495f6babf21b7b2512d244ff6c6ce309"}, + {file = "pillow-10.4.0-cp313-cp313-win32.whl", hash = "sha256:551d3fd6e9dc15e4c1eb6fc4ba2b39c0c7933fa113b220057a34f4bb3268a060"}, + {file = "pillow-10.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:030abdbe43ee02e0de642aee345efa443740aa4d828bfe8e2eb11922ea6a21ea"}, + {file = "pillow-10.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:5b001114dd152cfd6b23befeb28d7aee43553e2402c9f159807bf55f33af8a8d"}, + {file = "pillow-10.4.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8d4d5063501b6dd4024b8ac2f04962d661222d120381272deea52e3fc52d3736"}, + {file = "pillow-10.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c1ee6f42250df403c5f103cbd2768a28fe1a0ea1f0f03fe151c8741e1469c8b"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15e02e9bb4c21e39876698abf233c8c579127986f8207200bc8a8f6bb27acf2"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a8d4bade9952ea9a77d0c3e49cbd8b2890a399422258a77f357b9cc9be8d680"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:43efea75eb06b95d1631cb784aa40156177bf9dd5b4b03ff38979e048258bc6b"}, + {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:950be4d8ba92aca4b2bb0741285a46bfae3ca699ef913ec8416c1b78eadd64cd"}, + {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d7480af14364494365e89d6fddc510a13e5a2c3584cb19ef65415ca57252fb84"}, + {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:73664fe514b34c8f02452ffb73b7a92c6774e39a647087f83d67f010eb9a0cf0"}, + {file = "pillow-10.4.0-cp38-cp38-win32.whl", hash = "sha256:e88d5e6ad0d026fba7bdab8c3f225a69f063f116462c49892b0149e21b6c0a0e"}, + {file = "pillow-10.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:5161eef006d335e46895297f642341111945e2c1c899eb406882a6c61a4357ab"}, + {file = "pillow-10.4.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:0ae24a547e8b711ccaaf99c9ae3cd975470e1a30caa80a6aaee9a2f19c05701d"}, + {file = "pillow-10.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:298478fe4f77a4408895605f3482b6cc6222c018b2ce565c2b6b9c354ac3229b"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:134ace6dc392116566980ee7436477d844520a26a4b1bd4053f6f47d096997fd"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:930044bb7679ab003b14023138b50181899da3f25de50e9dbee23b61b4de2126"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c76e5786951e72ed3686e122d14c5d7012f16c8303a674d18cdcd6d89557fc5b"}, + {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b2724fdb354a868ddf9a880cb84d102da914e99119211ef7ecbdc613b8c96b3c"}, + {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dbc6ae66518ab3c5847659e9988c3b60dc94ffb48ef9168656e0019a93dbf8a1"}, + {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:06b2f7898047ae93fad74467ec3d28fe84f7831370e3c258afa533f81ef7f3df"}, + {file = "pillow-10.4.0-cp39-cp39-win32.whl", hash = "sha256:7970285ab628a3779aecc35823296a7869f889b8329c16ad5a71e4901a3dc4ef"}, + {file = "pillow-10.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:961a7293b2457b405967af9c77dcaa43cc1a8cd50d23c532e62d48ab6cdd56f5"}, + {file = "pillow-10.4.0-cp39-cp39-win_arm64.whl", hash = "sha256:32cda9e3d601a52baccb2856b8ea1fc213c90b340c542dcef77140dfa3278a9e"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5b4815f2e65b30f5fbae9dfffa8636d992d49705723fe86a3661806e069352d4"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8f0aef4ef59694b12cadee839e2ba6afeab89c0f39a3adc02ed51d109117b8da"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f4727572e2918acaa9077c919cbbeb73bd2b3ebcfe033b72f858fc9fbef0026"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff25afb18123cea58a591ea0244b92eb1e61a1fd497bf6d6384f09bc3262ec3e"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dc3e2db6ba09ffd7d02ae9141cfa0ae23393ee7687248d46a7507b75d610f4f5"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:02a2be69f9c9b8c1e97cf2713e789d4e398c751ecfd9967c18d0ce304efbf885"}, + {file = "pillow-10.4.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0755ffd4a0c6f267cccbae2e9903d95477ca2f77c4fcf3a3a09570001856c8a5"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a02364621fe369e06200d4a16558e056fe2805d3468350df3aef21e00d26214b"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1b5dea9831a90e9d0721ec417a80d4cbd7022093ac38a568db2dd78363b00908"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b885f89040bb8c4a1573566bbb2f44f5c505ef6e74cec7ab9068c900047f04b"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87dd88ded2e6d74d31e1e0a99a726a6765cda32d00ba72dc37f0651f306daaa8"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:2db98790afc70118bd0255c2eeb465e9767ecf1f3c25f9a1abb8ffc8cfd1fe0a"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f7baece4ce06bade126fb84b8af1c33439a76d8a6fd818970215e0560ca28c27"}, + {file = "pillow-10.4.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cfdd747216947628af7b259d274771d84db2268ca062dd5faf373639d00113a3"}, + {file = "pillow-10.4.0.tar.gz", hash = "sha256:166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06"}, ] [package.extras] -docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +docs = ["furo", "olefile", "sphinx (>=7.3)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"] fpx = ["olefile"] mic = ["olefile"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] @@ -2478,13 +2562,13 @@ tests-min = ["defusedxml", "packaging", "pytest"] [[package]] name = "platformdirs" -version = "4.2.1" +version = "4.2.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, - {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, ] [package.extras] @@ -2525,6 +2609,17 @@ tomli = ">=1.2.2,<2.0.0" [package.extras] poetry-plugin = ["poetry (>=1.0,<2.0)"] +[[package]] +name = "polib" +version = "1.2.0" +description = "A library to manipulate gettext files (po and mo files)." +optional = false +python-versions = "*" +files = [ + {file = "polib-1.2.0-py2.py3-none-any.whl", hash = "sha256:1c77ee1b81feb31df9bca258cbc58db1bbb32d10214b173882452c73af06d62d"}, + {file = "polib-1.2.0.tar.gz", hash = "sha256:f3ef94aefed6e183e342a8a269ae1fc4742ba193186ad76f175938621dbfc26b"}, +] + [[package]] name = "pre-commit" version = "2.21.0" @@ -2545,13 +2640,13 @@ virtualenv = ">=20.10.0" [[package]] name = "prompt-toolkit" -version = "3.0.43" +version = "3.0.47" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.7.0" files = [ - {file = "prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"}, - {file = "prompt_toolkit-3.0.43.tar.gz", hash = "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d"}, + {file = "prompt_toolkit-3.0.47-py3-none-any.whl", hash = "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10"}, + {file = "prompt_toolkit-3.0.47.tar.gz", hash = "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360"}, ] [package.dependencies] @@ -2687,109 +2782,122 @@ files = [ [[package]] name = "pydantic" -version = "2.7.1" +version = "2.8.2" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, - {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, + {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, + {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.18.2" -typing-extensions = ">=4.6.1" +pydantic-core = "2.20.1" +typing-extensions = [ + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, +] [package.extras] email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.18.2" +version = "2.20.1" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, - {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, - {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, - {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, - {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, - {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, - {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, - {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, - {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, - {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, - {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, - {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, - {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, - {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, + {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, + {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, + {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, + {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, + {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, + {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, + {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, + {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, + {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, + {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, + {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, + {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, + {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, ] [package.dependencies] @@ -2822,13 +2930,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pymysql" -version = "1.1.0" +version = "1.1.1" description = "Pure Python MySQL Driver" optional = false python-versions = ">=3.7" files = [ - {file = "PyMySQL-1.1.0-py3-none-any.whl", hash = "sha256:8969ec6d763c856f7073c4c64662882675702efcb114b4bcbb955aea3a069fa7"}, - {file = "PyMySQL-1.1.0.tar.gz", hash = "sha256:4f13a7df8bf36a51e81dd9f3605fede45a4878fe02f9236349fd82a3f0612f96"}, + {file = "PyMySQL-1.1.1-py3-none-any.whl", hash = "sha256:4de15da4c61dc132f4fb9ab763063e693d521a80fd0e87943b9a453dd4c19d6c"}, + {file = "pymysql-1.1.1.tar.gz", hash = "sha256:e127611aaf2b417403c60bf4dc570124aeb4a57f5f37b8e95ae399a42f904cd0"}, ] [package.extras] @@ -2864,13 +2972,13 @@ files = [ [[package]] name = "pytest" -version = "8.2.0" +version = "8.2.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.0-py3-none-any.whl", hash = "sha256:1733f0620f6cda4095bbf0d9ff8022486e91892245bb9e7d5542c018f612f233"}, - {file = "pytest-8.2.0.tar.gz", hash = "sha256:d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f"}, + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, ] [package.dependencies] @@ -2968,7 +3076,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -3005,34 +3112,58 @@ files = [ [[package]] name = "rcssmin" -version = "1.1.1" +version = "1.1.2" description = "CSS Minifier" optional = false python-versions = "*" files = [ - {file = "rcssmin-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:d4e263fa9428704fd94c2cb565c7519ca1d225217943f71caffe6741ab5b9df1"}, - {file = "rcssmin-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c7278c1c25bb90d8e554df92cfb3b6a1195004ead50f764653d3093933ee0877"}, - {file = "rcssmin-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f15673e97f0a68b4c378c4d15b088fe96d60bc106d278c88829923118833c20f"}, - {file = "rcssmin-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d0afc6e7b64ef30d6dcde88830ec1a237b9f16a39f920a8fd159928684ccf8db"}, - {file = "rcssmin-1.1.1-cp310-cp310-manylinux1_i686.whl", hash = "sha256:705c9112d0ed54ea40aecf97e7fd29bdf0f1c46d278a32d8f957f31dde90778a"}, - {file = "rcssmin-1.1.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:f7a1fcdbafaacac0530da04edca4a44303baab430ea42e7d59aece4b3f3e9a51"}, - {file = "rcssmin-1.1.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:cf74d7ea5e191f0f344b354eed8b7c83eeafbd9a97bec3a579c3d26edf11b005"}, - {file = "rcssmin-1.1.1-cp311-cp311-manylinux1_i686.whl", hash = "sha256:908fe072efd2432fb0975a61124609a8e05021367f6a3463d45f5e3e74c4fdda"}, - {file = "rcssmin-1.1.1-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:35da6a6999e9e2c5b0e691b42ed56cc479373e0ecab33ef5277dfecce625e44a"}, - {file = "rcssmin-1.1.1-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:e923c105100ab70abde1c01d3196ddd6b07255e32073685542be4e3a60870c8e"}, - {file = "rcssmin-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:868215e1fd0e92a6122e0ed5973dfc7bb8330fe1e92274d05b2585253b38c0ca"}, - {file = "rcssmin-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:c7728e3b546b1b6ea08cab721e8e21409dbcc11b881d0b87d10b0be8930af2a2"}, - {file = "rcssmin-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:271e3d2f8614a6d4637ed8fff3d90007f03e2a654cd9444f37d888797662ba72"}, - {file = "rcssmin-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:42576d95dfad53d77df2e68dfdec95b89b10fad320f241f1af3ca1438578254a"}, - {file = "rcssmin-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:79421230dd67c37ec61ed9892813d2b839b68f2f48ef55c75f976e81701d60b4"}, - {file = "rcssmin-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:8fcfd10ae2a1c4ce231a33013f2539e07c3836bf17cc945cc25cc30bf8e68e45"}, - {file = "rcssmin-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c30f8bc839747b6da59274e0c6e4361915d66532e26448d589cb2b1846d7bf11"}, - {file = "rcssmin-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:ee386bec6d62f8c814d65c011d604a7c82d24aa3f718facd66e850eea8d6a5a1"}, - {file = "rcssmin-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8a26fec3c1e6b7a3765ccbaccc20fbb5c0ed3422cc381e01a2607f08d7621c44"}, - {file = "rcssmin-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:a04d58a2a21e9a089306d3f99c4b12bf5b656a79c198ef2321e80f8fd9afab06"}, - {file = "rcssmin-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:914e589f40573035006913861ed2adc28fbe70082a8b6bff5be7ee430b7b5c2e"}, - {file = "rcssmin-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:a417735d4023d47d048a6288c88dbceadd20abaaf65a11bb4fda1e8458057019"}, - {file = "rcssmin-1.1.1.tar.gz", hash = "sha256:4f9400b4366d29f5f5446f58e78549afa8338e6a59740c73115e9f6ac413dc64"}, + {file = "rcssmin-1.1.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:0101a55992ded00220d38ebaf003d0858c1e6e8b365df6f18f9d7a2cdc5574b3"}, + {file = "rcssmin-1.1.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9d7a5c6a08948ae5d7e1422ac34031fc05242786e6b600b37948412ee16f3655"}, + {file = "rcssmin-1.1.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:5f602bcaa457680a89904c10d1a539ffae5d4de08ec61a2044efc93c9a743860"}, + {file = "rcssmin-1.1.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d9384421d8cb516202349da7b6502d77df14860fa710f91dbe0b03b3b895dda3"}, + {file = "rcssmin-1.1.2-cp310-cp310-manylinux1_i686.whl", hash = "sha256:d40964dc7fbd74be30b1ef5543bb75c479a53d53362ecccba3f1a5de6453faca"}, + {file = "rcssmin-1.1.2-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:c9a55657a3d11c5901259b14f941ed7eec118cd5a4416535102eda491de6753f"}, + {file = "rcssmin-1.1.2-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:065b7f85902c87011951b1d084fa694099d70feb6bef1c3e89456a1a0668c73b"}, + {file = "rcssmin-1.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b37db48eacf5b8ad09ee14eb25db8cc7176ce2339c1028499547858c152a936a"}, + {file = "rcssmin-1.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f1468ccbfe16a2b4cff5bc0d330488bb496f71b542d26bd2005b2ab05a295752"}, + {file = "rcssmin-1.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b3577e4955b89324cd8214ae8e9c2ce452197ea2f789527538cf41e662930495"}, + {file = "rcssmin-1.1.2-cp311-cp311-manylinux1_i686.whl", hash = "sha256:83dd2c3f7b70fae9c97bab99fd7a709dc852f0bc3e7482f8cfb378e0c5f1aed8"}, + {file = "rcssmin-1.1.2-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:2219d704f27006ecd17ef4b5744cac5f68a276be0889b114130660fb798f3583"}, + {file = "rcssmin-1.1.2-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:a5e758c8db03a57fef847542bf14d96da75913cc0e2495540c018943c1f2d142"}, + {file = "rcssmin-1.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a0e353ecbfde3dba0a6579a674fc1dcdc1ff7e47ceff3b29beb6e235b53a981c"}, + {file = "rcssmin-1.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:140d1c0ba21fb8c3a2bafae164540a6816e8ec3492bea6ace0c52eebd2cf303f"}, + {file = "rcssmin-1.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef0d472d8f6b8271fef3e388f98085a257703a635556a3ea77287616ab594ea9"}, + {file = "rcssmin-1.1.2-cp312-cp312-manylinux1_i686.whl", hash = "sha256:e58a54e63f79c996284240ec2dfb2992e8b90ad8941b1c70997e256b65940de7"}, + {file = "rcssmin-1.1.2-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:657324bfb76fa9e97badabe26af97a1622446f33c9073dd0510c7c7e8c7b96da"}, + {file = "rcssmin-1.1.2-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:fdffd58868a752cac0400249ce21bddf55e00d3206f8885d4a3aca1dab487070"}, + {file = "rcssmin-1.1.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:82aad2c3526055956fba537ab067ad937b3f57a1bd13c89bf691fced9c24c89d"}, + {file = "rcssmin-1.1.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3a860a1f4304e9813900f70fe6b1d429aff73a6fa30ef07f345f68d0a4e33abc"}, + {file = "rcssmin-1.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0451a2c7e7c1ff893ecb7820de862f2ea6336cc69d473ecb0206212e49c817fc"}, + {file = "rcssmin-1.1.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:283b5931eb25e159c0c37bba0717cf3ada2ff77a2827337790cd3921d33ae1eb"}, + {file = "rcssmin-1.1.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4cf7de426fbcce30df31261c1ce84d06fb2ae2f239b0c16ab7e9e083e0462432"}, + {file = "rcssmin-1.1.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:47d4d5d67f9ab8f18a6412f8eff843612ebddfff131260fd25a0b273a3d3b1a0"}, + {file = "rcssmin-1.1.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:ce4fce4b3f0cf3621f13f6b8aebbe6c90de3587e383d13dbc7c4c1576f27fda8"}, + {file = "rcssmin-1.1.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:3ab50d50ecbfa41d8984b545871df447c90a0c55e16a594e0c97057eb694a7af"}, + {file = "rcssmin-1.1.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8eddfed4ac175a97eb228a289f820ff1bffcc3db7c63345e4590a49de7051244"}, + {file = "rcssmin-1.1.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:bc2d0ccf449f3f4c385789c9e7898f77fa40f88211cc7d385502f5ea11bc36f4"}, + {file = "rcssmin-1.1.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:754c3cab791da42cabfd430289dd991183d2e97f6c36a758ac4fd83c6998cb77"}, + {file = "rcssmin-1.1.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:997d3f6defd707f8a7bd39cedb765cedbf9c790ed0bc1f1c8fb65f4026007021"}, + {file = "rcssmin-1.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9c9688d42654f06535a2a052a0c2f02989b9052149f6cd3263ed320a10379657"}, + {file = "rcssmin-1.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a8856db4529e524a632478d88f34d075ec7e772804257d9b99071b8bdd5f3733"}, + {file = "rcssmin-1.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d59a28d6819ad43ed660dfcdf297593f04e8bc227d7abd9548f12a16d6e645f1"}, + {file = "rcssmin-1.1.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:d1c9efc26682ff610194a0c56b0f192355136e066ff78683806778f0bc5e5093"}, + {file = "rcssmin-1.1.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:e5f08c79991c8ee0aa7064aa58ae92b0811d4a84948636ec0219b39d257470aa"}, + {file = "rcssmin-1.1.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2d39b277a568f6208a4beea237c2d1188bd680deaff39f3742278462645a87ed"}, + {file = "rcssmin-1.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2b6a19926f7257ebb7d23040bb0ace05fa43dff7b60d8a9c35bfdf551fa57686"}, + {file = "rcssmin-1.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:69283a445483ac439af10ca9f50463c3770ef79a99833af7d5105c75f8ab3c5d"}, + {file = "rcssmin-1.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a8e4c1bfa110d450970df60d904feab71c287e777a3cf522fd20e766483c8ce4"}, + {file = "rcssmin-1.1.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:19e48f7f66a3fa329215a02b3a952737b0b12f9976cd79ff2c236f96960d71d1"}, + {file = "rcssmin-1.1.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:e3ad642a1bfcbbddc3c36ad4c5676ef53267dd7c193c746a2f6670fe5bd03a60"}, + {file = "rcssmin-1.1.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:20f8592341960b031967f7ada165e6c8077dfc01eb4092fb970a5a4e64506695"}, + {file = "rcssmin-1.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1c1d9a24132f4c48d080a59c20fce99a4fd9c393eb63f9779f2497ae28992de1"}, + {file = "rcssmin-1.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:50576521c1e08e8f137225b8a6e8ae88e867f53dfd82c537616591c67f112aad"}, + {file = "rcssmin-1.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f363c9d242e1afce4fafbbf6bed52452464b19199e66075bed606764f31ca329"}, + {file = "rcssmin-1.1.2.tar.gz", hash = "sha256:bc75eb75bd6d345c0c51fd80fc487ddd6f9fd409dd7861b3fe98dee85018e1e9"}, ] [[package]] @@ -3066,101 +3197,101 @@ rpds-py = ">=0.7.0" [[package]] name = "regex" -version = "2024.5.10" +version = "2024.5.15" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" files = [ - {file = "regex-2024.5.10-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:eda3dd46df535da787ffb9036b5140f941ecb91701717df91c9daf64cabef953"}, - {file = "regex-2024.5.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1d5bd666466c8f00a06886ce1397ba8b12371c1f1c6d1bef11013e9e0a1464a8"}, - {file = "regex-2024.5.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:32e5f3b8e32918bfbdd12eca62e49ab3031125c454b507127ad6ecbd86e62fca"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:534efd2653ebc4f26fc0e47234e53bf0cb4715bb61f98c64d2774a278b58c846"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:193b7c6834a06f722f0ce1ba685efe80881de7c3de31415513862f601097648c"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:160ba087232c5c6e2a1e7ad08bd3a3f49b58c815be0504d8c8aacfb064491cd8"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:951be1eae7b47660412dc4938777a975ebc41936d64e28081bf2e584b47ec246"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8a0f0ab5453e409586b11ebe91c672040bc804ca98d03a656825f7890cbdf88"}, - {file = "regex-2024.5.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e6d4d6ae1827b2f8c7200aaf7501c37cf3f3896c86a6aaf2566448397c823dd"}, - {file = "regex-2024.5.10-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:161a206c8f3511e2f5fafc9142a2cc25d7fe9a1ec5ad9b4ad2496a7c33e1c5d2"}, - {file = "regex-2024.5.10-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:44b3267cea873684af022822195298501568ed44d542f9a2d9bebc0212e99069"}, - {file = "regex-2024.5.10-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:560278c9975694e1f0bc50da187abf2cdc1e4890739ea33df2bc4a85eeef143e"}, - {file = "regex-2024.5.10-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:70364a097437dd0a90b31cd77f09f7387ad9ac60ef57590971f43b7fca3082a5"}, - {file = "regex-2024.5.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:42be5de7cc8c1edac55db92d82b68dc8e683b204d6f5414c5a51997a323d7081"}, - {file = "regex-2024.5.10-cp310-cp310-win32.whl", hash = "sha256:9a8625849387b9d558d528e263ecc9c0fbde86cfa5c2f0eef43fff480ae24d71"}, - {file = "regex-2024.5.10-cp310-cp310-win_amd64.whl", hash = "sha256:903350bf44d7e4116b4d5898b30b15755d61dcd3161e3413a49c7db76f0bee5a"}, - {file = "regex-2024.5.10-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bf9596cba92ce7b1fd32c7b07c6e3212c7eed0edc271757e48bfcd2b54646452"}, - {file = "regex-2024.5.10-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:45cc13d398b6359a7708986386f72bd156ae781c3e83a68a6d4cee5af04b1ce9"}, - {file = "regex-2024.5.10-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ad45f3bccfcb00868f2871dce02a755529838d2b86163ab8a246115e80cfb7d6"}, - {file = "regex-2024.5.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33d19f0cde6838c81acffff25c7708e4adc7dd02896c9ec25c3939b1500a1778"}, - {file = "regex-2024.5.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0a9f89d7db5ef6bdf53e5cc8e6199a493d0f1374b3171796b464a74ebe8e508a"}, - {file = "regex-2024.5.10-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c6c71cf92b09e5faa72ea2c68aa1f61c9ce11cb66fdc5069d712f4392ddfd00"}, - {file = "regex-2024.5.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7467ad8b0eac0b28e52679e972b9b234b3de0ea5cee12eb50091d2b68145fe36"}, - {file = "regex-2024.5.10-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bc0db93ad039fc2fe32ccd3dd0e0e70c4f3d6e37ae83f0a487e1aba939bd2fbd"}, - {file = "regex-2024.5.10-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fa9335674d7c819674467c7b46154196c51efbaf5f5715187fd366814ba3fa39"}, - {file = "regex-2024.5.10-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7dda3091838206969c2b286f9832dff41e2da545b99d1cfaea9ebd8584d02708"}, - {file = "regex-2024.5.10-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:504b5116e2bd1821efd815941edff7535e93372a098e156bb9dffde30264e798"}, - {file = "regex-2024.5.10-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:91b53dea84415e8115506cc62e441a2b54537359c63d856d73cb1abe05af4c9a"}, - {file = "regex-2024.5.10-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1a3903128f9e17a500618e80c68165c78c741ebb17dd1a0b44575f92c3c68b02"}, - {file = "regex-2024.5.10-cp311-cp311-win32.whl", hash = "sha256:236cace6c1903effd647ed46ce6dd5d76d54985fc36dafc5256032886736c85d"}, - {file = "regex-2024.5.10-cp311-cp311-win_amd64.whl", hash = "sha256:12446827f43c7881decf2c126762e11425de5eb93b3b0d8b581344c16db7047a"}, - {file = "regex-2024.5.10-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:14905ed75c7a6edf423eb46c213ed3f4507c38115f1ed3c00f4ec9eafba50e58"}, - {file = "regex-2024.5.10-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4fad420b14ae1970a1f322e8ae84a1d9d89375eb71e1b504060ab2d1bfe68f3c"}, - {file = "regex-2024.5.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c46a76a599fcbf95f98755275c5527304cc4f1bb69919434c1e15544d7052910"}, - {file = "regex-2024.5.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0faecb6d5779753a6066a3c7a0471a8d29fe25d9981ca9e552d6d1b8f8b6a594"}, - {file = "regex-2024.5.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aab65121229c2ecdf4a31b793d99a6a0501225bd39b616e653c87b219ed34a49"}, - {file = "regex-2024.5.10-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:50e7e96a527488334379e05755b210b7da4a60fc5d6481938c1fa053e0c92184"}, - {file = "regex-2024.5.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba034c8db4b264ef1601eb33cd23d87c5013b8fb48b8161debe2e5d3bd9156b0"}, - {file = "regex-2024.5.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:031219782d97550c2098d9a68ce9e9eaefe67d2d81d8ff84c8354f9c009e720c"}, - {file = "regex-2024.5.10-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:62b5f7910b639f3c1d122d408421317c351e213ca39c964ad4121f27916631c6"}, - {file = "regex-2024.5.10-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:cd832bd9b6120d6074f39bdfbb3c80e416848b07ac72910f1c7f03131a6debc3"}, - {file = "regex-2024.5.10-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:e91b1976358e17197157b405cab408a5f4e33310cda211c49fc6da7cffd0b2f0"}, - {file = "regex-2024.5.10-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:571452362d552de508c37191b6abbbb660028b8b418e2d68c20779e0bc8eaaa8"}, - {file = "regex-2024.5.10-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5253dcb0bfda7214523de58b002eb0090cb530d7c55993ce5f6d17faf953ece7"}, - {file = "regex-2024.5.10-cp312-cp312-win32.whl", hash = "sha256:2f30a5ab8902f93930dc6f627c4dd5da2703333287081c85cace0fc6e21c25af"}, - {file = "regex-2024.5.10-cp312-cp312-win_amd64.whl", hash = "sha256:3799e36d60a35162bb35b2246d8bb012192b7437dff807ef79c14e7352706306"}, - {file = "regex-2024.5.10-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:bbdc5db2c98ac2bf1971ffa1410c87ca7a15800415f788971e8ba8520fc0fda9"}, - {file = "regex-2024.5.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6ccdeef4584450b6f0bddd5135354908dacad95425fcb629fe36d13e48b60f32"}, - {file = "regex-2024.5.10-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:29d839829209f3c53f004e1de8c3113efce6d98029f044fa5cfee666253ee7e6"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0709ba544cf50bd5cb843df4b8bb6701bae2b70a8e88da9add8386cbca5c1385"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:972b49f2fe1047b9249c958ec4fa1bdd2cf8ce305dc19d27546d5a38e57732d8"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cdbb1998da94607d5eec02566b9586f0e70d6438abf1b690261aac0edda7ab6"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf7c8ee4861d9ef5b1120abb75846828c811f932d63311596ad25fa168053e00"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d35d4cc9270944e95f9c88af757b0c9fc43f396917e143a5756608462c5223b"}, - {file = "regex-2024.5.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8722f72068b3e1156a4b2e1afde6810f1fc67155a9fa30a4b9d5b4bc46f18fb0"}, - {file = "regex-2024.5.10-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:696639a73ca78a380acfaa0a1f6dd8220616a99074c05bba9ba8bb916914b224"}, - {file = "regex-2024.5.10-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea057306ab469130167014b662643cfaed84651c792948891d003cf0039223a5"}, - {file = "regex-2024.5.10-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b43b78f9386d3d932a6ce5af4b45f393d2e93693ee18dc4800d30a8909df700e"}, - {file = "regex-2024.5.10-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:c43395a3b7cc9862801a65c6994678484f186ce13c929abab44fb8a9e473a55a"}, - {file = "regex-2024.5.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0bc94873ba11e34837bffd7e5006703abeffc4514e2f482022f46ce05bd25e67"}, - {file = "regex-2024.5.10-cp38-cp38-win32.whl", hash = "sha256:1118ba9def608250250f4b3e3f48c62f4562ba16ca58ede491b6e7554bfa09ff"}, - {file = "regex-2024.5.10-cp38-cp38-win_amd64.whl", hash = "sha256:458d68d34fb74b906709735c927c029e62f7d06437a98af1b5b6258025223210"}, - {file = "regex-2024.5.10-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:15e593386ec6331e0ab4ac0795b7593f02ab2f4b30a698beb89fbdc34f92386a"}, - {file = "regex-2024.5.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ca23b41355ba95929e9505ee04e55495726aa2282003ed9b012d86f857d3e49b"}, - {file = "regex-2024.5.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2c8982ee19ccecabbaeac1ba687bfef085a6352a8c64f821ce2f43e6d76a9298"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7117cb7d6ac7f2e985f3d18aa8a1728864097da1a677ffa69e970ca215baebf1"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b66421f8878a0c82fc0c272a43e2121c8d4c67cb37429b764f0d5ad70b82993b"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:224a9269f133564109ce668213ef3cb32bc72ccf040b0b51c72a50e569e9dc9e"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab98016541543692a37905871a5ffca59b16e08aacc3d7d10a27297b443f572d"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:51d27844763c273a122e08a3e86e7aefa54ee09fb672d96a645ece0454d8425e"}, - {file = "regex-2024.5.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:853cc36e756ff673bf984e9044ccc8fad60b95a748915dddeab9488aea974c73"}, - {file = "regex-2024.5.10-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4e7eaf9df15423d07b6050fb91f86c66307171b95ea53e2d87a7993b6d02c7f7"}, - {file = "regex-2024.5.10-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:169fd0acd7a259f58f417e492e93d0e15fc87592cd1e971c8c533ad5703b5830"}, - {file = "regex-2024.5.10-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:334b79ce9c08f26b4659a53f42892793948a613c46f1b583e985fd5a6bf1c149"}, - {file = "regex-2024.5.10-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:f03b1dbd4d9596dd84955bb40f7d885204d6aac0d56a919bb1e0ff2fb7e1735a"}, - {file = "regex-2024.5.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfa6d61a76c77610ba9274c1a90a453062bdf6887858afbe214d18ad41cf6bde"}, - {file = "regex-2024.5.10-cp39-cp39-win32.whl", hash = "sha256:249fbcee0a277c32a3ce36d8e36d50c27c968fdf969e0fbe342658d4e010fbc8"}, - {file = "regex-2024.5.10-cp39-cp39-win_amd64.whl", hash = "sha256:0ce56a923f4c01d7568811bfdffe156268c0a7aae8a94c902b92fe34c4bde785"}, - {file = "regex-2024.5.10.tar.gz", hash = "sha256:304e7e2418146ae4d0ef0e9ffa28f881f7874b45b4994cc2279b21b6e7ae50c8"}, + {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a81e3cfbae20378d75185171587cbf756015ccb14840702944f014e0d93ea09f"}, + {file = "regex-2024.5.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7b59138b219ffa8979013be7bc85bb60c6f7b7575df3d56dc1e403a438c7a3f6"}, + {file = "regex-2024.5.15-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a0bd000c6e266927cb7a1bc39d55be95c4b4f65c5be53e659537537e019232b1"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eaa7ddaf517aa095fa8da0b5015c44d03da83f5bd49c87961e3c997daed0de7"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba68168daedb2c0bab7fd7e00ced5ba90aebf91024dea3c88ad5063c2a562cca"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e8d717bca3a6e2064fc3a08df5cbe366369f4b052dcd21b7416e6d71620dca1"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1337b7dbef9b2f71121cdbf1e97e40de33ff114801263b275aafd75303bd62b5"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f9ebd0a36102fcad2f03696e8af4ae682793a5d30b46c647eaf280d6cfb32796"}, + {file = "regex-2024.5.15-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9efa1a32ad3a3ea112224897cdaeb6aa00381627f567179c0314f7b65d354c62"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1595f2d10dff3d805e054ebdc41c124753631b6a471b976963c7b28543cf13b0"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b802512f3e1f480f41ab5f2cfc0e2f761f08a1f41092d6718868082fc0d27143"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a0981022dccabca811e8171f913de05720590c915b033b7e601f35ce4ea7019f"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:19068a6a79cf99a19ccefa44610491e9ca02c2be3305c7760d3831d38a467a6f"}, + {file = "regex-2024.5.15-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1b5269484f6126eee5e687785e83c6b60aad7663dafe842b34691157e5083e53"}, + {file = "regex-2024.5.15-cp310-cp310-win32.whl", hash = "sha256:ada150c5adfa8fbcbf321c30c751dc67d2f12f15bd183ffe4ec7cde351d945b3"}, + {file = "regex-2024.5.15-cp310-cp310-win_amd64.whl", hash = "sha256:ac394ff680fc46b97487941f5e6ae49a9f30ea41c6c6804832063f14b2a5a145"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f5b1dff3ad008dccf18e652283f5e5339d70bf8ba7c98bf848ac33db10f7bc7a"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c6a2b494a76983df8e3d3feea9b9ffdd558b247e60b92f877f93a1ff43d26656"}, + {file = "regex-2024.5.15-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a32b96f15c8ab2e7d27655969a23895eb799de3665fa94349f3b2fbfd547236f"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10002e86e6068d9e1c91eae8295ef690f02f913c57db120b58fdd35a6bb1af35"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ec54d5afa89c19c6dd8541a133be51ee1017a38b412b1321ccb8d6ddbeb4cf7d"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10e4ce0dca9ae7a66e6089bb29355d4432caed736acae36fef0fdd7879f0b0cb"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e507ff1e74373c4d3038195fdd2af30d297b4f0950eeda6f515ae3d84a1770f"}, + {file = "regex-2024.5.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1f059a4d795e646e1c37665b9d06062c62d0e8cc3c511fe01315973a6542e40"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0721931ad5fe0dda45d07f9820b90b2148ccdd8e45bb9e9b42a146cb4f695649"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:833616ddc75ad595dee848ad984d067f2f31be645d603e4d158bba656bbf516c"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:287eb7f54fc81546346207c533ad3c2c51a8d61075127d7f6d79aaf96cdee890"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:19dfb1c504781a136a80ecd1fff9f16dddf5bb43cec6871778c8a907a085bb3d"}, + {file = "regex-2024.5.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:119af6e56dce35e8dfb5222573b50c89e5508d94d55713c75126b753f834de68"}, + {file = "regex-2024.5.15-cp311-cp311-win32.whl", hash = "sha256:1c1c174d6ec38d6c8a7504087358ce9213d4332f6293a94fbf5249992ba54efa"}, + {file = "regex-2024.5.15-cp311-cp311-win_amd64.whl", hash = "sha256:9e717956dcfd656f5055cc70996ee2cc82ac5149517fc8e1b60261b907740201"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:632b01153e5248c134007209b5c6348a544ce96c46005d8456de1d552455b014"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e64198f6b856d48192bf921421fdd8ad8eb35e179086e99e99f711957ffedd6e"}, + {file = "regex-2024.5.15-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:68811ab14087b2f6e0fc0c2bae9ad689ea3584cad6917fc57be6a48bbd012c49"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8ec0c2fea1e886a19c3bee0cd19d862b3aa75dcdfb42ebe8ed30708df64687a"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0c0c0003c10f54a591d220997dd27d953cd9ccc1a7294b40a4be5312be8797b"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2431b9e263af1953c55abbd3e2efca67ca80a3de8a0437cb58e2421f8184717a"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a605586358893b483976cffc1723fb0f83e526e8f14c6e6614e75919d9862cf"}, + {file = "regex-2024.5.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391d7f7f1e409d192dba8bcd42d3e4cf9e598f3979cdaed6ab11288da88cb9f2"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9ff11639a8d98969c863d4617595eb5425fd12f7c5ef6621a4b74b71ed8726d5"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4eee78a04e6c67e8391edd4dad3279828dd66ac4b79570ec998e2155d2e59fd5"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8fe45aa3f4aa57faabbc9cb46a93363edd6197cbc43523daea044e9ff2fea83e"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0a3d8d6acf0c78a1fff0e210d224b821081330b8524e3e2bc5a68ef6ab5803d"}, + {file = "regex-2024.5.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c486b4106066d502495b3025a0a7251bf37ea9540433940a23419461ab9f2a80"}, + {file = "regex-2024.5.15-cp312-cp312-win32.whl", hash = "sha256:c49e15eac7c149f3670b3e27f1f28a2c1ddeccd3a2812cba953e01be2ab9b5fe"}, + {file = "regex-2024.5.15-cp312-cp312-win_amd64.whl", hash = "sha256:673b5a6da4557b975c6c90198588181029c60793835ce02f497ea817ff647cb2"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:87e2a9c29e672fc65523fb47a90d429b70ef72b901b4e4b1bd42387caf0d6835"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c3bea0ba8b73b71b37ac833a7f3fd53825924165da6a924aec78c13032f20850"}, + {file = "regex-2024.5.15-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bfc4f82cabe54f1e7f206fd3d30fda143f84a63fe7d64a81558d6e5f2e5aaba9"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5bb9425fe881d578aeca0b2b4b3d314ec88738706f66f219c194d67179337cb"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64c65783e96e563103d641760664125e91bd85d8e49566ee560ded4da0d3e704"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cf2430df4148b08fb4324b848672514b1385ae3807651f3567871f130a728cc3"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5397de3219a8b08ae9540c48f602996aa6b0b65d5a61683e233af8605c42b0f2"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:455705d34b4154a80ead722f4f185b04c4237e8e8e33f265cd0798d0e44825fa"}, + {file = "regex-2024.5.15-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b2b6f1b3bb6f640c1a92be3bbfbcb18657b125b99ecf141fb3310b5282c7d4ed"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3ad070b823ca5890cab606c940522d05d3d22395d432f4aaaf9d5b1653e47ced"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5b5467acbfc153847d5adb21e21e29847bcb5870e65c94c9206d20eb4e99a384"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:e6662686aeb633ad65be2a42b4cb00178b3fbf7b91878f9446075c404ada552f"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:2b4c884767504c0e2401babe8b5b7aea9148680d2e157fa28f01529d1f7fcf67"}, + {file = "regex-2024.5.15-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3cd7874d57f13bf70078f1ff02b8b0aa48d5b9ed25fc48547516c6aba36f5741"}, + {file = "regex-2024.5.15-cp38-cp38-win32.whl", hash = "sha256:e4682f5ba31f475d58884045c1a97a860a007d44938c4c0895f41d64481edbc9"}, + {file = "regex-2024.5.15-cp38-cp38-win_amd64.whl", hash = "sha256:d99ceffa25ac45d150e30bd9ed14ec6039f2aad0ffa6bb87a5936f5782fc1569"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:13cdaf31bed30a1e1c2453ef6015aa0983e1366fad2667657dbcac7b02f67133"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cac27dcaa821ca271855a32188aa61d12decb6fe45ffe3e722401fe61e323cd1"}, + {file = "regex-2024.5.15-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7dbe2467273b875ea2de38ded4eba86cbcbc9a1a6d0aa11dcf7bd2e67859c435"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f18a9a3513a99c4bef0e3efd4c4a5b11228b48aa80743be822b71e132ae4f5"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d347a741ea871c2e278fde6c48f85136c96b8659b632fb57a7d1ce1872547600"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1878b8301ed011704aea4c806a3cadbd76f84dece1ec09cc9e4dc934cfa5d4da"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4babf07ad476aaf7830d77000874d7611704a7fcf68c9c2ad151f5d94ae4bfc4"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35cb514e137cb3488bce23352af3e12fb0dbedd1ee6e60da053c69fb1b29cc6c"}, + {file = "regex-2024.5.15-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cdd09d47c0b2efee9378679f8510ee6955d329424c659ab3c5e3a6edea696294"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:72d7a99cd6b8f958e85fc6ca5b37c4303294954eac1376535b03c2a43eb72629"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:a094801d379ab20c2135529948cb84d417a2169b9bdceda2a36f5f10977ebc16"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c0c18345010870e58238790a6779a1219b4d97bd2e77e1140e8ee5d14df071aa"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:16093f563098448ff6b1fa68170e4acbef94e6b6a4e25e10eae8598bb1694b5d"}, + {file = "regex-2024.5.15-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:e38a7d4e8f633a33b4c7350fbd8bad3b70bf81439ac67ac38916c4a86b465456"}, + {file = "regex-2024.5.15-cp39-cp39-win32.whl", hash = "sha256:71a455a3c584a88f654b64feccc1e25876066c4f5ef26cd6dd711308aa538694"}, + {file = "regex-2024.5.15-cp39-cp39-win_amd64.whl", hash = "sha256:cab12877a9bdafde5500206d1020a584355a97884dfd388af3699e9137bf7388"}, + {file = "regex-2024.5.15.tar.gz", hash = "sha256:d3ee02d9e5f482cc8309134a91eeaacbdd2261ba111b0fef3748eeb4913e6a2c"}, ] [[package]] name = "requests" -version = "2.31.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -3175,153 +3306,177 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rjsmin" -version = "1.2.1" +version = "1.2.2" description = "Javascript Minifier" optional = false python-versions = "*" files = [ - {file = "rjsmin-1.2.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:35827844d2085bd59d34214dfba6f1fc42a215c455887437b07dbf9c73019cc1"}, - {file = "rjsmin-1.2.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:812af25c08d6a5ae98019a2e1b47ebb47f7469abd351670c353d619eaeae4064"}, - {file = "rjsmin-1.2.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:b8464629a18fe69f70677854c93a3707976024b226a0ce62707c618f923e1346"}, - {file = "rjsmin-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bd1faedc425006d9e86b23837d164f01d105b7a8b66b767a9766d0014773db2a"}, - {file = "rjsmin-1.2.1-cp310-cp310-manylinux1_i686.whl", hash = "sha256:99c074cd6a8302ff47118a9c3d086f89328dc8e5c4b105aa1f348fb85c765a30"}, - {file = "rjsmin-1.2.1-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:bc5bc2f94e59bc81562c572b7f1bdd6bcec4f61168dc68a2993bad2d355b6e19"}, - {file = "rjsmin-1.2.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:35f21046504544e2941e04190ce24161255479133751550e36ddb3f4af0ecdca"}, - {file = "rjsmin-1.2.1-cp311-cp311-manylinux1_i686.whl", hash = "sha256:ca90630b84fe94bb07739c3e3793e87d30c6ee450dde08653121f0d9153c8d0d"}, - {file = "rjsmin-1.2.1-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:7dd58b5ed88233bc61dc80b0ed87b93a1786031d9977c70d335221ef1ac5581a"}, - {file = "rjsmin-1.2.1-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:f0895b360dccf7e2d6af8762a52985e3fbaa56778de1bf6b20dbc96134253807"}, - {file = "rjsmin-1.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:747bc9d3bc8a220f40858e6aad50b2ae2eb7f69c924d4fa3803b81be1c1ddd02"}, - {file = "rjsmin-1.2.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:f7cd33602ec0f393a0058e883284496bb4dbbdd34e0bbe23b594c8933ddf9b65"}, - {file = "rjsmin-1.2.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:3453ee6d5e7a2723ec45c2909e2382371783400e8d51952b692884c6d850a3d0"}, - {file = "rjsmin-1.2.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:8c340e251619c97571a5ade20f147f1f7e8664f66a2d6d7319e05e3ef6a4423c"}, - {file = "rjsmin-1.2.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:145c6af8df42d8af102d0d39a6de2e5fa66aef9e38947cfb9d65377d1b9940b2"}, - {file = "rjsmin-1.2.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:bbd7a0abaa394afd951f5d4e05249d306fec1c9674bfee179787674dddd0bdb7"}, - {file = "rjsmin-1.2.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:eb770aaf637919b0011c4eb87b9ac6317079fb9800eb17c90dda05fc9de4ebc3"}, - {file = "rjsmin-1.2.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:5d67ec09da46a492186e35cabca02a0d092eda5ef5b408a419b99ee4acf28d5c"}, - {file = "rjsmin-1.2.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:d332e44a1b21ad63401cc7eebc81157e3d982d5fb503bb4faaea5028068d71e9"}, - {file = "rjsmin-1.2.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:113132a40ce7d03b2ced4fac215f0297338ed1c207394b739266efab7831988b"}, - {file = "rjsmin-1.2.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:122aa52bcf7ad9f12728d309012d1308c6ecfe4d6b09ea867a110dcad7b7728c"}, - {file = "rjsmin-1.2.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:8a6710e358c661dcdcfd027e67de3afd72a6af4c88101dcf110de39e9bbded39"}, - {file = "rjsmin-1.2.1.tar.gz", hash = "sha256:1f982be8e011438777a94307279b40134a3935fc0f079312ee299725b8af5411"}, + {file = "rjsmin-1.2.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:4420107304ba7a00b5b9b56cdcd166b9876b34e626829fc4552c85d8fdc3737a"}, + {file = "rjsmin-1.2.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:155a2f3312c1f8c6cec7b5080581cafc761dc0e41d64bfb5d46a772c5230ded8"}, + {file = "rjsmin-1.2.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:88fcb58d65f88cbfa752d51c1ebe5845553f9706def6d9671e98283411575e3e"}, + {file = "rjsmin-1.2.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:6eae13608b88f4ce32e0557c8fdef58e69bb4d293182202a03e800f0d33b5268"}, + {file = "rjsmin-1.2.2-cp310-cp310-manylinux1_i686.whl", hash = "sha256:81f92fb855fb613ebd04a6d6d46483e71fe3c4f22042dc30dcc938fbd748e59c"}, + {file = "rjsmin-1.2.2-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:897db9bf25538047e9388951d532dc291a629b5d041180a8a1a8c102e9d44b90"}, + {file = "rjsmin-1.2.2-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:5938af8c46734f92f74fdc4d0b6324137c0e09f0a8c3825c83e4cfca1b532e40"}, + {file = "rjsmin-1.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0424a7b9096fa2b0ab577c4dc7acd683e6cfb5c718ad39a9fb293cb6cbaba95b"}, + {file = "rjsmin-1.2.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:1714ed93c2bd40c5f970905d2eeda4a6844e09087ae11277d4d43b3e68c32a47"}, + {file = "rjsmin-1.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:35596fa6d2d44a5471715c464657123995da78aa6f79bccfbb4b8d6ff7d0a4b4"}, + {file = "rjsmin-1.2.2-cp311-cp311-manylinux1_i686.whl", hash = "sha256:3968667158948355b9a62e9641497aac7ac069c076a595e93199d0fe3a40217a"}, + {file = "rjsmin-1.2.2-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:d07d14354694f6a47f572f2aa2a1ad74b76723e62a0d2b6df796138b71888247"}, + {file = "rjsmin-1.2.2-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:a78dfa6009235b902454ac53264252b7b94f1e43e3a9e97c4cadae88e409b882"}, + {file = "rjsmin-1.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9b7a45001e58243a455d11d2de925cadb8c2a0dc737001de646a0f4d90cf0034"}, + {file = "rjsmin-1.2.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:86c5e657b74b6c9482bb96f18a79d61750f4e8204759cce179f7eb17d395c683"}, + {file = "rjsmin-1.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8c2c30b86c7232443a4a726e1bbee34f800556e581e95fc07194ecbf8e02d1d2"}, + {file = "rjsmin-1.2.2-cp312-cp312-manylinux1_i686.whl", hash = "sha256:8982c3ef27fac26dd6b7d0c55ae98fa550fee72da2db010b87211e4b5dd78a67"}, + {file = "rjsmin-1.2.2-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:3fc27ae4ece99e2c994cd79df2f0d3f7ac650249f632d19aa8ce85118e33bf0f"}, + {file = "rjsmin-1.2.2-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:41113d8d6cae7f7406b30143cc49cc045bbb3fadc2f28df398cea30e1daa60b1"}, + {file = "rjsmin-1.2.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3aa09a89b2b7aa2b9251329fe0c3e36c2dc2f10f78b8811e5be92a072596348b"}, + {file = "rjsmin-1.2.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:5abb8d1241f4ea97950b872fa97a422ba8413fe02358f64128ff0cf745017f07"}, + {file = "rjsmin-1.2.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5abc686a9ef7eaf208f9ad1fb5fb949556ecb7cc1fee27290eb7f194e01d97bd"}, + {file = "rjsmin-1.2.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:076adcf04c34f712c9427fd9ba6a75bbf7aab975650dfc78cbdd0fbdbe49ca63"}, + {file = "rjsmin-1.2.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8cb8947ddd250fce58261b0357846cd5d55419419c0f7dfb131dc4b733579a26"}, + {file = "rjsmin-1.2.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9069c48b6508b9c5b05435e2c6042c2a0e2f97b35d7b9c27ceaea5fd377ffdc5"}, + {file = "rjsmin-1.2.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:02b61cf9b6bc518fdac667f3ca3dab051cb8bd1bf4cba28b6d29153ec27990ad"}, + {file = "rjsmin-1.2.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:09eca8581797244587916e5e07e36c4c86d54a4b7e5c7697484a95b75803515d"}, + {file = "rjsmin-1.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:c52b9dd45c837f1c5c2e8d40776f9e63257f8dbd5f79b85f648cc70da6c1e4e9"}, + {file = "rjsmin-1.2.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:4fe4ce990412c053a6bcd47d55133927e22fd3d100233d73355f60f9053054c5"}, + {file = "rjsmin-1.2.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:aa883b9363b5134239066060879d5eb422a0d4ccf24ccf871f65a5b34c64926f"}, + {file = "rjsmin-1.2.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:6f4e95c5ac95b4cbb519917b3aa1d3d92fc6939c371637674c4a42b67b2b3f44"}, + {file = "rjsmin-1.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ae3cd64e18e62aa330b24dd6f7b9809ce0a694afd1f01fe99c21f9acd1cb0ea6"}, + {file = "rjsmin-1.2.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7999d797fcf805844d2d91598651785497249f592f31674da0964e794b3be019"}, + {file = "rjsmin-1.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e733fea039a7b5ad7c06cc8bf215ee7afac81d462e273b3ab55c1ccc906cf127"}, + {file = "rjsmin-1.2.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ccca74461bd53a99ff3304fcf299ea861df89846be3207329cb82d717ce47ea6"}, + {file = "rjsmin-1.2.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:88f59ad24f91bf9c25d5c2ca3c84a72eed0028f57a98e3b85a915ece5c25be1e"}, + {file = "rjsmin-1.2.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7a8b56fbd64adcc4402637f0e07b90b441e9981d720a10eb6265118018b42682"}, + {file = "rjsmin-1.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2c24686cfdf86e55692183f7867e72c9e982add479c244eda7b8390f96db2c6c"}, + {file = "rjsmin-1.2.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6c0d9f9ea8d9cd48cbcdc74a1c2e85d4d588af12bb8f0b672070ae7c9b6e6306"}, + {file = "rjsmin-1.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:27abd32c9f5b6e0c0a3bcad43e8e24108c6d6c13a4e6c50c97497ea2b4614bb4"}, + {file = "rjsmin-1.2.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:e0e009f6f8460901f5144b34ac2948f94af2f9b8c9b5425da705dbc8152c36c2"}, + {file = "rjsmin-1.2.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:41e6013cb37a5b3563c19aa35f8e659fa536aa4197a0e3b6a57a381638294a15"}, + {file = "rjsmin-1.2.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:62cbd38c9f5090f0a6378a45c415b4f96ae871216cedab0dfa21965620c0be4c"}, + {file = "rjsmin-1.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2fd5254d36f10a17564b63e8bf9ac579c7b5f211364e11e9753ff5b562843c67"}, + {file = "rjsmin-1.2.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6cf0309d001a0d45d731dbaab1afd0c23d135c9e029fe56c935c1798094686fc"}, + {file = "rjsmin-1.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bfbe333dab8d23f0a71da90e2d8e8b762a739cbd55a6f948b2dfda089b6d5853"}, + {file = "rjsmin-1.2.2.tar.gz", hash = "sha256:8c1bcd821143fecf23242012b55e13610840a839cd467b358f16359010d62dae"}, ] [[package]] name = "rpds-py" -version = "0.18.1" +version = "0.19.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" files = [ - {file = "rpds_py-0.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:d31dea506d718693b6b2cffc0648a8929bdc51c70a311b2770f09611caa10d53"}, - {file = "rpds_py-0.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:732672fbc449bab754e0b15356c077cc31566df874964d4801ab14f71951ea80"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a98a1f0552b5f227a3d6422dbd61bc6f30db170939bd87ed14f3c339aa6c7c9"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f1944ce16401aad1e3f7d312247b3d5de7981f634dc9dfe90da72b87d37887d"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38e14fb4e370885c4ecd734f093a2225ee52dc384b86fa55fe3f74638b2cfb09"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08d74b184f9ab6289b87b19fe6a6d1a97fbfea84b8a3e745e87a5de3029bf944"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d70129cef4a8d979caa37e7fe957202e7eee8ea02c5e16455bc9808a59c6b2f0"}, - {file = "rpds_py-0.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ce0bb20e3a11bd04461324a6a798af34d503f8d6f1aa3d2aa8901ceaf039176d"}, - {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:81c5196a790032e0fc2464c0b4ab95f8610f96f1f2fa3d4deacce6a79852da60"}, - {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f3027be483868c99b4985fda802a57a67fdf30c5d9a50338d9db646d590198da"}, - {file = "rpds_py-0.18.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d44607f98caa2961bab4fa3c4309724b185b464cdc3ba6f3d7340bac3ec97cc1"}, - {file = "rpds_py-0.18.1-cp310-none-win32.whl", hash = "sha256:c273e795e7a0f1fddd46e1e3cb8be15634c29ae8ff31c196debb620e1edb9333"}, - {file = "rpds_py-0.18.1-cp310-none-win_amd64.whl", hash = "sha256:8352f48d511de5f973e4f2f9412736d7dea76c69faa6d36bcf885b50c758ab9a"}, - {file = "rpds_py-0.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6b5ff7e1d63a8281654b5e2896d7f08799378e594f09cf3674e832ecaf396ce8"}, - {file = "rpds_py-0.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8927638a4d4137a289e41d0fd631551e89fa346d6dbcfc31ad627557d03ceb6d"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:154bf5c93d79558b44e5b50cc354aa0459e518e83677791e6adb0b039b7aa6a7"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07f2139741e5deb2c5154a7b9629bc5aa48c766b643c1a6750d16f865a82c5fc"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c7672e9fba7425f79019db9945b16e308ed8bc89348c23d955c8c0540da0a07"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:489bdfe1abd0406eba6b3bb4fdc87c7fa40f1031de073d0cfb744634cc8fa261"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c20f05e8e3d4fc76875fc9cb8cf24b90a63f5a1b4c5b9273f0e8225e169b100"}, - {file = "rpds_py-0.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:967342e045564cef76dfcf1edb700b1e20838d83b1aa02ab313e6a497cf923b8"}, - {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2cc7c1a47f3a63282ab0f422d90ddac4aa3034e39fc66a559ab93041e6505da7"}, - {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f7afbfee1157e0f9376c00bb232e80a60e59ed716e3211a80cb8506550671e6e"}, - {file = "rpds_py-0.18.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9e6934d70dc50f9f8ea47081ceafdec09245fd9f6032669c3b45705dea096b88"}, - {file = "rpds_py-0.18.1-cp311-none-win32.whl", hash = "sha256:c69882964516dc143083d3795cb508e806b09fc3800fd0d4cddc1df6c36e76bb"}, - {file = "rpds_py-0.18.1-cp311-none-win_amd64.whl", hash = "sha256:70a838f7754483bcdc830444952fd89645569e7452e3226de4a613a4c1793fb2"}, - {file = "rpds_py-0.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3dd3cd86e1db5aadd334e011eba4e29d37a104b403e8ca24dcd6703c68ca55b3"}, - {file = "rpds_py-0.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:05f3d615099bd9b13ecf2fc9cf2d839ad3f20239c678f461c753e93755d629ee"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35b2b771b13eee8729a5049c976197ff58a27a3829c018a04341bcf1ae409b2b"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ee17cd26b97d537af8f33635ef38be873073d516fd425e80559f4585a7b90c43"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b646bf655b135ccf4522ed43d6902af37d3f5dbcf0da66c769a2b3938b9d8184"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19ba472b9606c36716062c023afa2484d1e4220548751bda14f725a7de17b4f6"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e30ac5e329098903262dc5bdd7e2086e0256aa762cc8b744f9e7bf2a427d3f8"}, - {file = "rpds_py-0.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d58ad6317d188c43750cb76e9deacf6051d0f884d87dc6518e0280438648a9ac"}, - {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e1735502458621921cee039c47318cb90b51d532c2766593be6207eec53e5c4c"}, - {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f5bab211605d91db0e2995a17b5c6ee5edec1270e46223e513eaa20da20076ac"}, - {file = "rpds_py-0.18.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2fc24a329a717f9e2448f8cd1f960f9dac4e45b6224d60734edeb67499bab03a"}, - {file = "rpds_py-0.18.1-cp312-none-win32.whl", hash = "sha256:1805d5901779662d599d0e2e4159d8a82c0b05faa86ef9222bf974572286b2b6"}, - {file = "rpds_py-0.18.1-cp312-none-win_amd64.whl", hash = "sha256:720edcb916df872d80f80a1cc5ea9058300b97721efda8651efcd938a9c70a72"}, - {file = "rpds_py-0.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:c827576e2fa017a081346dce87d532a5310241648eb3700af9a571a6e9fc7e74"}, - {file = "rpds_py-0.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:aa3679e751408d75a0b4d8d26d6647b6d9326f5e35c00a7ccd82b78ef64f65f8"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0abeee75434e2ee2d142d650d1e54ac1f8b01e6e6abdde8ffd6eeac6e9c38e20"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed402d6153c5d519a0faf1bb69898e97fb31613b49da27a84a13935ea9164dfc"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:338dee44b0cef8b70fd2ef54b4e09bb1b97fc6c3a58fea5db6cc083fd9fc2724"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7750569d9526199c5b97e5a9f8d96a13300950d910cf04a861d96f4273d5b104"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:607345bd5912aacc0c5a63d45a1f73fef29e697884f7e861094e443187c02be5"}, - {file = "rpds_py-0.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:207c82978115baa1fd8d706d720b4a4d2b0913df1c78c85ba73fe6c5804505f0"}, - {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6d1e42d2735d437e7e80bab4d78eb2e459af48c0a46e686ea35f690b93db792d"}, - {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:5463c47c08630007dc0fe99fb480ea4f34a89712410592380425a9b4e1611d8e"}, - {file = "rpds_py-0.18.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:06d218939e1bf2ca50e6b0ec700ffe755e5216a8230ab3e87c059ebb4ea06afc"}, - {file = "rpds_py-0.18.1-cp38-none-win32.whl", hash = "sha256:312fe69b4fe1ffbe76520a7676b1e5ac06ddf7826d764cc10265c3b53f96dbe9"}, - {file = "rpds_py-0.18.1-cp38-none-win_amd64.whl", hash = "sha256:9437ca26784120a279f3137ee080b0e717012c42921eb07861b412340f85bae2"}, - {file = "rpds_py-0.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:19e515b78c3fc1039dd7da0a33c28c3154458f947f4dc198d3c72db2b6b5dc93"}, - {file = "rpds_py-0.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a7b28c5b066bca9a4eb4e2f2663012debe680f097979d880657f00e1c30875a0"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:673fdbbf668dd958eff750e500495ef3f611e2ecc209464f661bc82e9838991e"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d960de62227635d2e61068f42a6cb6aae91a7fe00fca0e3aeed17667c8a34611"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:352a88dc7892f1da66b6027af06a2e7e5d53fe05924cc2cfc56495b586a10b72"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e0ee01ad8260184db21468a6e1c37afa0529acc12c3a697ee498d3c2c4dcaf3"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4c39ad2f512b4041343ea3c7894339e4ca7839ac38ca83d68a832fc8b3748ab"}, - {file = "rpds_py-0.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aaa71ee43a703c321906813bb252f69524f02aa05bf4eec85f0c41d5d62d0f4c"}, - {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:6cd8098517c64a85e790657e7b1e509b9fe07487fd358e19431cb120f7d96338"}, - {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:4adec039b8e2928983f885c53b7cc4cda8965b62b6596501a0308d2703f8af1b"}, - {file = "rpds_py-0.18.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:32b7daaa3e9389db3695964ce8e566e3413b0c43e3394c05e4b243a4cd7bef26"}, - {file = "rpds_py-0.18.1-cp39-none-win32.whl", hash = "sha256:2625f03b105328729f9450c8badda34d5243231eef6535f80064d57035738360"}, - {file = "rpds_py-0.18.1-cp39-none-win_amd64.whl", hash = "sha256:bf18932d0003c8c4d51a39f244231986ab23ee057d235a12b2684ea26a353590"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cbfbea39ba64f5e53ae2915de36f130588bba71245b418060ec3330ebf85678e"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:a3d456ff2a6a4d2adcdf3c1c960a36f4fd2fec6e3b4902a42a384d17cf4e7a65"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7700936ef9d006b7ef605dc53aa364da2de5a3aa65516a1f3ce73bf82ecfc7ae"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:51584acc5916212e1bf45edd17f3a6b05fe0cbb40482d25e619f824dccb679de"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:942695a206a58d2575033ff1e42b12b2aece98d6003c6bc739fbf33d1773b12f"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b906b5f58892813e5ba5c6056d6a5ad08f358ba49f046d910ad992196ea61397"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f8e3fecca256fefc91bb6765a693d96692459d7d4c644660a9fff32e517843"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7732770412bab81c5a9f6d20aeb60ae943a9b36dcd990d876a773526468e7163"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:bd1105b50ede37461c1d51b9698c4f4be6e13e69a908ab7751e3807985fc0346"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:618916f5535784960f3ecf8111581f4ad31d347c3de66d02e728de460a46303c"}, - {file = "rpds_py-0.18.1-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:17c6d2155e2423f7e79e3bb18151c686d40db42d8645e7977442170c360194d4"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:6c4c4c3f878df21faf5fac86eda32671c27889e13570645a9eea0a1abdd50922"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:fab6ce90574645a0d6c58890e9bcaac8d94dff54fb51c69e5522a7358b80ab64"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:531796fb842b53f2695e94dc338929e9f9dbf473b64710c28af5a160b2a8927d"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:740884bc62a5e2bbb31e584f5d23b32320fd75d79f916f15a788d527a5e83644"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:998125738de0158f088aef3cb264a34251908dd2e5d9966774fdab7402edfab7"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e2be6e9dd4111d5b31ba3b74d17da54a8319d8168890fbaea4b9e5c3de630ae5"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d0cee71bc618cd93716f3c1bf56653740d2d13ddbd47673efa8bf41435a60daa"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2c3caec4ec5cd1d18e5dd6ae5194d24ed12785212a90b37f5f7f06b8bedd7139"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:27bba383e8c5231cd559affe169ca0b96ec78d39909ffd817f28b166d7ddd4d8"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:a888e8bdb45916234b99da2d859566f1e8a1d2275a801bb8e4a9644e3c7e7909"}, - {file = "rpds_py-0.18.1-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6031b25fb1b06327b43d841f33842b383beba399884f8228a6bb3df3088485ff"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:48c2faaa8adfacefcbfdb5f2e2e7bdad081e5ace8d182e5f4ade971f128e6bb3"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:d85164315bd68c0806768dc6bb0429c6f95c354f87485ee3593c4f6b14def2bd"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6afd80f6c79893cfc0574956f78a0add8c76e3696f2d6a15bca2c66c415cf2d4"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa242ac1ff583e4ec7771141606aafc92b361cd90a05c30d93e343a0c2d82a89"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d21be4770ff4e08698e1e8e0bce06edb6ea0626e7c8f560bc08222880aca6a6f"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c45a639e93a0c5d4b788b2613bd637468edd62f8f95ebc6fcc303d58ab3f0a8"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:910e71711d1055b2768181efa0a17537b2622afeb0424116619817007f8a2b10"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b9bb1f182a97880f6078283b3505a707057c42bf55d8fca604f70dedfdc0772a"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:1d54f74f40b1f7aaa595a02ff42ef38ca654b1469bef7d52867da474243cc633"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:8d2e182c9ee01135e11e9676e9a62dfad791a7a467738f06726872374a83db49"}, - {file = "rpds_py-0.18.1-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:636a15acc588f70fda1661234761f9ed9ad79ebed3f2125d44be0862708b666e"}, - {file = "rpds_py-0.18.1.tar.gz", hash = "sha256:dc48b479d540770c811fbd1eb9ba2bb66951863e448efec2e2c102625328e92f"}, + {file = "rpds_py-0.19.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:fb37bd599f031f1a6fb9e58ec62864ccf3ad549cf14bac527dbfa97123edcca4"}, + {file = "rpds_py-0.19.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3384d278df99ec2c6acf701d067147320b864ef6727405d6470838476e44d9e8"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e54548e0be3ac117595408fd4ca0ac9278fde89829b0b518be92863b17ff67a2"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8eb488ef928cdbc05a27245e52de73c0d7c72a34240ef4d9893fdf65a8c1a955"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5da93debdfe27b2bfc69eefb592e1831d957b9535e0943a0ee8b97996de21b5"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:79e205c70afddd41f6ee79a8656aec738492a550247a7af697d5bd1aee14f766"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:959179efb3e4a27610e8d54d667c02a9feaa86bbabaf63efa7faa4dfa780d4f1"}, + {file = "rpds_py-0.19.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a6e605bb9edcf010f54f8b6a590dd23a4b40a8cb141255eec2a03db249bc915b"}, + {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9133d75dc119a61d1a0ded38fb9ba40a00ef41697cc07adb6ae098c875195a3f"}, + {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:dd36b712d35e757e28bf2f40a71e8f8a2d43c8b026d881aa0c617b450d6865c9"}, + {file = "rpds_py-0.19.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:354f3a91718489912f2e0fc331c24eaaf6a4565c080e00fbedb6015857c00582"}, + {file = "rpds_py-0.19.0-cp310-none-win32.whl", hash = "sha256:ebcbf356bf5c51afc3290e491d3722b26aaf5b6af3c1c7f6a1b757828a46e336"}, + {file = "rpds_py-0.19.0-cp310-none-win_amd64.whl", hash = "sha256:75a6076289b2df6c8ecb9d13ff79ae0cad1d5fb40af377a5021016d58cd691ec"}, + {file = "rpds_py-0.19.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6d45080095e585f8c5097897313def60caa2046da202cdb17a01f147fb263b81"}, + {file = "rpds_py-0.19.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5c9581019c96f865483d031691a5ff1cc455feb4d84fc6920a5ffc48a794d8a"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1540d807364c84516417115c38f0119dfec5ea5c0dd9a25332dea60b1d26fc4d"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e65489222b410f79711dc3d2d5003d2757e30874096b2008d50329ea4d0f88c"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9da6f400eeb8c36f72ef6646ea530d6d175a4f77ff2ed8dfd6352842274c1d8b"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37f46bb11858717e0efa7893c0f7055c43b44c103e40e69442db5061cb26ed34"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:071d4adc734de562bd11d43bd134330fb6249769b2f66b9310dab7460f4bf714"}, + {file = "rpds_py-0.19.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9625367c8955e4319049113ea4f8fee0c6c1145192d57946c6ffcd8fe8bf48dd"}, + {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e19509145275d46bc4d1e16af0b57a12d227c8253655a46bbd5ec317e941279d"}, + {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d438e4c020d8c39961deaf58f6913b1bf8832d9b6f62ec35bd93e97807e9cbc"}, + {file = "rpds_py-0.19.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90bf55d9d139e5d127193170f38c584ed3c79e16638890d2e36f23aa1630b952"}, + {file = "rpds_py-0.19.0-cp311-none-win32.whl", hash = "sha256:8d6ad132b1bc13d05ffe5b85e7a01a3998bf3a6302ba594b28d61b8c2cf13aaf"}, + {file = "rpds_py-0.19.0-cp311-none-win_amd64.whl", hash = "sha256:7ec72df7354e6b7f6eb2a17fa6901350018c3a9ad78e48d7b2b54d0412539a67"}, + {file = "rpds_py-0.19.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:5095a7c838a8647c32aa37c3a460d2c48debff7fc26e1136aee60100a8cd8f68"}, + {file = "rpds_py-0.19.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f2f78ef14077e08856e788fa482107aa602636c16c25bdf59c22ea525a785e9"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7cc6cb44f8636fbf4a934ca72f3e786ba3c9f9ba4f4d74611e7da80684e48d2"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cf902878b4af334a09de7a45badbff0389e7cf8dc2e4dcf5f07125d0b7c2656d"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:688aa6b8aa724db1596514751ffb767766e02e5c4a87486ab36b8e1ebc1aedac"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57dbc9167d48e355e2569346b5aa4077f29bf86389c924df25c0a8b9124461fb"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4cf5a9497874822341c2ebe0d5850fed392034caadc0bad134ab6822c0925b"}, + {file = "rpds_py-0.19.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8a790d235b9d39c70a466200d506bb33a98e2ee374a9b4eec7a8ac64c2c261fa"}, + {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1d16089dfa58719c98a1c06f2daceba6d8e3fb9b5d7931af4a990a3c486241cb"}, + {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:bc9128e74fe94650367fe23f37074f121b9f796cabbd2f928f13e9661837296d"}, + {file = "rpds_py-0.19.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c8f77e661ffd96ff104bebf7d0f3255b02aa5d5b28326f5408d6284c4a8b3248"}, + {file = "rpds_py-0.19.0-cp312-none-win32.whl", hash = "sha256:5f83689a38e76969327e9b682be5521d87a0c9e5a2e187d2bc6be4765f0d4600"}, + {file = "rpds_py-0.19.0-cp312-none-win_amd64.whl", hash = "sha256:06925c50f86da0596b9c3c64c3837b2481337b83ef3519e5db2701df695453a4"}, + {file = "rpds_py-0.19.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:52e466bea6f8f3a44b1234570244b1cff45150f59a4acae3fcc5fd700c2993ca"}, + {file = "rpds_py-0.19.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e21cc693045fda7f745c790cb687958161ce172ffe3c5719ca1764e752237d16"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b31f059878eb1f5da8b2fd82480cc18bed8dcd7fb8fe68370e2e6285fa86da6"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1dd46f309e953927dd018567d6a9e2fb84783963650171f6c5fe7e5c41fd5666"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34a01a4490e170376cd79258b7f755fa13b1a6c3667e872c8e35051ae857a92b"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bcf426a8c38eb57f7bf28932e68425ba86def6e756a5b8cb4731d8e62e4e0223"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f68eea5df6347d3f1378ce992d86b2af16ad7ff4dcb4a19ccdc23dea901b87fb"}, + {file = "rpds_py-0.19.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dab8d921b55a28287733263c0e4c7db11b3ee22aee158a4de09f13c93283c62d"}, + {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6fe87efd7f47266dfc42fe76dae89060038f1d9cb911f89ae7e5084148d1cc08"}, + {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:535d4b52524a961d220875688159277f0e9eeeda0ac45e766092bfb54437543f"}, + {file = "rpds_py-0.19.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:8b1a94b8afc154fbe36978a511a1f155f9bd97664e4f1f7a374d72e180ceb0ae"}, + {file = "rpds_py-0.19.0-cp38-none-win32.whl", hash = "sha256:7c98298a15d6b90c8f6e3caa6457f4f022423caa5fa1a1ca7a5e9e512bdb77a4"}, + {file = "rpds_py-0.19.0-cp38-none-win_amd64.whl", hash = "sha256:b0da31853ab6e58a11db3205729133ce0df26e6804e93079dee095be3d681dc1"}, + {file = "rpds_py-0.19.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5039e3cef7b3e7a060de468a4a60a60a1f31786da94c6cb054e7a3c75906111c"}, + {file = "rpds_py-0.19.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab1932ca6cb8c7499a4d87cb21ccc0d3326f172cfb6a64021a889b591bb3045c"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2afd2164a1e85226fcb6a1da77a5c8896c18bfe08e82e8ceced5181c42d2179"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b1c30841f5040de47a0046c243fc1b44ddc87d1b12435a43b8edff7e7cb1e0d0"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f757f359f30ec7dcebca662a6bd46d1098f8b9fb1fcd661a9e13f2e8ce343ba1"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15e65395a59d2e0e96caf8ee5389ffb4604e980479c32742936ddd7ade914b22"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb0f6eb3a320f24b94d177e62f4074ff438f2ad9d27e75a46221904ef21a7b05"}, + {file = "rpds_py-0.19.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b228e693a2559888790936e20f5f88b6e9f8162c681830eda303bad7517b4d5a"}, + {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2575efaa5d949c9f4e2cdbe7d805d02122c16065bfb8d95c129372d65a291a0b"}, + {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:5c872814b77a4e84afa293a1bee08c14daed1068b2bb1cc312edbf020bbbca2b"}, + {file = "rpds_py-0.19.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:850720e1b383df199b8433a20e02b25b72f0fded28bc03c5bd79e2ce7ef050be"}, + {file = "rpds_py-0.19.0-cp39-none-win32.whl", hash = "sha256:ce84a7efa5af9f54c0aa7692c45861c1667080814286cacb9958c07fc50294fb"}, + {file = "rpds_py-0.19.0-cp39-none-win_amd64.whl", hash = "sha256:1c26da90b8d06227d7769f34915913911222d24ce08c0ab2d60b354e2d9c7aff"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:75969cf900d7be665ccb1622a9aba225cf386bbc9c3bcfeeab9f62b5048f4a07"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8445f23f13339da640d1be8e44e5baf4af97e396882ebbf1692aecd67f67c479"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5a7c1062ef8aea3eda149f08120f10795835fc1c8bc6ad948fb9652a113ca55"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:462b0c18fbb48fdbf980914a02ee38c423a25fcc4cf40f66bacc95a2d2d73bc8"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3208f9aea18991ac7f2b39721e947bbd752a1abbe79ad90d9b6a84a74d44409b"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3444fe52b82f122d8a99bf66777aed6b858d392b12f4c317da19f8234db4533"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88cb4bac7185a9f0168d38c01d7a00addece9822a52870eee26b8d5b61409213"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6b130bd4163c93798a6b9bb96be64a7c43e1cec81126ffa7ffaa106e1fc5cef5"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:a707b158b4410aefb6b054715545bbb21aaa5d5d0080217290131c49c2124a6e"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:dc9ac4659456bde7c567107556ab065801622396b435a3ff213daef27b495388"}, + {file = "rpds_py-0.19.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:81ea573aa46d3b6b3d890cd3c0ad82105985e6058a4baed03cf92518081eec8c"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f148c3f47f7f29a79c38cc5d020edcb5ca780020fab94dbc21f9af95c463581"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0906357f90784a66e89ae3eadc2654f36c580a7d65cf63e6a616e4aec3a81be"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f629ecc2db6a4736b5ba95a8347b0089240d69ad14ac364f557d52ad68cf94b0"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6feacd1d178c30e5bc37184526e56740342fd2aa6371a28367bad7908d454fc"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae8b6068ee374fdfab63689be0963333aa83b0815ead5d8648389a8ded593378"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78d57546bad81e0da13263e4c9ce30e96dcbe720dbff5ada08d2600a3502e526"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8b6683a37338818646af718c9ca2a07f89787551057fae57c4ec0446dc6224b"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e8481b946792415adc07410420d6fc65a352b45d347b78fec45d8f8f0d7496f0"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:bec35eb20792ea64c3c57891bc3ca0bedb2884fbac2c8249d9b731447ecde4fa"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:aa5476c3e3a402c37779e95f7b4048db2cb5b0ed0b9d006983965e93f40fe05a"}, + {file = "rpds_py-0.19.0-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:19d02c45f2507b489fd4df7b827940f1420480b3e2e471e952af4d44a1ea8e34"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a3e2fd14c5d49ee1da322672375963f19f32b3d5953f0615b175ff7b9d38daed"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:93a91c2640645303e874eada51f4f33351b84b351a689d470f8108d0e0694210"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5b9fc03bf76a94065299d4a2ecd8dfbae4ae8e2e8098bbfa6ab6413ca267709"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5a4b07cdf3f84310c08c1de2c12ddadbb7a77568bcb16e95489f9c81074322ed"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ba0ed0dc6763d8bd6e5de5cf0d746d28e706a10b615ea382ac0ab17bb7388633"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:474bc83233abdcf2124ed3f66230a1c8435896046caa4b0b5ab6013c640803cc"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:329c719d31362355a96b435f4653e3b4b061fcc9eba9f91dd40804ca637d914e"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef9101f3f7b59043a34f1dccbb385ca760467590951952d6701df0da9893ca0c"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:0121803b0f424ee2109d6e1f27db45b166ebaa4b32ff47d6aa225642636cd834"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:8344127403dea42f5970adccf6c5957a71a47f522171fafaf4c6ddb41b61703a"}, + {file = "rpds_py-0.19.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:443cec402ddd650bb2b885113e1dcedb22b1175c6be223b14246a714b61cd521"}, + {file = "rpds_py-0.19.0.tar.gz", hash = "sha256:4fdc9afadbeb393b4bbbad75481e0ea78e4469f2e1d713a90811700830b553a9"}, ] [[package]] name = "s3transfer" -version = "0.10.1" +version = "0.10.2" description = "An Amazon S3 Transfer Manager" optional = false -python-versions = ">= 3.8" +python-versions = ">=3.8" files = [ - {file = "s3transfer-0.10.1-py3-none-any.whl", hash = "sha256:ceb252b11bcf87080fb7850a224fb6e05c8a776bab8f2b64b7f25b969464839d"}, - {file = "s3transfer-0.10.1.tar.gz", hash = "sha256:5683916b4c724f799e600f41dd9e10a9ff19871bf87623cc8f491cb4f5fa0a19"}, + {file = "s3transfer-0.10.2-py3-none-any.whl", hash = "sha256:eca1c20de70a39daee580aef4986996620f365c4e0fda6a86100231d62f1bf69"}, + {file = "s3transfer-0.10.2.tar.gz", hash = "sha256:0711534e9356d3cc692fdde846b4a1e4b0cb6519971860796e6bc4c7aea00ef6"}, ] [package.dependencies] @@ -3332,13 +3487,13 @@ crt = ["botocore[crt] (>=1.33.2,<2.0a.0)"] [[package]] name = "selenium" -version = "4.20.0" -description = "" +version = "4.22.0" +description = "Official Python bindings for Selenium WebDriver" optional = false python-versions = ">=3.8" files = [ - {file = "selenium-4.20.0-py3-none-any.whl", hash = "sha256:b1d0c33b38ca27d0499183e48e1dd09ff26973481f5d3ef2983073813ae6588d"}, - {file = "selenium-4.20.0.tar.gz", hash = "sha256:0bd564ee166980d419a8aaf4ac00289bc152afcf2eadca5efe8c8e36711853fd"}, + {file = "selenium-4.22.0-py3-none-any.whl", hash = "sha256:e424991196e9857e19bf04fe5c1c0a4aac076794ff5e74615b1124e729d93104"}, + {file = "selenium-4.22.0.tar.gz", hash = "sha256:903c8c9d61b3eea6fcc9809dc7d9377e04e2ac87709876542cc8f863e482c4ce"}, ] [package.dependencies] @@ -3347,6 +3502,7 @@ trio = ">=0.17,<1.0" trio-websocket = ">=0.9,<1.0" typing_extensions = ">=4.9.0" urllib3 = {version = ">=1.26,<3", extras = ["socks"]} +websocket-client = ">=1.8.0" [[package]] name = "sentry-sdk" @@ -3395,22 +3551,6 @@ starlette = ["starlette (>=0.19.1)"] starlite = ["starlite (>=1.48)"] tornado = ["tornado (>=5)"] -[[package]] -name = "setuptools" -version = "69.5.1" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - [[package]] name = "shortuuid" version = "1.0.13" @@ -3484,64 +3624,64 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.30" +version = "2.0.31" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.30-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3b48154678e76445c7ded1896715ce05319f74b1e73cf82d4f8b59b46e9c0ddc"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2753743c2afd061bb95a61a51bbb6a1a11ac1c44292fad898f10c9839a7f75b2"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7bfc726d167f425d4c16269a9a10fe8630ff6d14b683d588044dcef2d0f6be7"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4f61ada6979223013d9ab83a3ed003ded6959eae37d0d685db2c147e9143797"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3a365eda439b7a00732638f11072907c1bc8e351c7665e7e5da91b169af794af"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bba002a9447b291548e8d66fd8c96a6a7ed4f2def0bb155f4f0a1309fd2735d5"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-win32.whl", hash = "sha256:0138c5c16be3600923fa2169532205d18891b28afa817cb49b50e08f62198bb8"}, - {file = "SQLAlchemy-2.0.30-cp310-cp310-win_amd64.whl", hash = "sha256:99650e9f4cf3ad0d409fed3eec4f071fadd032e9a5edc7270cd646a26446feeb"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:955991a09f0992c68a499791a753523f50f71a6885531568404fa0f231832aa0"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f69e4c756ee2686767eb80f94c0125c8b0a0b87ede03eacc5c8ae3b54b99dc46"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69c9db1ce00e59e8dd09d7bae852a9add716efdc070a3e2068377e6ff0d6fdaa"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1429a4b0f709f19ff3b0cf13675b2b9bfa8a7e79990003207a011c0db880a13"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:efedba7e13aa9a6c8407c48facfdfa108a5a4128e35f4c68f20c3407e4376aa9"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:16863e2b132b761891d6c49f0a0f70030e0bcac4fd208117f6b7e053e68668d0"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-win32.whl", hash = "sha256:2ecabd9ccaa6e914e3dbb2aa46b76dede7eadc8cbf1b8083c94d936bcd5ffb49"}, - {file = "SQLAlchemy-2.0.30-cp311-cp311-win_amd64.whl", hash = "sha256:0b3f4c438e37d22b83e640f825ef0f37b95db9aa2d68203f2c9549375d0b2260"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5a79d65395ac5e6b0c2890935bad892eabb911c4aa8e8015067ddb37eea3d56c"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9a5baf9267b752390252889f0c802ea13b52dfee5e369527da229189b8bd592e"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cb5a646930c5123f8461f6468901573f334c2c63c795b9af350063a736d0134"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:296230899df0b77dec4eb799bcea6fbe39a43707ce7bb166519c97b583cfcab3"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c62d401223f468eb4da32627bffc0c78ed516b03bb8a34a58be54d618b74d472"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3b69e934f0f2b677ec111b4d83f92dc1a3210a779f69bf905273192cf4ed433e"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-win32.whl", hash = "sha256:77d2edb1f54aff37e3318f611637171e8ec71472f1fdc7348b41dcb226f93d90"}, - {file = "SQLAlchemy-2.0.30-cp312-cp312-win_amd64.whl", hash = "sha256:b6c7ec2b1f4969fc19b65b7059ed00497e25f54069407a8701091beb69e591a5"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5a8e3b0a7e09e94be7510d1661339d6b52daf202ed2f5b1f9f48ea34ee6f2d57"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b60203c63e8f984df92035610c5fb76d941254cf5d19751faab7d33b21e5ddc0"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1dc3eabd8c0232ee8387fbe03e0a62220a6f089e278b1f0aaf5e2d6210741ad"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:40ad017c672c00b9b663fcfcd5f0864a0a97828e2ee7ab0c140dc84058d194cf"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e42203d8d20dc704604862977b1470a122e4892791fe3ed165f041e4bf447a1b"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-win32.whl", hash = "sha256:2a4f4da89c74435f2bc61878cd08f3646b699e7d2eba97144030d1be44e27584"}, - {file = "SQLAlchemy-2.0.30-cp37-cp37m-win_amd64.whl", hash = "sha256:b6bf767d14b77f6a18b6982cbbf29d71bede087edae495d11ab358280f304d8e"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bc0c53579650a891f9b83fa3cecd4e00218e071d0ba00c4890f5be0c34887ed3"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:311710f9a2ee235f1403537b10c7687214bb1f2b9ebb52702c5aa4a77f0b3af7"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:408f8b0e2c04677e9c93f40eef3ab22f550fecb3011b187f66a096395ff3d9fd"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37a4b4fb0dd4d2669070fb05b8b8824afd0af57587393015baee1cf9890242d9"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a943d297126c9230719c27fcbbeab57ecd5d15b0bd6bfd26e91bfcfe64220621"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0a089e218654e740a41388893e090d2e2c22c29028c9d1353feb38638820bbeb"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-win32.whl", hash = "sha256:fa561138a64f949f3e889eb9ab8c58e1504ab351d6cf55259dc4c248eaa19da6"}, - {file = "SQLAlchemy-2.0.30-cp38-cp38-win_amd64.whl", hash = "sha256:7d74336c65705b986d12a7e337ba27ab2b9d819993851b140efdf029248e818e"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae8c62fe2480dd61c532ccafdbce9b29dacc126fe8be0d9a927ca3e699b9491a"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2383146973a15435e4717f94c7509982770e3e54974c71f76500a0136f22810b"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8409de825f2c3b62ab15788635ccaec0c881c3f12a8af2b12ae4910a0a9aeef6"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0094c5dc698a5f78d3d1539853e8ecec02516b62b8223c970c86d44e7a80f6c7"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:edc16a50f5e1b7a06a2dcc1f2205b0b961074c123ed17ebda726f376a5ab0953"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f7703c2010355dd28f53deb644a05fc30f796bd8598b43f0ba678878780b6e4c"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-win32.whl", hash = "sha256:1f9a727312ff6ad5248a4367358e2cf7e625e98b1028b1d7ab7b806b7d757513"}, - {file = "SQLAlchemy-2.0.30-cp39-cp39-win_amd64.whl", hash = "sha256:a0ef36b28534f2a5771191be6edb44cc2673c7b2edf6deac6562400288664221"}, - {file = "SQLAlchemy-2.0.30-py3-none-any.whl", hash = "sha256:7108d569d3990c71e26a42f60474b4c02c8586c4681af5fd67e51a044fdea86a"}, - {file = "SQLAlchemy-2.0.30.tar.gz", hash = "sha256:2b1708916730f4830bc69d6f49d37f7698b5bd7530aca7f04f785f8849e95255"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f2a213c1b699d3f5768a7272de720387ae0122f1becf0901ed6eaa1abd1baf6c"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9fea3d0884e82d1e33226935dac990b967bef21315cbcc894605db3441347443"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ad7f221d8a69d32d197e5968d798217a4feebe30144986af71ada8c548e9fa"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f2bee229715b6366f86a95d497c347c22ddffa2c7c96143b59a2aa5cc9eebbc"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cd5b94d4819c0c89280b7c6109c7b788a576084bf0a480ae17c227b0bc41e109"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:750900a471d39a7eeba57580b11983030517a1f512c2cb287d5ad0fcf3aebd58"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-win32.whl", hash = "sha256:7bd112be780928c7f493c1a192cd8c5fc2a2a7b52b790bc5a84203fb4381c6be"}, + {file = "SQLAlchemy-2.0.31-cp310-cp310-win_amd64.whl", hash = "sha256:5a48ac4d359f058474fadc2115f78a5cdac9988d4f99eae44917f36aa1476327"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f68470edd70c3ac3b6cd5c2a22a8daf18415203ca1b036aaeb9b0fb6f54e8298"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e2c38c2a4c5c634fe6c3c58a789712719fa1bf9b9d6ff5ebfce9a9e5b89c1ca"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd15026f77420eb2b324dcb93551ad9c5f22fab2c150c286ef1dc1160f110203"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2196208432deebdfe3b22185d46b08f00ac9d7b01284e168c212919891289396"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:352b2770097f41bff6029b280c0e03b217c2dcaddc40726f8f53ed58d8a85da4"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:56d51ae825d20d604583f82c9527d285e9e6d14f9a5516463d9705dab20c3740"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-win32.whl", hash = "sha256:6e2622844551945db81c26a02f27d94145b561f9d4b0c39ce7bfd2fda5776dac"}, + {file = "SQLAlchemy-2.0.31-cp311-cp311-win_amd64.whl", hash = "sha256:ccaf1b0c90435b6e430f5dd30a5aede4764942a695552eb3a4ab74ed63c5b8d3"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3b74570d99126992d4b0f91fb87c586a574a5872651185de8297c6f90055ae42"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f77c4f042ad493cb8595e2f503c7a4fe44cd7bd59c7582fd6d78d7e7b8ec52c"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1591329333daf94467e699e11015d9c944f44c94d2091f4ac493ced0119449"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74afabeeff415e35525bf7a4ecdab015f00e06456166a2eba7590e49f8db940e"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b9c01990d9015df2c6f818aa8f4297d42ee71c9502026bb074e713d496e26b67"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:66f63278db425838b3c2b1c596654b31939427016ba030e951b292e32b99553e"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-win32.whl", hash = "sha256:0b0f658414ee4e4b8cbcd4a9bb0fd743c5eeb81fc858ca517217a8013d282c96"}, + {file = "SQLAlchemy-2.0.31-cp312-cp312-win_amd64.whl", hash = "sha256:fa4b1af3e619b5b0b435e333f3967612db06351217c58bfb50cee5f003db2a5a"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f43e93057cf52a227eda401251c72b6fbe4756f35fa6bfebb5d73b86881e59b0"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d337bf94052856d1b330d5fcad44582a30c532a2463776e1651bd3294ee7e58b"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c06fb43a51ccdff3b4006aafee9fcf15f63f23c580675f7734245ceb6b6a9e05"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:b6e22630e89f0e8c12332b2b4c282cb01cf4da0d26795b7eae16702a608e7ca1"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:79a40771363c5e9f3a77f0e28b3302801db08040928146e6808b5b7a40749c88"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-win32.whl", hash = "sha256:501ff052229cb79dd4c49c402f6cb03b5a40ae4771efc8bb2bfac9f6c3d3508f"}, + {file = "SQLAlchemy-2.0.31-cp37-cp37m-win_amd64.whl", hash = "sha256:597fec37c382a5442ffd471f66ce12d07d91b281fd474289356b1a0041bdf31d"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:dc6d69f8829712a4fd799d2ac8d79bdeff651c2301b081fd5d3fe697bd5b4ab9"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:23b9fbb2f5dd9e630db70fbe47d963c7779e9c81830869bd7d137c2dc1ad05fb"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a21c97efcbb9f255d5c12a96ae14da873233597dfd00a3a0c4ce5b3e5e79704"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26a6a9837589c42b16693cf7bf836f5d42218f44d198f9343dd71d3164ceeeac"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc251477eae03c20fae8db9c1c23ea2ebc47331bcd73927cdcaecd02af98d3c3"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2fd17e3bb8058359fa61248c52c7b09a97cf3c820e54207a50af529876451808"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-win32.whl", hash = "sha256:c76c81c52e1e08f12f4b6a07af2b96b9b15ea67ccdd40ae17019f1c373faa227"}, + {file = "SQLAlchemy-2.0.31-cp38-cp38-win_amd64.whl", hash = "sha256:4b600e9a212ed59355813becbcf282cfda5c93678e15c25a0ef896b354423238"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b6cf796d9fcc9b37011d3f9936189b3c8074a02a4ed0c0fbbc126772c31a6d4"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:78fe11dbe37d92667c2c6e74379f75746dc947ee505555a0197cfba9a6d4f1a4"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fc47dc6185a83c8100b37acda27658fe4dbd33b7d5e7324111f6521008ab4fe"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a41514c1a779e2aa9a19f67aaadeb5cbddf0b2b508843fcd7bafdf4c6864005"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:afb6dde6c11ea4525318e279cd93c8734b795ac8bb5dda0eedd9ebaca7fa23f1"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3f9faef422cfbb8fd53716cd14ba95e2ef655400235c3dfad1b5f467ba179c8c"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-win32.whl", hash = "sha256:fc6b14e8602f59c6ba893980bea96571dd0ed83d8ebb9c4479d9ed5425d562e9"}, + {file = "SQLAlchemy-2.0.31-cp39-cp39-win_amd64.whl", hash = "sha256:3cb8a66b167b033ec72c3812ffc8441d4e9f5f78f5e31e54dcd4c90a4ca5bebc"}, + {file = "SQLAlchemy-2.0.31-py3-none-any.whl", hash = "sha256:69f3e3c08867a8e4856e92d7afb618b95cdee18e0bc1647b77599722c9a28911"}, + {file = "SQLAlchemy-2.0.31.tar.gz", hash = "sha256:b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484"}, ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""} +greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -3630,13 +3770,13 @@ docs = ["mkdocs (>=1.1,<1.2)", "mkdocs-material (>=6.2,<6.3)"] [[package]] name = "tenacity" -version = "8.3.0" +version = "8.5.0" description = "Retry code until it succeeds" optional = false python-versions = ">=3.8" files = [ - {file = "tenacity-8.3.0-py3-none-any.whl", hash = "sha256:3649f6443dbc0d9b01b9d8020a9c4ec7a1ff5f6f3c6c8a036ef371f573fe9185"}, - {file = "tenacity-8.3.0.tar.gz", hash = "sha256:953d4e6ad24357bceffbc9707bc74349aca9d245f68eb65419cf0c249a1949a2"}, + {file = "tenacity-8.5.0-py3-none-any.whl", hash = "sha256:b594c2a5945830c267ce6b79a166228323ed52718f30302c1359836112346687"}, + {file = "tenacity-8.5.0.tar.gz", hash = "sha256:8bc6c0c8a09b31e6cad13c47afbed1a567518250a9a171418582ed8d9c20ca78"}, ] [package.extras] @@ -3743,13 +3883,13 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0, [[package]] name = "trio" -version = "0.25.0" +version = "0.26.0" description = "A friendly Python library for async concurrency and I/O" optional = false python-versions = ">=3.8" files = [ - {file = "trio-0.25.0-py3-none-any.whl", hash = "sha256:e6458efe29cc543e557a91e614e2b51710eba2961669329ce9c862d50c6e8e81"}, - {file = "trio-0.25.0.tar.gz", hash = "sha256:9b41f5993ad2c0e5f62d0acca320ec657fdb6b2a2c22b8c7aed6caf154475c4e"}, + {file = "trio-0.26.0-py3-none-any.whl", hash = "sha256:bb9c1b259591af941fccfbabbdc65bc7ed764bd2db76428454c894cd5e3d2032"}, + {file = "trio-0.26.0.tar.gz", hash = "sha256:67c5ec3265dd4abc7b1d1ab9ca4fe4c25b896f9c93dac73713778adab487f9c4"}, ] [package.dependencies] @@ -3779,13 +3919,13 @@ wsproto = ">=0.14" [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] @@ -3827,13 +3967,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.dependencies] @@ -3847,13 +3987,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.26.2" +version = "20.26.3" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.26.2-py3-none-any.whl", hash = "sha256:a624db5e94f01ad993d476b9ee5346fdf7b9de43ccaee0e0197012dc838a0e9b"}, - {file = "virtualenv-20.26.2.tar.gz", hash = "sha256:82bf0f4eebbb78d36ddaee0283d43fe5736b53880b8a8cdcd37390a07ac3741c"}, + {file = "virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"}, + {file = "virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a"}, ] [package.dependencies] @@ -3867,37 +4007,117 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [[package]] name = "wagtail" -version = "5.1.3" +version = "6.1.3" description = "A Django content management system." optional = false python-versions = ">=3.8" files = [ - {file = "wagtail-5.1.3-py3-none-any.whl", hash = "sha256:f4a6cc2adc40f687d8fb62fed2d4fc0804941dfa45b4624887f260dc6cf6b9f2"}, - {file = "wagtail-5.1.3.tar.gz", hash = "sha256:45fac794e4c20c7e75b018069d7f9761f25faa3619ef30df24013ca24abf9a74"}, + {file = "wagtail-6.1.3-py3-none-any.whl", hash = "sha256:b6c4d5705adf51a5e49ea416032dd0a6534588fc31c5c9a95f698e6ddec0a203"}, + {file = "wagtail-6.1.3.tar.gz", hash = "sha256:8f4908ab1b6b963a8aa7adf8f0ec738cd1dc79b9816c6d5f59018f600a404378"}, ] [package.dependencies] anyascii = ">=0.1.5" -beautifulsoup4 = ">=4.8,<4.12" -Django = ">=3.2,<4.3" -django-filter = ">=2.2,<24" -django-modelcluster = ">=6.0,<7.0" +beautifulsoup4 = ">=4.8,<4.13" +Django = ">=4.2,<6.0" +django-filter = ">=23.3,<25" +django-modelcluster = ">=6.2.1,<7.0" django-permissionedforms = ">=0.1,<1.0" -django-taggit = ">=2.0,<5.0" +django-taggit = ">=4.0,<5.1" django-treebeard = ">=4.5.1,<5.0" -djangorestframework = ">=3.11.1,<4.0" -draftjs-exporter = ">=2.1.5,<3.0" -html5lib = ">=0.999,<2" +djangorestframework = ">=3.15.1,<4.0" +draftjs-exporter = ">=2.1.5,<6.0" l18n = ">=2018.5" +laces = ">=0.1,<0.2" openpyxl = ">=3.0.10,<4.0" Pillow = ">=9.1.0,<11.0.0" requests = ">=2.11.1,<3.0" -telepath = ">=0.1.1,<1" -Willow = {version = ">=1.6.2,<1.7", extras = ["heif"]} +telepath = ">=0.3.1,<1" +Willow = {version = ">=1.8.0,<2", extras = ["heif"]} + +[package.extras] +docs = ["Sphinx (>=1.5.2)", "myst-parser (==2.0.0)", "pyenchant (>=3.1.1,<4)", "sphinx-autobuild (>=0.6.0)", "sphinx-copybutton (>=0.5,<1.0)", "sphinx-wagtail-theme (==6.3.0)", "sphinxcontrib-spelling (>=7,<8)"] +testing = ["Jinja2 (>=3.0,<3.2)", "azure-mgmt-cdn (>=12.0,<13.0)", "azure-mgmt-frontdoor (>=1.0,<1.1)", "boto3 (>=1.28,<2)", "coverage (>=3.7.0)", "curlylint (==0.13.1)", "django-pattern-library (>=0.7)", "djhtml (==3.0.6)", "doc8 (==0.8.1)", "factory-boy (>=3.2)", "freezegun (>=0.3.8)", "polib (>=1.1,<2.0)", "python-dateutil (>=2.7)", "pytz (>=2014.7)", "ruff (==0.1.5)", "semgrep (==1.40.0)", "tblib (>=2.0,<3.0)"] + +[[package]] +name = "wagtail-localize" +version = "1.9" +description = "Translation plugin for Wagtail CMS" +optional = false +python-versions = ">=3.8" +files = [ + {file = "wagtail_localize-1.9-py3-none-any.whl", hash = "sha256:a680fc33c17145e6726f03a57b2ec465405847ae7cb77943ecc0e56463ad68c7"}, + {file = "wagtail_localize-1.9.tar.gz", hash = "sha256:f4fa9c36d8dbab5c27d1b675ed6fd7b9e8f012cf4bb308464168de7ebbad8324"}, +] + +[package.dependencies] +Django = ">=3.2,<5.1" +polib = ">=1.1,<2.0" +typing_extensions = ">=4.0" +Wagtail = ">=5.2" + +[package.extras] +documentation = ["mkdocs (==1.4.3)", "mkdocs-autorefs (>=0.4.0,<0.5)", "mkdocs-include-markdown-plugin (>=4.0.4,<5)", "mkdocs-material (>=9.1,<10)", "mkdocstrings[python] (==0.22.0)", "pygments (>=2.15,<2.16)"] +google = ["google-cloud-translate (>=3.0.0)"] +linting = ["pre-commit (>=3.4,<4)"] +testing = ["coverage (>=7.0,<8.0)", "dj-database-url (>=2.1.0,<3)", "django-rq (>=2.5,<3.0)", "freezegun (>=1.2,<2)", "google-cloud-translate (>=3.0.0)", "wagtail-modeladmin (>=2.0,<3.0)"] + +[[package]] +name = "wagtail-markdown" +version = "0.12.1" +description = "Markdown support for Wagtail" +optional = false +python-versions = ">=3.8" +files = [ + {file = "wagtail_markdown-0.12.1-py3-none-any.whl", hash = "sha256:bb5f02b6bdfef74b50a74e7aa3f255c7bc9787cec8d03dae50fc9404a0097dba"}, + {file = "wagtail_markdown-0.12.1.tar.gz", hash = "sha256:54f1ba375348e86e03f4eca7d2ac3d33245ead9f854028d7ee9c479448f1e678"}, +] + +[package.dependencies] +bleach = ">=3.3,<5" +Markdown = ">=3.3,<4" +Wagtail = ">=5.2" [package.extras] -docs = ["Sphinx (>=1.5.2)", "myst-parser (==0.18.1)", "pyenchant (>=3.1.1,<4)", "sphinx-autobuild (>=0.6.0)", "sphinx-copybutton (>=0.5,<1.0)", "sphinx-wagtail-theme (==6.1.1)", "sphinxcontrib-spelling (>=5.4.0,<6)"] -testing = ["Jinja2 (>=3.0,<3.2)", "azure-mgmt-cdn (>=12.0,<13.0)", "azure-mgmt-frontdoor (>=1.0,<1.1)", "black (==22.3.0)", "boto3 (>=1.16,<1.17)", "coverage (>=3.7.0)", "curlylint (==0.13.1)", "django-pattern-library (>=0.7,<0.8)", "djhtml (==1.5.2)", "doc8 (==0.8.1)", "factory-boy (>=3.2)", "freezegun (>=0.3.8)", "polib (>=1.1,<2.0)", "python-dateutil (>=2.7)", "pytz (>=2014.7)", "ruff (==0.0.272)", "semgrep (==1.3.0)"] +testing = ["coverage (>=7.0,<8.0)", "tox (>=4.6.4,<5)"] + +[[package]] +name = "wagtail-modeladmin" +version = "2.0.0" +description = "Add any model in your project to the Wagtail admin. Formerly wagtail.contrib.modeladmin." +optional = false +python-versions = ">=3.8" +files = [ + {file = "wagtail_modeladmin-2.0.0-py3-none-any.whl", hash = "sha256:36931ce4b2c2bb56d0367317b29786eb001344b7c9a1cd4f719d7f11efeae71b"}, + {file = "wagtail_modeladmin-2.0.0.tar.gz", hash = "sha256:3794c854b86d69ad1b2ec4f3ee5e6852ff8cb0505bd9151186ef26e0a88d84bc"}, +] + +[package.dependencies] +Wagtail = ">=5.2" + +[package.extras] +docs = ["Sphinx (>=6.0)", "myst_parser (>=0.18.1,<1.0)", "pyenchant (>=3.1.1,<4)", "sphinx-autobuild (>=0.6.0)", "sphinx-wagtail-theme (==6.2.0)", "sphinx_copybutton (>=0.5)", "sphinxcontrib-spelling (>=8.0,<9.0)"] +testing = ["dj-database-url (>=2.0.0)", "pre-commit (<3.0)"] + +[[package]] +name = "wagtailmenus" +version = "4.0" +description = "An app to help you manage menus in your Wagtail projects more consistently." +optional = false +python-versions = ">=3.8" +files = [ + {file = "wagtailmenus-4.0-py3-none-any.whl", hash = "sha256:fe548b1ccd6a7b9c96b03ed0cfd020d278a8cab3b08e32d6859001ec7ec4fd03"}, + {file = "wagtailmenus-4.0.tar.gz", hash = "sha256:d233dba4f67a72a19b61bfa0a494949e52622be124d8b537287d5d64021c57f2"}, +] + +[package.dependencies] +django-cogwheels = "0.3" +wagtail = ">=5.2" + +[package.extras] +development = ["beautifulsoup4 (>=4.8,<4.10)", "coverage (>=4.5)", "django-debug-toolbar", "django-extensions", "django-webtest (>=1.9,<1.10)", "ipdb", "wagtail (>=5.2)", "werkzeug"] +docs = ["Sphinx (>=1.7.4)", "pyenchant (>=2.0)", "sphinx-rtd-theme (>=0.3)", "sphinxcontrib-spelling (>=1.4)"] +testing = ["beautifulsoup4 (>=4.8,<4.10)", "coverage (>=4.5)", "django-webtest (>=1.9,<1.10)"] [[package]] name = "wcwidth" @@ -3921,29 +4141,45 @@ files = [ {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, ] +[[package]] +name = "websocket-client" +version = "1.8.0" +description = "WebSocket client for Python with low level API options" +optional = false +python-versions = ">=3.8" +files = [ + {file = "websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526"}, + {file = "websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"}, +] + +[package.extras] +docs = ["Sphinx (>=6.0)", "myst-parser (>=2.0.0)", "sphinx-rtd-theme (>=1.1.0)"] +optional = ["python-socks", "wsaccel"] +test = ["websockets"] + [[package]] name = "whitenoise" -version = "6.6.0" +version = "6.7.0" description = "Radically simplified static file serving for WSGI applications" optional = false python-versions = ">=3.8" files = [ - {file = "whitenoise-6.6.0-py3-none-any.whl", hash = "sha256:b1f9db9bf67dc183484d760b99f4080185633136a273a03f6436034a41064146"}, - {file = "whitenoise-6.6.0.tar.gz", hash = "sha256:8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251"}, + {file = "whitenoise-6.7.0-py3-none-any.whl", hash = "sha256:a1ae85e01fdc9815d12fa33f17765bc132ed2c54fa76daf9e39e879dd93566f6"}, + {file = "whitenoise-6.7.0.tar.gz", hash = "sha256:58c7a6cd811e275a6c91af22e96e87da0b1109e9a53bb7464116ef4c963bf636"}, ] [package.extras] -brotli = ["Brotli"] +brotli = ["brotli"] [[package]] name = "willow" -version = "1.6.3" +version = "1.8.0" description = "A Python image library that sits on top of Pillow, Wand and OpenCV" optional = false python-versions = ">=3.8" files = [ - {file = "willow-1.6.3-py3-none-any.whl", hash = "sha256:f4b17a16c6315864604dadb6cdf2987d0b685e295cca74c6da28b94167a3126e"}, - {file = "willow-1.6.3.tar.gz", hash = "sha256:143cefd30d3bb816cdff857c454da24991dda35a0315ea795101675e0b14262f"}, + {file = "willow-1.8.0-py3-none-any.whl", hash = "sha256:48ccf5ce48ccd29c37a32497cd7af50983f8570543c4de2988b15d583efc66be"}, + {file = "willow-1.8.0.tar.gz", hash = "sha256:ef3df6cde80d4914e719188147bef1d71c240edb118340e0c5957ecc8fe08315"}, ] [package.dependencies] @@ -3955,91 +4191,89 @@ pillow-heif = [ ] [package.extras] -docs = ["Sphinx (>=7.0)", "sphinx-wagtail-theme (==6.0.0)", "sphinx_copybutton (>=0.5)", "sphinxcontrib-spelling (>=8.0,<9.0)"] +docs = ["Sphinx (>=7.0)", "sphinx-wagtail-theme (>=6.1.1,<7.0)", "sphinx_copybutton (>=0.5)", "sphinxcontrib-spelling (>=8.0,<9.0)"] heif = ["pillow-heif (>=0.10.0,<1.0.0)", "pillow-heif (>=0.13.0,<1.0.0)"] -testing = ["Pillow (>=9.1.0,<11.0.0)", "Wand (>=0.6,<1.0)", "black (==22.3.0)", "coverage[toml] (>=7.2.7,<8.0)", "mock (>=3.0,<4.0)", "pillow-heif (>=0.10.0,<1.0.0)", "ruff (==0.0.275)"] +pillow = ["Pillow (>=9.1.0,<11.0.0)"] +testing = ["coverage[toml] (>=7.2.7,<8.0)", "pre-commit (>=3.4.0)", "willow[heif,pillow,wand]"] +wand = ["Wand (>=0.6,<1.0)"] [[package]] name = "wrapt" -version = "1.14.1" +version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -files = [ - {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, - {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, - {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, - {file = "wrapt-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ecee4132c6cd2ce5308e21672015ddfed1ff975ad0ac8d27168ea82e71413f55"}, - {file = "wrapt-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2020f391008ef874c6d9e208b24f28e31bcb85ccff4f335f15a3251d222b92d9"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2feecf86e1f7a86517cab34ae6c2f081fd2d0dac860cb0c0ded96d799d20b335"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:240b1686f38ae665d1b15475966fe0472f78e71b1b4903c143a842659c8e4cb9"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9008dad07d71f68487c91e96579c8567c98ca4c3881b9b113bc7b33e9fd78b8"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6447e9f3ba72f8e2b985a1da758767698efa72723d5b59accefd716e9e8272bf"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:acae32e13a4153809db37405f5eba5bac5fbe2e2ba61ab227926a22901051c0a"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49ef582b7a1152ae2766557f0550a9fcbf7bbd76f43fbdc94dd3bf07cc7168be"}, - {file = "wrapt-1.14.1-cp311-cp311-win32.whl", hash = "sha256:358fe87cc899c6bb0ddc185bf3dbfa4ba646f05b1b0b9b5a27c2cb92c2cea204"}, - {file = "wrapt-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:26046cd03936ae745a502abf44dac702a5e6880b2b01c29aea8ddf3353b68224"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, - {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, - {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, - {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, - {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, - {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, - {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, - {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, - {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, - {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, - {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, - {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, - {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, - {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 47fac2ab4..84ad04236 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ django-cors-headers = "^3.14.0" django-environ = "^0.9.0" django-extensions = "^3.2.3" django-fieldsets-with-inlines = { git = "https://github.com/raphodn/django-fieldsets-with-inlines.git", branch = "master" } -django-filter = "^21.1" +django-filter = "^23.3" django-formtools = "^2.5.1" django-htmx = "^1.17.3" django-libsass = "^0.9" @@ -44,12 +44,17 @@ sentry-sdk = "^1.45.0" shortuuid = "^1.0.13" sib-api-v3-sdk = "^7.6.0" tiktoken = "^0.5.2" -wagtail = "^5.1.3" +wagtail = "^6.1" +wagtailmenus = "^4.0" +wagtail-modeladmin = "^2.0.0" whitenoise = "^6.6.0" xlwt = "^1.3.0" django-phonenumber-field = {extras = ["phonenumbers"], version = "^7.3.0"} django-simple-history = "^3.7.0" django-dsfr = "^1.1.4" +pillow-heif = "^0.16.0" +wagtail-markdown = "^0.12.1" +wagtail-localize = "^1.9" [tool.poetry.group.dev.dependencies] black = "^23.12.1"