From 9e4866bb636590856a92dc3ef3e4aed3d32d5bf5 Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Mon, 17 Jun 2024 18:02:04 +0200 Subject: [PATCH] [Iframe] add 'parameters' parameter (#154) --- ..._body_alter_blogindexpage_body_and_more.py | 18494 ++++++++++++++++ content_manager/blocks.py | 5 + .../locale/fr/LC_MESSAGES/django.mo | Bin 15846 -> 15981 bytes .../locale/fr/LC_MESSAGES/django.po | 204 +- .../migrations/0034_alter_contentpage_body.py | 7301 ++++++ .../content_manager/blocks/iframe.html | 5 +- 6 files changed, 25907 insertions(+), 102 deletions(-) create mode 100644 blog/migrations/0018_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py create mode 100644 content_manager/migrations/0034_alter_contentpage_body.py 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 00000000..24eefc30 --- /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/content_manager/blocks.py b/content_manager/blocks.py index 6f41ebb6..c15fbdee 100644 --- a/content_manager/blocks.py +++ b/content_manager/blocks.py @@ -473,6 +473,11 @@ class IframeBlock(blocks.StructBlock): 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" diff --git a/content_manager/locale/fr/LC_MESSAGES/django.mo b/content_manager/locale/fr/LC_MESSAGES/django.mo index 1aa563f2bacb8582765a3124e4430f62d3c907e2..035ce734c648e8955782c7bd13893cb73813ff21 100644 GIT binary patch delta 4841 zcmZwLeNF;kHgMMX4G5Ggg8cWTW_oE9Oo zshMKguuRF8nz~_X51XWxlA?cXZP^a4hckBa>9qIfcfX#qbGCc@{9fPh{r&F!KHf{G zzpuDf?OX}>tuq{LPS24emAfS?VB!9?ul;5ITMGvFwL5S{?sR1i;zh$b1@E=V+_`!u4_bf z@E8W*C#Zp(!w~!u8M(QN{bgfzH=2kV z*-X@ulv|fu*I3tE>rowfEr$8mRPN=3M%HY9aMsq_tnH|VZ=pKUDc0>^Fw$q^!7-SH z>ey=3Qaq2EfvucD5HhOVI2?60T` ze?W~OsF&MtBya~`!fzPEN}J~i?P)Bt*+Hf=xj!5q|#J_%JYfA7s-g6I-N$M)YDNn&8yBL!-;Emi zA=J}w8ufTyaVThnp?%z*#iOP+3AOt(P#26sZNiDD-_JyiWD&9orV90fsYi|M9n=z> zLUsHy>OJrc>b~D0+r>CPQPA_7(AWL@KNQtK0S4e))C;2=c>>KdsD^f+MtT_4z-bJ^ zi|CJkLv`dD>UX}W?)_p=9ZN)h=a@_i8sP)h3Ft$;2zB8sR0p5LuJ|IVfvu>S+J)-q zd#Di}!*o1}y6+9_ia|UIn!#w~lu5!6J^y(Wv^GT;jFqSxJLroWQ4Q3gI+u<8$)T|45y$?GTu4^HIl`)z6|xezkr(39XJUOqJ9^e z=AMs6?TP-VHBPtZb5I?hit2b7YR{}fCzC=0g&MqsJXvPm0AmK@deqdNK;7UBssmr) z0=$W%u#~N=&D4lIx#m;U9{Cp4p@4yIM?+9E8iirlV<7Xdk)_%bqmaKN<}sX$i!l*f zkq5d`=R^nwvU5gY zENT-Lpf=ky)X3)`8``Wub?9|ukfsH7z20Ww5Q>@!k2M!re)9xsGuNZqZE`4RN{(YB zeuSFJ%cv3DMlC_W{k&E&5;fv<>oC;FMx#bvgu1Q-bzKFfVl}c_W;bdETkZGGzbQm< zqB9#oBaB6jU;uW*9Mp{;MXlu&48-XejHMWjRj8?6hx+|4R7dxqX7B)NfJbcoEOyuP zf02Twt{v6jO;pbV*@0>(3ZpRrHPTExih0OC6EehoCFi2*&*B0+f^)GC8$%u6i0Z&5 z)C@FYte*dmDQLuhLH)1;pTe8SA4XHji#!fr##nqCb)!?L4!5D!^dG1_(`BgpI0vDw zy9;|@CXT{<%*8rPbNHjvMuAl@U5C4y;z86D=A(9N0jh)Zt<|W8H((WRMg1lR1)BEXuXckVAon#vM4Y_m7qR`n^ z)?gjcDCv`Tn!$T$Ku?o-q(9M9!vuRD8uL1pOXOH>en`al^OUv|^<75;Ip;0??*~IM zjpP7%pX?*Y$!|#k`DN|CkO-%m(l1CoDJOe~jzaP)Z^_+rWt8{Z`b)Tiyg=S2yNQnH z$!x-_$dnSzpkA6f4!f9Q>tMQ#!Q?Yrue3gjZ<0Tfh2#_oCMjep(J_%UlXpp95=Jf(9nX*{q*WD;5iXAR z`B6E8Xv=R=h2vGSjRcWFCzhgK4khGsdrnLu@7Vfu%p((QeU6q` z&((wEUh*M%i|8ehL>?juWGop+a>!_+*IydhL3F&~;{9CA=P=Sj&X7llhb$tIB$0ec zj*wln?>*M?nN7x%X!0`o?_)U?t@RS}33-mhk`G8ai6c73kW6oh{~3TEkw1`!$tLn^ z;zPEQWRlgBk99=H5b_F{uL{Q@65%cJ#=?>0H8Poe+B7zNt*@uNGO=V?@xqF-lI%oJ zaamdU(%~tkCFN!1vx}?dmoG~3q&1z6_VEuat}I?yQdLs9q^Tv|C%|`bc1C8?`Q)Gc v`WEX3CAvZL_Uy#w#^&w+=Pu3Ln-8Zool89&5TqL&-(6K%vZSddqcHG4A4l;$ delta 4709 zcmZYB3s6>N9>?*&iCjc3a*;4a5D`i9f`aH8xLRhBrYWX)DeoF;wJKV=9HUy>MX5x~ zD06icFL^7{Fv`kG$qY5YRvMYDZEIR}t8vwKcXr+H?>$d5&UD7#`+1)8zUMsGbMWHw zZl7({&ursHzt zR<^}igX+j})cu+;nD*@(cj6-Q&;G@SE{u%#?TjJRvz@ufplui?;si{T=X3(Ex*uF~wrS^Ikcd%y-xbwhHfkgzkyW!oSD%V% zcs{D(V$>2XN6o-)R0nF&(}i^u)Z-IKo7RNt$Pe!PPpGMFNvryODC!1Ls1bEQEk$={ zmNU)b~Iwp_fNNH@e%MC`8T3Z0wFpQ9a&*EpZ2`gS(M7 ztOm6d4X%D3wRb`~`U8tXR>wLa|ExbBsaSw?#Ir{!r~|7|4OODnY$NKzJ*W{JLA_W` zq8j)LHKl)d-~Zt1|8{jt@~>-+YA_Df;T%lCu^6uBznFriq!hIT>rhj(12xhEsE)ml zYVZiEL&x3sXHXsc5_O+TsNV;(PU>hl>bh9eKoi~hbk#jh^rD~}-ilhoJ5VVV|fm>M=qge%( zzd&|&HJiv6mrxhplkPWIh`H2fIk%!3`Wp2(T|rH0csH|wn1uR%0&3(%sK?twJ(ka) z2KXMTWA*w%Q`>;r^?yTM@K4kx49f5?Xp6d_6EdrohI+9KM~!SMY6+I2W~v8}IHNuCnFD^md z_*D$YTGR|4Ma@71YDxa;&R@l7J^w*GGeLY2kGgStR7X-#Gm(w0G2c1PIn_DOxdhdL zQdC20Py?xQ=MSUy#%Ip2F_`x4iaYUN)Z-X+i$9g=SU^1&HPW^2{7b04@H%Q_HSYXT zRL7f99sd!vSAu&o2+Y7$_yF?2*hTdEQ;6y1PuX3l8;rxi7^Alth?R(VPcj)IgoP(N?;i#nmvcXAM2Ao#{v7rDW(>#gkd17Yk=3!3EPv)kqrQI#<8c{kV9%jCz8xdbtEHeD ze~englNg3)unqnNb>T(S6bEJdzfVGSGz~R#JuwcmT|FP$QXhkwv6-j_7oj>O550olMb-buM-gV{@LI;rsE&uRG1P%5)ZXcWy5A7gh$o_c zw*ZTA5vJ(*KTjc%6A`??bwN7nMuSm3EZZ6`736H zKQaZ#?ArSkf#DAf6r;#>~rKqz{=zN=O%?`n+lkBoZBWknBLo>=Qgf4w1XaTC$q7BrlOPGT(q=0-}JvU}$P<32Fi;(K%q!yt;Spze(s?)k&YgIj}$HCC*_^k0^{|5v2 B%n$$o diff --git a/content_manager/locale/fr/LC_MESSAGES/django.po b/content_manager/locale/fr/LC_MESSAGES/django.po index a8295d57..7b21ae91 100644 --- a/content_manager/locale/fr/LC_MESSAGES/django.po +++ b/content_manager/locale/fr/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-17 12:23+0200\n" -"PO-Revision-Date: 2024-06-17 15:25+0200\n" +"POT-Creation-Date: 2024-06-17 17:45+0200\n" +"PO-Revision-Date: 2024-06-17 17:46+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -26,13 +26,13 @@ msgstr "Afficher le titre sur l’image d’en-tête ?" msgid "Header image" msgstr "Image d’en-tête" -#: content_manager/abstract.py:37 content_manager/blocks.py:716 -#: content_manager/blocks.py:755 +#: content_manager/abstract.py:37 content_manager/blocks.py:721 +#: content_manager/blocks.py:760 msgid "Background color" msgstr "Couleur de fond" -#: content_manager/abstract.py:41 content_manager/blocks.py:718 -#: content_manager/blocks.py:757 +#: content_manager/abstract.py:41 content_manager/blocks.py:723 +#: content_manager/blocks.py:762 msgid "Uses the French Design System colors" msgstr "Utilise les couleurs du système de design de l'État" @@ -48,7 +48,7 @@ msgstr "Assombrir l’image de fond" msgid "Call to action text" msgstr "Texte de l’appel à action" -#: content_manager/abstract.py:54 content_manager/blocks.py:611 +#: content_manager/abstract.py:54 content_manager/blocks.py:616 msgid "Call to action label" msgstr "Libellé de l’appel à action" @@ -109,8 +109,8 @@ msgid "Link label" msgstr "Libellé du lien" #: content_manager/blocks.py:82 content_manager/blocks.py:271 -#: content_manager/blocks.py:368 content_manager/blocks.py:503 -#: content_manager/blocks.py:564 content_manager/blocks.py:615 +#: content_manager/blocks.py:368 content_manager/blocks.py:508 +#: content_manager/blocks.py:569 content_manager/blocks.py:620 msgid "Link" msgstr "Lien" @@ -171,9 +171,9 @@ msgstr "Badge" #: content_manager/blocks.py:181 content_manager/blocks.py:252 #: content_manager/blocks.py:358 content_manager/blocks.py:400 #: content_manager/blocks.py:405 content_manager/blocks.py:426 -#: content_manager/blocks.py:468 content_manager/blocks.py:538 -#: content_manager/blocks.py:593 content_manager/blocks.py:602 -#: content_manager/blocks.py:623 content_manager/blocks.py:729 +#: content_manager/blocks.py:468 content_manager/blocks.py:543 +#: content_manager/blocks.py:598 content_manager/blocks.py:607 +#: content_manager/blocks.py:628 content_manager/blocks.py:734 #: content_manager/models.py:275 msgid "Title" msgstr "Titre" @@ -197,30 +197,30 @@ msgstr "Tag" #: content_manager/blocks.py:254 content_manager/blocks.py:360 #: content_manager/blocks.py:414 content_manager/blocks.py:428 -#: content_manager/blocks.py:540 content_manager/blocks.py:731 +#: content_manager/blocks.py:545 content_manager/blocks.py:736 msgid "Heading level" msgstr "Niveau de titre" #: content_manager/blocks.py:257 content_manager/blocks.py:363 #: content_manager/blocks.py:417 content_manager/blocks.py:431 -#: content_manager/blocks.py:544 +#: content_manager/blocks.py:549 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:259 content_manager/blocks.py:365 #: content_manager/blocks.py:401 content_manager/blocks.py:435 -#: content_manager/blocks.py:449 content_manager/blocks.py:759 +#: content_manager/blocks.py:449 content_manager/blocks.py:764 msgid "Content" msgstr "Contenu" #: content_manager/blocks.py:260 content_manager/blocks.py:366 -#: content_manager/blocks.py:483 content_manager/blocks.py:546 -#: content_manager/blocks.py:572 content_manager/blocks.py:665 +#: content_manager/blocks.py:488 content_manager/blocks.py:551 +#: content_manager/blocks.py:577 content_manager/blocks.py:670 msgid "Image" msgstr "Image" #: content_manager/blocks.py:262 content_manager/blocks.py:330 -#: content_manager/blocks.py:558 +#: content_manager/blocks.py:563 msgid "Image ratio" msgstr "Ratio de l’image" @@ -237,8 +237,8 @@ msgid "Link (obsolete)" msgstr "Lien (obsolète)" #: content_manager/blocks.py:279 content_manager/blocks.py:287 -#: content_manager/blocks.py:511 content_manager/blocks.py:519 -#: content_manager/blocks.py:527 +#: content_manager/blocks.py:516 content_manager/blocks.py:524 +#: content_manager/blocks.py:532 msgid "" "This field is obsolete and will be removed in the near future. Please " "replace with the Link field above." @@ -362,7 +362,7 @@ msgid "Message type" msgstr "Type de message" #: content_manager/blocks.py:438 content_manager/blocks.py:451 -#: content_manager/blocks.py:577 +#: content_manager/blocks.py:582 msgid "Color" msgstr "Couleur" @@ -386,113 +386,121 @@ msgstr "Exemple pour Tally : https://tally.so/embed/w2jMRa" msgid "Height (in pixels)" msgstr "Hauteur (en pixels)" -#: content_manager/blocks.py:485 +#: content_manager/blocks.py:477 +msgid "Parameters" +msgstr "Paramètres" + +#: content_manager/blocks.py:478 +msgid "For example: \"allow='geolocation'\"." +msgstr "Par exemple : « allow='geolocation' »." + +#: content_manager/blocks.py:490 msgid "Side where the image is displayed" msgstr "Côté où afficher l’image" -#: content_manager/blocks.py:487 +#: content_manager/blocks.py:492 msgid "Left" msgstr "Gauche" -#: content_manager/blocks.py:488 +#: content_manager/blocks.py:493 msgid "Right" msgstr "Droite" -#: content_manager/blocks.py:493 +#: content_manager/blocks.py:498 msgid "Image width" msgstr "Largeur de l’image" -#: content_manager/blocks.py:501 content_manager/blocks.py:609 -#: content_manager/blocks.py:664 content_manager/blocks.py:767 +#: content_manager/blocks.py:506 content_manager/blocks.py:614 +#: content_manager/blocks.py:669 content_manager/blocks.py:772 msgid "Rich text" msgstr "Texte avec mise en forme" -#: content_manager/blocks.py:505 +#: content_manager/blocks.py:510 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:508 +#: content_manager/blocks.py:513 msgid "Link label (obsolete)" msgstr "Libellé du lien (obsolète)" -#: content_manager/blocks.py:516 +#: content_manager/blocks.py:521 msgid "Internal link (obsolete)" msgstr "Lien interne (obsolète)" -#: content_manager/blocks.py:524 +#: content_manager/blocks.py:529 msgid "Link URL (obsolete)" msgstr "URL du lien (obsolète)" -#: content_manager/blocks.py:548 +#: content_manager/blocks.py:553 msgid "Alternative text (textual description of the image)" msgstr "Alternative textuelle (description textuelle de l’image)" -#: content_manager/blocks.py:552 content_manager/blocks.py:644 +#: content_manager/blocks.py:557 content_manager/blocks.py:649 msgid "Witdh" msgstr "Largeur" -#: content_manager/blocks.py:563 content_manager/blocks.py:633 +#: content_manager/blocks.py:568 content_manager/blocks.py:638 msgid "Caption" msgstr "Légende" -#: content_manager/blocks.py:573 content_manager/blocks.py:670 -#: content_manager/blocks.py:773 +#: content_manager/blocks.py:578 content_manager/blocks.py:675 +#: content_manager/blocks.py:778 msgid "Quote" msgstr "Citation" -#: content_manager/blocks.py:574 +#: content_manager/blocks.py:579 msgid "Author name" msgstr "Nom de l’auteur" -#: content_manager/blocks.py:575 +#: content_manager/blocks.py:580 msgid "Author title" msgstr "Titre de l’auteur" -#: content_manager/blocks.py:588 +#: content_manager/blocks.py:593 msgid "Top margin" msgstr "Espacement au dessus" -#: content_manager/blocks.py:589 +#: content_manager/blocks.py:594 msgid "Bottom margin" msgstr "Espacement en dessous" -#: content_manager/blocks.py:594 +#: content_manager/blocks.py:599 msgid "Detail" msgstr "Détail" -#: content_manager/blocks.py:598 +#: content_manager/blocks.py:603 msgid "Step" msgstr "Étape" -#: content_manager/blocks.py:603 +#: content_manager/blocks.py:608 msgid "Number of steps" msgstr "Nombre d’étapes" -#: content_manager/blocks.py:604 +#: content_manager/blocks.py:609 msgid "Current step" msgstr "Étape actuelle" -#: content_manager/blocks.py:605 +#: content_manager/blocks.py:610 msgid "Steps" msgstr "Étapes" -#: content_manager/blocks.py:612 +#: content_manager/blocks.py:617 msgid "The link appears as a button under the text block" msgstr "Le lien apparaît comme un bouton sous le bloc de texte" -#: content_manager/blocks.py:624 +#: content_manager/blocks.py:629 msgid "Transcription content" msgstr "Contenu de la transcription" -#: content_manager/blocks.py:632 +#: content_manager/blocks.py:637 msgid "Video title" msgstr "Titre de la vidéo" -#: content_manager/blocks.py:635 +#: content_manager/blocks.py:640 msgid "Video URL" msgstr "URL de la vidéo" -#: content_manager/blocks.py:637 +#: content_manager/blocks.py:642 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 " @@ -503,88 +511,88 @@ msgstr "" "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:650 +#: content_manager/blocks.py:655 msgid "Video ratio" msgstr "Ratio de la vidéo" -#: content_manager/blocks.py:655 content_manager/blocks.py:667 -#: content_manager/blocks.py:775 +#: content_manager/blocks.py:660 content_manager/blocks.py:672 +#: content_manager/blocks.py:780 msgid "Transcription" msgstr "Transcription" -#: content_manager/blocks.py:666 content_manager/blocks.py:774 +#: content_manager/blocks.py:671 content_manager/blocks.py:779 msgid "Video" msgstr "Vidéo" -#: content_manager/blocks.py:668 content_manager/blocks.py:771 +#: content_manager/blocks.py:673 content_manager/blocks.py:776 msgid "Callout" msgstr "Mise en avant" -#: content_manager/blocks.py:668 content_manager/blocks.py:669 -#: content_manager/blocks.py:670 content_manager/blocks.py:673 -#: content_manager/blocks.py:674 content_manager/blocks.py:681 -#: content_manager/blocks.py:706 content_manager/blocks.py:746 -#: content_manager/blocks.py:771 content_manager/blocks.py:772 -#: content_manager/blocks.py:773 content_manager/blocks.py:779 -#: content_manager/blocks.py:780 content_manager/blocks.py:781 -#: content_manager/blocks.py:782 +#: content_manager/blocks.py:673 content_manager/blocks.py:674 +#: content_manager/blocks.py:675 content_manager/blocks.py:678 +#: content_manager/blocks.py:679 content_manager/blocks.py:686 +#: content_manager/blocks.py:711 content_manager/blocks.py:751 +#: content_manager/blocks.py:776 content_manager/blocks.py:777 +#: content_manager/blocks.py:778 content_manager/blocks.py:784 +#: content_manager/blocks.py:785 content_manager/blocks.py:786 +#: content_manager/blocks.py:787 msgid "DSFR components" msgstr "Composants du DSFR" -#: content_manager/blocks.py:669 content_manager/blocks.py:772 +#: content_manager/blocks.py:674 content_manager/blocks.py:777 msgid "Highlight" msgstr "Mise en exergue" -#: content_manager/blocks.py:671 +#: content_manager/blocks.py:676 msgid "Text and call to action" msgstr "Texte et appel à action" -#: content_manager/blocks.py:672 content_manager/blocks.py:778 +#: content_manager/blocks.py:677 content_manager/blocks.py:783 msgid "Single link" msgstr "Lien isolé" -#: content_manager/blocks.py:673 content_manager/blocks.py:784 +#: content_manager/blocks.py:678 content_manager/blocks.py:789 msgid "Iframe" msgstr "Iframe" -#: content_manager/blocks.py:674 content_manager/blocks.py:780 +#: content_manager/blocks.py:679 content_manager/blocks.py:785 msgid "Tile" msgstr "Tuile" -#: content_manager/blocks.py:681 content_manager/blocks.py:706 +#: content_manager/blocks.py:686 content_manager/blocks.py:711 msgid "Vertical card" msgstr "Carte verticale" -#: content_manager/blocks.py:686 +#: content_manager/blocks.py:691 msgid "Column width" msgstr "Largeur de colonne" -#: content_manager/blocks.py:696 +#: content_manager/blocks.py:701 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:699 +#: content_manager/blocks.py:704 msgid "Column content" msgstr "Contenu de la colonnne" -#: content_manager/blocks.py:707 +#: content_manager/blocks.py:712 msgid "Adjustable column" msgstr "Colonne ajustable" -#: content_manager/blocks.py:707 content_manager/blocks.py:785 -#: content_manager/blocks.py:786 content_manager/blocks.py:787 +#: content_manager/blocks.py:712 content_manager/blocks.py:790 +#: content_manager/blocks.py:791 content_manager/blocks.py:792 msgid "Page structure" msgstr "Structure de la page" -#: content_manager/blocks.py:714 content_manager/blocks.py:753 +#: content_manager/blocks.py:719 content_manager/blocks.py:758 msgid "Background image" msgstr "Image de fond" -#: content_manager/blocks.py:721 +#: content_manager/blocks.py:726 msgid "Background color, hexadecimal format (obsolete)" msgstr "Couleur de fond, format hexadécimal (obsolète)" -#: content_manager/blocks.py:724 +#: content_manager/blocks.py:729 msgid "" "This field is obsolete and will be removed in the near future. Replace it " "with the background color." @@ -592,81 +600,81 @@ msgstr "" "Ce champ est obsolète et sera prochainement supprimé. Merci de le remplacer " "avec la couleur de fond." -#: content_manager/blocks.py:726 +#: content_manager/blocks.py:731 msgid "Incorrect color format, must be #fff or #f5f5f5" msgstr "Format de couleur incorrect, doit être #fff ou #f5f5f5" -#: content_manager/blocks.py:735 +#: content_manager/blocks.py:740 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:737 +#: content_manager/blocks.py:742 msgid "Columns" msgstr "Colonnes" -#: content_manager/blocks.py:745 content_manager/blocks.py:769 +#: content_manager/blocks.py:750 content_manager/blocks.py:774 msgid "Image and text" msgstr "Image et texte" -#: content_manager/blocks.py:746 content_manager/blocks.py:779 +#: content_manager/blocks.py:751 content_manager/blocks.py:784 msgid "Horizontal card" msgstr "Carte horizontale" -#: content_manager/blocks.py:770 +#: content_manager/blocks.py:775 msgid "Alert message" msgstr "Message d’alerte" -#: content_manager/blocks.py:776 +#: content_manager/blocks.py:781 msgid "Badge list" msgstr "Liste de badges" -#: content_manager/blocks.py:777 +#: content_manager/blocks.py:782 msgid "Tag list" msgstr "Liste de tags" -#: content_manager/blocks.py:781 +#: content_manager/blocks.py:786 msgid "Accordions" msgstr "Accordéons" -#: content_manager/blocks.py:782 +#: content_manager/blocks.py:787 msgid "Stepper" msgstr "Étapier" -#: content_manager/blocks.py:783 +#: content_manager/blocks.py:788 msgid "Markdown" msgstr "Markdown" -#: content_manager/blocks.py:783 content_manager/blocks.py:784 -#: content_manager/blocks.py:810 +#: content_manager/blocks.py:788 content_manager/blocks.py:789 +#: content_manager/blocks.py:815 msgid "Expert syntax" msgstr "Syntaxe experte" -#: content_manager/blocks.py:785 +#: content_manager/blocks.py:790 msgid "Separator" msgstr "Séparateur" -#: content_manager/blocks.py:786 +#: content_manager/blocks.py:791 msgid "Multiple columns" msgstr "Multi-colonnes" -#: content_manager/blocks.py:787 +#: content_manager/blocks.py:792 msgid "Full width background" msgstr "Fond pleine largeur" -#: content_manager/blocks.py:791 +#: content_manager/blocks.py:796 msgid "Subpages list" msgstr "Liste des sous-pages" -#: content_manager/blocks.py:792 +#: content_manager/blocks.py:797 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:794 +#: content_manager/blocks.py:799 msgid "Website structure" msgstr "Structure du site" -#: content_manager/blocks.py:808 +#: content_manager/blocks.py:813 msgid "" "Warning: Use HTML block with caution. Malicious code can compromise the " "security of the site." 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 00000000..4a1880f9 --- /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/templates/content_manager/blocks/iframe.html b/content_manager/templates/content_manager/blocks/iframe.html index 4178b436..e2eb0ba3 100644 --- a/content_manager/templates/content_manager/blocks/iframe.html +++ b/content_manager/templates/content_manager/blocks/iframe.html @@ -1,4 +1 @@ - +