diff --git a/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py deleted file mode 100644 index b5b05180..00000000 --- a/blog/migrations/0017_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py +++ /dev/null @@ -1,18046 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-10 15:54 - -import wagtail.blocks -import wagtail.documents.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks -from django.db import migrations - -import content_manager.blocks - - -class Migration(migrations.Migration): - dependencies = [ - ("blog", "0016_alter_blogentrypage_body_alter_blogindexpage_body"), - ] - - operations = [ - migrations.AlterField( - model_name="blogentrypage", - name="body", - field=wagtail.fields.StreamField( - [ - ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", required=False - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ] - ), - ), - ( - "imageandtext", - wagtail.blocks.StructBlock( - [ - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "alert", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), - ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), - ( - "level", - wagtail.blocks.ChoiceBlock( - choices=[ - ("error", "Error"), - ("success", "Success"), - ("info", "Information"), - ("warning", "Warning"), - ], - label="Message type", - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ], - label="Alert message", - ), - ), - ( - "callout", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), - ( - "text", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", 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.TextBlock(help_text="Can contain HTML.", 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.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", [("new", "New"), ("grey", "Grey")]), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock(label="Top detail: text", required=False), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-btn", "Primary"), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Card without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Card without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", label="Image", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Tile without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Tile without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "accordions", - wagtail.blocks.StreamBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "accordion", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("content", wagtail.blocks.RichTextBlock(label="Content")), - ], - label="Accordion", - max_num=15, - min_num=1, - ), - ), - ], - group="DSFR components", - label="Accordions", - ), - ), - ( - "stepper", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), - ("current", wagtail.blocks.IntegerBlock(label="Current step")), - ( - "steps", - wagtail.blocks.StreamBlock( - [ - ( - "step", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("detail", wagtail.blocks.TextBlock(label="Detail")), - ], - label="Step", - ), - ) - ], - label="Steps", - ), - ), - ], - group="DSFR components", - label="Stepper", - ), - ), - ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), - ], - group="Expert syntax", - label="Iframe", - ), - ), - ( - "separator", - wagtail.blocks.StructBlock( - [ - ( - "top_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Top margin", max_value=15, min_value=0 - ), - ), - ( - "bottom_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Bottom margin", max_value=15, min_value=0 - ), - ), - ], - group="Page structure", - label="Separator", - ), - ), - ( - "multicolumns", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "bg_color", - wagtail.blocks.RegexBlock( - error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, - help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", - label="Background color, hexadecimal format (obsolete)", - regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", - required=False, - ), - ), - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 2.", - label="Heading level", - required=False, - ), - ), - ( - "columns", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ( - "column", - wagtail.blocks.StructBlock( - [ - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("3", "3/12"), - ("4", "4/12"), - ("5", "5/12"), - ("6", "6/12"), - ("7", "7/12"), - ("8", "8/12"), - ("9", "9/12"), - ], - help_text="The total width of all columns should be 12.", - label="Column width", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text" - ), - ), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title", required=False - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image" - ), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - label="Link", required=False - ), - ), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", - label="Content", - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "quote", - wagtail.blocks.CharBlock( - label="Quote" - ), - ), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", - required=False, - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", - required=False, - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock( - label="Link", required=False - ), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock( - label="Height (in pixels)" - ), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", - required=False, - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", - required=False, - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", - required=False, - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", - required=False, - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", - required=False, - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ], - label="Column content", - ), - ), - ], - group="Page structure", - label="Adjustable column", - ), - ), - ], - label="Columns", - ), - ), - ], - group="Page structure", - label="Multiple columns", - ), - ), - ( - "fullwidthbackground", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "image_and_text", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], - label="Image width", - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ], - label="Content", - ), - ), - ], - group="Page structure", - label="Full width background", - ), - ), - ( - "html", - wagtail.blocks.RawHTMLBlock( - group="Expert syntax", - help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", - readonly=True, - ), - ), - ], - blank=True, - ), - ), - migrations.AlterField( - model_name="blogindexpage", - name="body", - field=wagtail.fields.StreamField( - [ - ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", required=False - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ] - ), - ), - ( - "imageandtext", - wagtail.blocks.StructBlock( - [ - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "alert", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), - ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), - ( - "level", - wagtail.blocks.ChoiceBlock( - choices=[ - ("error", "Error"), - ("success", "Success"), - ("info", "Information"), - ("warning", "Warning"), - ], - label="Message type", - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ], - label="Alert message", - ), - ), - ( - "callout", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "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.TextBlock( - help_text="Can contain HTML.", 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.TextBlock(help_text="Can contain HTML.", 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.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", [("new", "New"), ("grey", "Grey")]), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock(label="Top detail: text", required=False), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-btn", "Primary"), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Card without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Card without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", label="Image", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Tile without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Tile without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "accordions", - wagtail.blocks.StreamBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "accordion", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("content", wagtail.blocks.RichTextBlock(label="Content")), - ], - label="Accordion", - max_num=15, - min_num=1, - ), - ), - ], - group="DSFR components", - label="Accordions", - ), - ), - ( - "stepper", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), - ("current", wagtail.blocks.IntegerBlock(label="Current step")), - ( - "steps", - wagtail.blocks.StreamBlock( - [ - ( - "step", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("detail", wagtail.blocks.TextBlock(label="Detail")), - ], - label="Step", - ), - ) - ], - label="Steps", - ), - ), - ], - group="DSFR components", - label="Stepper", - ), - ), - ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), - ], - group="Expert syntax", - label="Iframe", - ), - ), - ( - "separator", - wagtail.blocks.StructBlock( - [ - ( - "top_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Top margin", max_value=15, min_value=0 - ), - ), - ( - "bottom_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Bottom margin", max_value=15, min_value=0 - ), - ), - ], - group="Page structure", - label="Separator", - ), - ), - ( - "multicolumns", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "bg_color", - wagtail.blocks.RegexBlock( - error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, - help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", - label="Background color, hexadecimal format (obsolete)", - regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", - required=False, - ), - ), - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 2.", - label="Heading level", - required=False, - ), - ), - ( - "columns", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ( - "column", - wagtail.blocks.StructBlock( - [ - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("3", "3/12"), - ("4", "4/12"), - ("5", "5/12"), - ("6", "6/12"), - ("7", "7/12"), - ("8", "8/12"), - ("9", "9/12"), - ], - help_text="The total width of all columns should be 12.", - label="Column width", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text" - ), - ), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title", required=False - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image" - ), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - label="Link", required=False - ), - ), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", - label="Content", - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "quote", - wagtail.blocks.CharBlock( - label="Quote" - ), - ), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", - required=False, - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", - required=False, - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock( - label="Link", required=False - ), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock( - label="Height (in pixels)" - ), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", - required=False, - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", - required=False, - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", - required=False, - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", - required=False, - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", - required=False, - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ], - label="Column content", - ), - ), - ], - group="Page structure", - label="Adjustable column", - ), - ), - ], - label="Columns", - ), - ), - ], - group="Page structure", - label="Multiple columns", - ), - ), - ( - "fullwidthbackground", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "image_and_text", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], - label="Image width", - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ], - label="Content", - ), - ), - ], - group="Page structure", - label="Full width background", - ), - ), - ( - "html", - wagtail.blocks.RawHTMLBlock( - group="Expert syntax", - help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", - readonly=True, - ), - ), - ], - blank=True, - ), - ), - migrations.AlterField( - model_name="category", - name="colophon", - field=wagtail.fields.StreamField( - [ - ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "imageandtext", - wagtail.blocks.StructBlock( - [ - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Bloc image et texte", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ("author_name", wagtail.blocks.CharBlock(label="Author name", required=False)), - ("author_title", wagtail.blocks.CharBlock(label="Author title", required=False)), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - label="Citation", - ), - ), - ( - "multicolumns", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "bg_color", - wagtail.blocks.RegexBlock( - error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, - help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", - label="Background color, hexadecimal format (obsolete)", - regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", - required=False, - ), - ), - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 2.", - label="Heading level", - required=False, - ), - ), - ( - "columns", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ( - "column", - wagtail.blocks.StructBlock( - [ - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("3", "3/12"), - ("4", "4/12"), - ("5", "5/12"), - ("6", "6/12"), - ("7", "7/12"), - ("8", "8/12"), - ("9", "9/12"), - ], - help_text="The total width of all columns should be 12.", - label="Column width", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text" - ), - ), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title", required=False - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image" - ), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - label="Link", required=False - ), - ), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", - label="Content", - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "quote", - wagtail.blocks.CharBlock( - label="Quote" - ), - ), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", - required=False, - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", - required=False, - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock( - label="Link", required=False - ), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock( - label="Height (in pixels)" - ), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", - required=False, - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", - required=False, - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", - required=False, - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", - required=False, - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", - required=False, - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ], - label="Column content", - ), - ), - ], - group="Page structure", - label="Adjustable column", - ), - ), - ], - label="Columns", - ), - ), - ], - label="Multi-colonnes", - ), - ), - ( - "contact_card", - wagtail.blocks.StructBlock( - [ - ("name", wagtail.blocks.CharBlock(label="Name", max_length=255)), - ("role", wagtail.blocks.CharBlock(label="Role", max_length=255)), - ("organization", wagtail.blocks.CharBlock(label="Organization", max_length=255)), - ( - "contact_info", - wagtail.blocks.CharBlock(label="Contact info", max_length=500, required=False), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ], - label="Contact card", - ), - ), - ], - blank=True, - help_text="Text displayed at the end of every page in the category", - ), - ), - ] diff --git a/config/settings.py b/config/settings.py index 494cfa5e..03faf960 100644 --- a/config/settings.py +++ b/config/settings.py @@ -105,6 +105,18 @@ "debug_toolbar.middleware.DebugToolbarMiddleware", ] + # Don't show the toolbar on admin previews + def show_toolbar(request): + request.META["wsgi.multithread"] = True + request.META["wsgi.multiprocess"] = True + excluded_urls = ["/pages/preview/", "/pages/preview_loading/", "/edit/preview/"] + excluded = any(request.path.endswith(url) for url in excluded_urls) + return DEBUG and not excluded + + DEBUG_TOOLBAR_CONFIG = { + "SHOW_TOOLBAR_CALLBACK": show_toolbar, + } + ROOT_URLCONF = "config.urls" TEMPLATES = [ diff --git a/content_manager/blocks.py b/content_manager/blocks.py index 97b65a0a..6f41ebb6 100644 --- a/content_manager/blocks.py +++ b/content_manager/blocks.py @@ -256,7 +256,7 @@ class CardBlock(blocks.StructBlock): default="h3", help_text=_("Adapt to the page layout. Defaults to heading 3."), ) - description = blocks.TextBlock(label=_("Content"), help_text=_("Can contain HTML."), required=False) + description = blocks.RichTextBlock(label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES, required=False) image = ImageChooserBlock(label=_("Image"), required=False) image_ratio = blocks.ChoiceBlock( label=_("Image ratio"), @@ -362,7 +362,7 @@ class TileBlock(blocks.StructBlock): default="h3", help_text=_("Adapt to the page layout. Defaults to heading 3."), ) - description = blocks.TextBlock(label=_("Content"), help_text=_("Can contain HTML."), required=False) + description = blocks.RichTextBlock(label=_("Content"), features=LIMITED_RICHTEXTFIELD_FEATURES, required=False) image = ImageChooserBlock(label=_("Image"), help_text=_("Prefer SVG files."), required=False) link = LinkWithoutLabelBlock( label=_("Link"), diff --git a/content_manager/migrations/0033_alter_contentpage_body.py b/content_manager/migrations/0033_alter_contentpage_body.py deleted file mode 100644 index f729dd3f..00000000 --- a/content_manager/migrations/0033_alter_contentpage_body.py +++ /dev/null @@ -1,7117 +0,0 @@ -# Generated by Django 5.0.6 on 2024-06-10 15:54 - -import wagtail.blocks -import wagtail.documents.blocks -import wagtail.fields -import wagtail.images.blocks -import wagtailmarkdown.blocks -from django.db import migrations - -import content_manager.blocks - - -class Migration(migrations.Migration): - dependencies = [ - ("content_manager", "0032_alter_contentpage_body"), - ] - - operations = [ - migrations.AlterField( - model_name="contentpage", - name="body", - field=wagtail.fields.StreamField( - [ - ("paragraph", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", required=False - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ("caption", wagtail.blocks.CharBlock(label="Caption", required=False)), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ] - ), - ), - ( - "imageandtext", - wagtail.blocks.StructBlock( - [ - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image")), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], label="Image width" - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ("text", wagtail.blocks.CharBlock(label="Link label", required=False)), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "alert", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Message title", required=False)), - ("description", wagtail.blocks.TextBlock(label="Message text", required=False)), - ( - "level", - wagtail.blocks.ChoiceBlock( - choices=[ - ("error", "Error"), - ("success", "Success"), - ("info", "Information"), - ("warning", "Warning"), - ], - label="Message type", - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ], - label="Alert message", - ), - ), - ( - "callout", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ("icon_class", content_manager.blocks.IconPickerBlock(label="Icon", required=False)), - ( - "text", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", 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.TextBlock(help_text="Can contain HTML.", 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.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ("image", wagtail.images.blocks.ImageChooserBlock(label="Image", required=False)), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", [("new", "New"), ("grey", "Grey")]), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock(label="Top detail: text", required=False), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock(label="Top detail: icon", required=False), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-btn", "Primary"), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Card with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Card without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Card without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Card with a shadow", required=False)), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", label="Content", required=False - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", label="Image", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [("new", "New"), ("grey", "Grey")], - ), - ( - "System colors", - [ - ("info", "Info"), - ("success", "Success"), - ("warning", "Warning"), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", required=False - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ("label", wagtail.blocks.CharBlock(label="Title")), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ( - "orange-terre-battue", - "Terre battue", - ), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", required=False - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ("is_small", wagtail.blocks.BooleanBlock(label="Small tile", required=False)), - ( - "grey_background", - wagtail.blocks.BooleanBlock(label="Tile with grey background", required=False), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock(label="Tile without background", required=False), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock(label="Tile without border", required=False), - ), - ("shadow", wagtail.blocks.BooleanBlock(label="Tile with a shadow", required=False)), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock(label="Horizontal tile", required=False), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "accordions", - wagtail.blocks.StreamBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "accordion", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("content", wagtail.blocks.RichTextBlock(label="Content")), - ], - label="Accordion", - max_num=15, - min_num=1, - ), - ), - ], - group="DSFR components", - label="Accordions", - ), - ), - ( - "stepper", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("total", wagtail.blocks.IntegerBlock(label="Number of steps")), - ("current", wagtail.blocks.IntegerBlock(label="Current step")), - ( - "steps", - wagtail.blocks.StreamBlock( - [ - ( - "step", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ("detail", wagtail.blocks.TextBlock(label="Detail")), - ], - label="Step", - ), - ) - ], - label="Steps", - ), - ), - ], - group="DSFR components", - label="Stepper", - ), - ), - ("markdown", wagtailmarkdown.blocks.MarkdownBlock(group="Expert syntax", label="Markdown")), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ("height", wagtail.blocks.IntegerBlock(label="Height (in pixels)")), - ], - group="Expert syntax", - label="Iframe", - ), - ), - ( - "separator", - wagtail.blocks.StructBlock( - [ - ( - "top_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Top margin", max_value=15, min_value=0 - ), - ), - ( - "bottom_margin", - wagtail.blocks.IntegerBlock( - default=3, label="Bottom margin", max_value=15, min_value=0 - ), - ), - ], - group="Page structure", - label="Separator", - ), - ), - ( - "multicolumns", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "bg_color", - wagtail.blocks.RegexBlock( - error_messages={"invalid": "Incorrect color format, must be #fff or #f5f5f5"}, - help_text="This field is obsolete and will be removed in the near future. Replace it with the background color.", - label="Background color, hexadecimal format (obsolete)", - regex="^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", - required=False, - ), - ), - ("title", wagtail.blocks.CharBlock(label="Title", required=False)), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 2.", - label="Heading level", - required=False, - ), - ), - ( - "columns", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ( - "column", - wagtail.blocks.StructBlock( - [ - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("3", "3/12"), - ("4", "4/12"), - ("5", "5/12"), - ("6", "6/12"), - ("7", "7/12"), - ("8", "8/12"), - ("9", "9/12"), - ], - help_text="The total width of all columns should be 12.", - label="Column width", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text" - ), - ), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title", required=False - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image" - ), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - label="Link", required=False - ), - ), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock( - label="Caption", required=False - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-content-media--sm", - "Small", - ), - ("", "Medium"), - ( - "fr-content-media--lg", - "Large", - ), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", - label="Content", - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "quote", - wagtail.blocks.CharBlock( - label="Quote" - ), - ), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", - required=False, - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ("green-menthe", "Menthe"), - ( - "green-archipel", - "Archipel", - ), - ("blue-ecume", "Écume"), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ("pink-tuile", "Tuile"), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ("brown-opera", "Opéra"), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", - required=False, - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock( - label="Link", required=False - ), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock( - label="Height (in pixels)" - ), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", - required=False, - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", - required=False, - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", - required=False, - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", - required=False, - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", - required=False, - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", - required=False, - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", - required=False, - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", - required=False, - ), - ), - ], - group="DSFR components", - label="Vertical card", - ), - ), - ], - label="Column content", - ), - ), - ], - group="Page structure", - label="Adjustable column", - ), - ), - ], - label="Columns", - ), - ), - ], - group="Page structure", - label="Multiple columns", - ), - ), - ( - "fullwidthbackground", - wagtail.blocks.StructBlock( - [ - ( - "bg_image", - wagtail.images.blocks.ImageChooserBlock(label="Background image", required=False), - ), - ( - "bg_color_class", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "Primary colors", - [("blue-france", "Blue France"), ("red-marianne", "Red Marianne")], - ), - ("Neutral colors", [("grey", "Grey")]), - ( - "Illustration colors", - [ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - ), - ], - help_text="Uses the French Design System colors", - label="Background color", - required=False, - ), - ), - ( - "content", - wagtail.blocks.StreamBlock( - [ - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "image", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock(label="Title", required=False), - ), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "alt", - wagtail.blocks.CharBlock( - label="Alternative text (textual description of the image)", - required=False, - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-32x9", "32x9"), - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-3x2", "3x2"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ("fr-ratio-3x4", "3x4"), - ("fr-ratio-2x3", "2x3"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ("url", wagtail.blocks.URLBlock(label="Link", required=False)), - ], - label="Image", - ), - ), - ( - "video", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - label="Video title", required=False - ), - ), - ( - "caption", - wagtail.blocks.CharBlock(label="Caption", required=False), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Use embed format, with a version that doesn't require a consent banner if available. (e.g. : https://www.youtube-nocookie.com/embed/gLzXOViPX-0) For Youtube, use Embed video and check Enable privacy-enhanced mode.", - label="Video URL", - ), - ), - ( - "width", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-content-media--sm", "Small"), - ("", "Medium"), - ("fr-content-media--lg", "Large"), - ], - label="Witdh", - required=False, - ), - ), - ( - "video_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-ratio-16x9", "16x9"), - ("fr-ratio-4x3", "4x3"), - ("fr-ratio-1x1", "1x1"), - ], - label="Video ratio", - required=False, - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", - label="Title", - required=False, - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", - required=False, - ), - ), - ], - label="Transcription", - required=False, - ), - ), - ], - label="Video", - ), - ), - ( - "transcription", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - default="Transcription", label="Title", required=False - ), - ), - ( - "content", - wagtail.blocks.RichTextBlock( - label="Transcription content", required=False - ), - ), - ], - label="Transcription", - ), - ), - ( - "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.TextBlock( - help_text="Can contain HTML.", - 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.TextBlock( - help_text="Can contain HTML.", label="Content" - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-text--sm", "Small"), - ("", "Medium"), - ("fr-text--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - group="DSFR components", - label="Highlight", - ), - ), - ( - "quote", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ("quote", wagtail.blocks.CharBlock(label="Quote")), - ( - "author_name", - wagtail.blocks.CharBlock( - label="Author name", required=False - ), - ), - ( - "author_title", - wagtail.blocks.CharBlock( - label="Author title", required=False - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ("green-tilleul-verveine", "Tilleul verveine"), - ("green-bourgeon", "Bourgeon"), - ("green-emeraude", "Émeraude"), - ("green-menthe", "Menthe"), - ("green-archipel", "Archipel"), - ("blue-ecume", "Écume"), - ("blue-cumulus", "Cumulus"), - ("purple-glycine", "Glycine"), - ("pink-macaron", "Macaron"), - ("pink-tuile", "Tuile"), - ("yellow-tournesol", "Tournesol"), - ("yellow-moutarde", "Moutarde"), - ("orange-terre-battue", "Terre battue"), - ("brown-cafe-creme", "Café crème"), - ("brown-caramel", "Caramel"), - ("brown-opera", "Opéra"), - ("beige-gris-galet", "Gris galet"), - ], - label="Color", - required=False, - ), - ), - ], - group="DSFR components", - label="Quote", - ), - ), - ( - "text_cta", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.RichTextBlock( - label="Rich text", required=False - ), - ), - ( - "cta_label", - wagtail.blocks.CharBlock( - help_text="The link appears as a button under the text block", - label="Call to action label", - required=False, - ), - ), - ( - "cta_url", - wagtail.blocks.CharBlock(label="Link", required=False), - ), - ], - label="Text and call to action", - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - label="Single link", - ), - ), - ( - "iframe", - wagtail.blocks.StructBlock( - [ - ( - "title", - wagtail.blocks.CharBlock( - help_text="Accessibility: The title should describe, in a clear and concise manner, the embedded content.", - label="Title", - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - help_text="Example for Tally: https://tally.so/embed/w2jMRa", - label="URL of the iframe", - ), - ), - ( - "height", - wagtail.blocks.IntegerBlock(label="Height (in pixels)"), - ), - ], - group="DSFR components", - label="Iframe", - ), - ), - ( - "tile", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - help_text="Prefer SVG files.", - label="Image", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "detail_text", - wagtail.blocks.CharBlock( - help_text="If the tile links to a downloadable document, the values are pre-filled.", - label="Detail text", - required=False, - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tile", required=False - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Tile with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Tile without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Tile without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Tile with a shadow", required=False - ), - ), - ( - "is_horizontal", - wagtail.blocks.BooleanBlock( - label="Horizontal tile", required=False - ), - ), - ], - group="DSFR components", - label="Tile", - ), - ), - ( - "image_and_text", - wagtail.blocks.StructBlock( - [ - ( - "image", - wagtail.images.blocks.ImageChooserBlock(label="Image"), - ), - ( - "image_side", - wagtail.blocks.ChoiceBlock( - choices=[("left", "Left"), ("right", "Right")], - label="Side where the image is displayed", - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[("3", "3/12"), ("5", "5/12"), ("6", "6/12")], - label="Image width", - ), - ), - ("text", wagtail.blocks.RichTextBlock(label="Rich text")), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", required=False - ), - ), - ( - "icon", - wagtail.blocks.ChoiceBlock( - choices=[ - ("", "No icon"), - ( - "fr-icon-arrow-right-line fr-link--icon-right", - "Icon on the right side", - ), - ( - "fr-icon-arrow-right-line fr-link--icon-left", - "Icon on the left side", - ), - ], - help_text="Only used for internal links.", - label="Icon", - required=False, - ), - ), - ( - "size", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-link--sm", "Small"), - ("", "Medium"), - ("fr-link--lg", "Large"), - ], - label="Size", - required=False, - ), - ), - ], - help_text="The link is shown at the bottom of the text block, with an arrow", - label="Link", - required=False, - ), - ), - ( - "link_label", - wagtail.blocks.CharBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link label (obsolete)", - required=False, - ), - ), - ( - "page", - wagtail.blocks.PageChooserBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Internal link (obsolete)", - required=False, - ), - ), - ( - "link_url", - wagtail.blocks.URLBlock( - group="obsolete", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link URL (obsolete)", - required=False, - ), - ), - ], - label="Image and text", - ), - ), - ( - "card", - wagtail.blocks.StructBlock( - [ - ("title", wagtail.blocks.CharBlock(label="Title")), - ( - "heading_tag", - wagtail.blocks.ChoiceBlock( - choices=[ - ("h2", "Heading 2"), - ("h3", "Heading 3"), - ("h4", "Heading 4"), - ("h5", "Heading 5"), - ("h6", "Heading 6"), - ("p", "Paragraph"), - ], - help_text="Adapt to the page layout. Defaults to heading 3.", - label="Heading level", - ), - ), - ( - "description", - wagtail.blocks.TextBlock( - help_text="Can contain HTML.", - label="Content", - required=False, - ), - ), - ( - "image", - wagtail.images.blocks.ImageChooserBlock( - label="Image", required=False - ), - ), - ( - "image_ratio", - wagtail.blocks.ChoiceBlock( - choices=[ - ("fr-card--horizontal-tier", "1/3"), - ("fr-card--horizontal-half", "50/50"), - ], - label="Image ratio", - required=False, - ), - ), - ( - "image_badge", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ("new", "New"), - ("grey", "Grey"), - ], - ), - ( - "System colors", - [ - ("info", "Info"), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ("error", "Error"), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ], - help_text="Only used if the card has an image.", - label="Image area badge", - max_num=1, - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - label="Link", - required=False, - ), - ), - ( - "url", - wagtail.blocks.URLBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="Link (obsolete)", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - group="target", - help_text="This field is obsolete and will be removed in the near future. Please replace with the Link field above.", - label="or Document (obsolete)", - required=False, - ), - ), - ( - "top_detail_text", - wagtail.blocks.CharBlock( - label="Top detail: text", required=False - ), - ), - ( - "top_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Top detail: icon", required=False - ), - ), - ( - "top_detail_badges_tags", - wagtail.blocks.StreamBlock( - [ - ( - "badges", - wagtail.blocks.StreamBlock( - [ - ( - "badge", - wagtail.blocks.StructBlock( - [ - ( - "text", - wagtail.blocks.CharBlock( - label="Badge label", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "", - [ - ( - "new", - "New", - ), - ( - "grey", - "Grey", - ), - ], - ), - ( - "System colors", - [ - ( - "info", - "Info", - ), - ( - "success", - "Success", - ), - ( - "warning", - "Warning", - ), - ( - "error", - "Error", - ), - ], - ), - ( - "Illustration colors", - [ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - ), - ], - label="Badge color", - required=False, - ), - ), - ( - "hide_icon", - wagtail.blocks.BooleanBlock( - label="Hide badge icon", - required=False, - ), - ), - ], - label="Badge", - ), - ) - ] - ), - ), - ( - "tags", - wagtail.blocks.StreamBlock( - [ - ( - "tag", - wagtail.blocks.StructBlock( - [ - ( - "label", - wagtail.blocks.CharBlock( - label="Title" - ), - ), - ( - "is_small", - wagtail.blocks.BooleanBlock( - label="Small tag", - required=False, - ), - ), - ( - "color", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "green-tilleul-verveine", - "Tilleul verveine", - ), - ( - "green-bourgeon", - "Bourgeon", - ), - ( - "green-emeraude", - "Émeraude", - ), - ( - "green-menthe", - "Menthe", - ), - ( - "green-archipel", - "Archipel", - ), - ( - "blue-ecume", - "Écume", - ), - ( - "blue-cumulus", - "Cumulus", - ), - ( - "purple-glycine", - "Glycine", - ), - ( - "pink-macaron", - "Macaron", - ), - ( - "pink-tuile", - "Tuile", - ), - ( - "yellow-tournesol", - "Tournesol", - ), - ( - "yellow-moutarde", - "Moutarde", - ), - ( - "orange-terre-battue", - "Terre battue", - ), - ( - "brown-cafe-creme", - "Café crème", - ), - ( - "brown-caramel", - "Caramel", - ), - ( - "brown-opera", - "Opéra", - ), - ( - "beige-gris-galet", - "Gris galet", - ), - ], - help_text="Only for clickable tags", - label="Tag color", - required=False, - ), - ), - ( - "icon_class", - content_manager.blocks.IconPickerBlock( - label="Icon", - required=False, - ), - ), - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ], - required=False, - ), - ), - ], - label="Tag", - ), - ) - ] - ), - ), - ], - label="Top detail: badges or tags", - max_num=1, - required=False, - ), - ), - ( - "bottom_detail_text", - wagtail.blocks.CharBlock( - help_text="Incompatible with the bottom call-to-action. If the card links to a downloadable document, the values are pre-filled.", - label="Bottom detail: text", - required=False, - ), - ), - ( - "bottom_detail_icon", - content_manager.blocks.IconPickerBlock( - label="Bottom detail: icon", required=False - ), - ), - ( - "call_to_action", - wagtail.blocks.StreamBlock( - [ - ( - "links", - wagtail.blocks.StreamBlock( - [ - ( - "link", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ], - label="Link", - ), - ) - ] - ), - ), - ( - "buttons", - wagtail.blocks.StreamBlock( - [ - ( - "button", - wagtail.blocks.StructBlock( - [ - ( - "page", - wagtail.blocks.PageChooserBlock( - help_text="Link to a page of this site. Use either this, the document, or the external URL parameter.", - label="Page", - required=False, - ), - ), - ( - "document", - wagtail.documents.blocks.DocumentChooserBlock( - help_text="Use either this, the external URL or the page parameter.", - label="Document", - required=False, - ), - ), - ( - "external_url", - wagtail.blocks.URLBlock( - help_text="Use either this, the document or the page parameter.", - label="External URL", - required=False, - ), - ), - ( - "text", - wagtail.blocks.CharBlock( - label="Link label", - required=False, - ), - ), - ( - "button_type", - wagtail.blocks.ChoiceBlock( - choices=[ - ( - "fr-btn", - "Primary", - ), - ( - "fr-btn fr-btn--secondary", - "Secundary", - ), - ( - "fr-btn fr-btn--tertiary", - "Tertiary", - ), - ( - "fr-btn fr-btn--tertiary-no-outline", - "Tertiary without border", - ), - ], - label="Button type", - required=False, - ), - ), - ], - label="Button", - ), - ) - ] - ), - ), - ], - help_text="Incompatible with the bottom detail text.", - label="Bottom call-to-action: links or buttons", - max_num=1, - required=False, - ), - ), - ( - "grey_background", - wagtail.blocks.BooleanBlock( - label="Card with grey background", required=False - ), - ), - ( - "no_background", - wagtail.blocks.BooleanBlock( - label="Card without background", required=False - ), - ), - ( - "no_border", - wagtail.blocks.BooleanBlock( - label="Card without border", required=False - ), - ), - ( - "shadow", - wagtail.blocks.BooleanBlock( - label="Card with a shadow", required=False - ), - ), - ], - group="DSFR components", - label="Horizontal card", - ), - ), - ], - label="Content", - ), - ), - ], - group="Page structure", - label="Full width background", - ), - ), - ( - "html", - wagtail.blocks.RawHTMLBlock( - group="Expert syntax", - help_text="Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", - readonly=True, - ), - ), - ], - blank=True, - ), - ), - ] diff --git a/content_manager/templates/content_manager/blocks/card_horizontal.html b/content_manager/templates/content_manager/blocks/card_horizontal.html index 602bda57..e1285e52 100644 --- a/content_manager/templates/content_manager/blocks/card_horizontal.html +++ b/content_manager/templates/content_manager/blocks/card_horizontal.html @@ -1,4 +1,4 @@ -{% load i18n wagtailimages_tags wagtailcore_tags dsfr_tags %} +{% load i18n wagtailimages_tags wagtailcore_tags dsfr_tags wagtail_dsfr_tags %}