From 982b042bebedbb15ee377afaf0be05bd001ee490 Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Tue, 27 Aug 2024 19:18:51 +0200 Subject: [PATCH] [Composants] Listes de cartes et de tuiles (#202) * Add lists of cards and tiles as components * Add migrations * Remove irrelevant migrations * Add new grid component * Remove obsolete translations --- ...entrypage_body_alter_blogindexpage_body.py | 2585 +++++++++++++++++ content_manager/blocks.py | 16 + content_manager/constants.py | 6 + .../locale/fr/LC_MESSAGES/django.mo | Bin 19021 -> 19102 bytes .../locale/fr/LC_MESSAGES/django.po | 478 ++- .../migrations/0042_alter_contentpage_body.py | 1299 +++++++++ .../content_manager/blocks/item_grid.html | 6 + ...trypage_body_alter_eventsindexpage_body.py | 2585 +++++++++++++++++ 8 files changed, 6727 insertions(+), 248 deletions(-) create mode 100644 blog/migrations/0032_alter_blogentrypage_body_alter_blogindexpage_body.py create mode 100644 content_manager/migrations/0042_alter_contentpage_body.py create mode 100644 content_manager/templates/content_manager/blocks/item_grid.html create mode 100644 events/migrations/0006_alter_evententrypage_body_alter_eventsindexpage_body.py diff --git a/blog/migrations/0032_alter_blogentrypage_body_alter_blogindexpage_body.py b/blog/migrations/0032_alter_blogentrypage_body_alter_blogindexpage_body.py new file mode 100644 index 00000000..e931d841 --- /dev/null +++ b/blog/migrations/0032_alter_blogentrypage_body_alter_blogindexpage_body.py @@ -0,0 +1,2585 @@ +# Generated by Django 5.0.8 on 2024-08-27 16:55 + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("blog", "0031_alter_blogentrypage_body_alter_blogindexpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 22), + ("alert", 27), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("video", 49), + ("transcription", 50), + ("badges_list", 55), + ("tags_list", 61), + ("link", 62), + ("card", 84), + ("tile", 94), + ("accordions", 97), + ("stepper", 103), + ("markdown", 104), + ("iframe", 109), + ("separator", 112), + ("multicolumns", 141), + ("item_grid", 144), + ("fullwidthbackground", 146), + ("fullwidthbackgroundwithsidemenu", 153), + ("subpageslist", 154), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("html", 155), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Title", "required": False}), + 2: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "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, + }, + ), + 3: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image"}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Alternative text (textual description of the image)", "required": False}, + ), + 5: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + "label": "Witdh", + "required": False, + }, + ), + 6: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + "label": "Image ratio", + "required": False, + }, + ), + 7: ("wagtail.blocks.CharBlock", (), {"label": "Caption", "required": False}), + 8: ("wagtail.blocks.URLBlock", (), {"label": "Link", "required": False}), + 9: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {}, + ), + 10: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("right", "Right")], + "label": "Side where the image is displayed", + }, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("5", "5/12"), ("6", "6/12")], "label": "Image width"}, + ), + 12: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 13: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 14: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 15: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 16: ( + "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, + }, + ), + 17: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 18: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 19: ( + "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, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 3), + ("image_side", 10), + ("image_ratio", 11), + ("text", 0), + ("link", 18), + ("link_label", 19), + ("page", 20), + ("link_url", 21), + ] + ], + {"label": "Image and text"}, + ), + 23: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 24: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 25: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 26: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 27: ( + "wagtail.blocks.StructBlock", + [[("title", 23), ("description", 24), ("level", 25), ("heading_tag", 26)]], + {"label": "Alert message"}, + ), + 28: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 29: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + "required": False, + }, + ), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button", "required": False}, + ), + 33: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 34: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 26), + ("icon_class", 28), + ("text", 29), + ("button", 32), + ("color", 33), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 35: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + }, + ), + 36: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 37: ( + "wagtail.blocks.StructBlock", + [[("text", 35), ("color", 33), ("size", 36)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 38: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 39: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 40: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 41: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 42: ( + "wagtail.blocks.StructBlock", + [[("image", 38), ("quote", 39), ("author_name", 40), ("author_title", 41), ("color", 33)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 43: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 44: ( + "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", + }, + ), + 45: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 46: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 47: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 48: ( + "wagtail.blocks.StructBlock", + [[("title", 46), ("content", 47)]], + {"label": "Transcription", "required": False}, + ), + 49: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 43), + ("caption", 7), + ("url", 44), + ("width", 5), + ("video_ratio", 45), + ("transcription", 48), + ] + ], + {"label": "Video"}, + ), + 50: ("wagtail.blocks.StructBlock", [[("title", 46), ("content", 47)]], {"label": "Transcription"}), + 51: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 52: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 53: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 54: ( + "wagtail.blocks.StructBlock", + [[("text", 51), ("color", 52), ("hide_icon", 53)]], + {"label": "Badge"}, + ), + 55: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {"label": "Badge list"}), + 56: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 57: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 58: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 59: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"required": False}, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("label", 56), ("is_small", 57), ("color", 58), ("icon_class", 28), ("link", 59)]], + {"label": "Tag"}, + ), + 61: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {"label": "Tag list"}), + 62: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + {"label": "Single link"}, + ), + 63: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 64: ( + "wagtail.blocks.StreamBlock", + [[("badge", 54)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"label": "Link", "required": False}, + ), + 66: ( + "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, + }, + ), + 67: ( + "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, + }, + ), + 68: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 69: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 70: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {}), + 71: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {}), + 72: ( + "wagtail.blocks.StreamBlock", + [[("badges", 70), ("tags", 71)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 73: ( + "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, + }, + ), + 74: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 75: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14), ("text", 15)]], + {"label": "Link"}, + ), + 76: ("wagtail.blocks.StreamBlock", [[("link", 75)]], {}), + 77: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button"}, + ), + 78: ( + "wagtail.blocks.StreamBlock", + [[("button", 77)]], + { + "help_text": "Please use only one primary button. If you use icons, align them on the same side." + }, + ), + 79: ( + "wagtail.blocks.StreamBlock", + [[("links", 76), ("buttons", 78)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 80: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with grey background", "required": False}), + 81: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 82: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 83: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 84: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 63), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 73), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 85: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 86: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 87: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 88: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 89: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with grey background", "required": False}), + 90: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 91: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 92: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 93: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 94: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 85), + ("image", 86), + ("link", 65), + ("top_detail_badges_tags", 72), + ("detail_text", 87), + ("is_small", 88), + ("grey_background", 89), + ("no_background", 90), + ("no_border", 91), + ("shadow", 92), + ("is_horizontal", 93), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 95: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 96: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("content", 95)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 97: ( + "wagtail.blocks.StreamBlock", + [[("title", 56), ("accordion", 96)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 98: ("wagtail.blocks.IntegerBlock", (), {"label": "Number of steps"}), + 99: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step"}), + 100: ("wagtail.blocks.TextBlock", (), {"label": "Detail"}), + 101: ("wagtail.blocks.StructBlock", [[("title", 56), ("detail", 100)]], {"label": "Step"}), + 102: ("wagtail.blocks.StreamBlock", [[("step", 101)]], {"label": "Steps"}), + 103: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("total", 98), ("current", 99), ("steps", 102)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 104: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 105: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 106: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 107: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 108: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 109: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 110: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 111: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 112: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 110), ("bottom_margin", 111)]], + {"group": "Page structure", "label": "Separator"}, + ), + 113: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 114: ( + "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, + }, + ), + 115: ( + "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, + }, + ), + 116: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {"label": "Image"}, + ), + 118: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 119: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 78)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 120: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Call to action label (obsolete)", + "required": False, + }, + ), + 121: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Link (obsolete)", + "required": False, + }, + ), + 122: ( + "wagtail.blocks.StructBlock", + [[("text", 118), ("cta_buttons", 119), ("cta_label", 120), ("cta_url", 121)]], + {"label": "Text and call to action"}, + ), + 123: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "DSFR components", "label": "Iframe"}, + ), + 124: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 2.", + "label": "Heading level", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 126: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 127: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 128: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 129: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 130: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 131: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 132: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("blog", 125), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 133: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 134: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("index_page", 133), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 135: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 136: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 6), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 135), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 137: ( + "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, + }, + ), + 138: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Column content"}, + ), + 139: ( + "wagtail.blocks.StructBlock", + [[("width", 137), ("content", 138)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 140: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ("column", 139), + ] + ], + {"label": "Columns"}, + ), + 141: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("bg_color", 115), + ("title", 1), + ("heading_tag", 116), + ("columns", 140), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 142: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 143: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Items"}, + ), + 144: ( + "wagtail.blocks.StructBlock", + [[("column_width", 142), ("items", 143)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 145: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Content"}, + ), + 146: ( + "wagtail.blocks.StructBlock", + [[("bg_image", 113), ("bg_color_class", 114), ("content", 145)]], + {"group": "Page structure", "label": "Full width background"}, + ), + 147: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Main content"}, + ), + 148: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 149: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 150: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 151: ("wagtail.blocks.StructBlock", [[("page", 150)]], {"label": "Page tree"}), + 152: ( + "wagtail.blocks.StreamBlock", + [[("html", 149), ("pagetree", 151)]], + {"label": "Side menu content"}, + ), + 153: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("main_content", 147), + ("sidemenu_title", 148), + ("sidemenu_content", 152), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 154: ( + "wagtail.blocks.static_block.StaticBlock", + (), + { + "admin_text": "A simple, alphabetical list of the subpages of the current page.", + "group": "Website structure", + "label": "Subpages list", + "template": "content_manager/blocks/subpages_list.html", + }, + ), + 155: ( + "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, + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 22), + ("alert", 27), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("video", 49), + ("transcription", 50), + ("badges_list", 55), + ("tags_list", 61), + ("link", 62), + ("card", 84), + ("tile", 94), + ("accordions", 97), + ("stepper", 103), + ("markdown", 104), + ("iframe", 109), + ("separator", 112), + ("multicolumns", 141), + ("item_grid", 144), + ("fullwidthbackground", 146), + ("fullwidthbackgroundwithsidemenu", 153), + ("subpageslist", 154), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("html", 155), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Title", "required": False}), + 2: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "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, + }, + ), + 3: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image"}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Alternative text (textual description of the image)", "required": False}, + ), + 5: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + "label": "Witdh", + "required": False, + }, + ), + 6: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + "label": "Image ratio", + "required": False, + }, + ), + 7: ("wagtail.blocks.CharBlock", (), {"label": "Caption", "required": False}), + 8: ("wagtail.blocks.URLBlock", (), {"label": "Link", "required": False}), + 9: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {}, + ), + 10: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("right", "Right")], + "label": "Side where the image is displayed", + }, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("5", "5/12"), ("6", "6/12")], "label": "Image width"}, + ), + 12: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 13: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 14: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 15: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 16: ( + "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, + }, + ), + 17: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 18: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 19: ( + "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, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 3), + ("image_side", 10), + ("image_ratio", 11), + ("text", 0), + ("link", 18), + ("link_label", 19), + ("page", 20), + ("link_url", 21), + ] + ], + {"label": "Image and text"}, + ), + 23: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 24: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 25: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 26: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 27: ( + "wagtail.blocks.StructBlock", + [[("title", 23), ("description", 24), ("level", 25), ("heading_tag", 26)]], + {"label": "Alert message"}, + ), + 28: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 29: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + "required": False, + }, + ), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button", "required": False}, + ), + 33: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 34: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 26), + ("icon_class", 28), + ("text", 29), + ("button", 32), + ("color", 33), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 35: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + }, + ), + 36: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 37: ( + "wagtail.blocks.StructBlock", + [[("text", 35), ("color", 33), ("size", 36)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 38: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 39: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 40: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 41: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 42: ( + "wagtail.blocks.StructBlock", + [[("image", 38), ("quote", 39), ("author_name", 40), ("author_title", 41), ("color", 33)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 43: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 44: ( + "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", + }, + ), + 45: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 46: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 47: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 48: ( + "wagtail.blocks.StructBlock", + [[("title", 46), ("content", 47)]], + {"label": "Transcription", "required": False}, + ), + 49: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 43), + ("caption", 7), + ("url", 44), + ("width", 5), + ("video_ratio", 45), + ("transcription", 48), + ] + ], + {"label": "Video"}, + ), + 50: ("wagtail.blocks.StructBlock", [[("title", 46), ("content", 47)]], {"label": "Transcription"}), + 51: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 52: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 53: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 54: ( + "wagtail.blocks.StructBlock", + [[("text", 51), ("color", 52), ("hide_icon", 53)]], + {"label": "Badge"}, + ), + 55: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {"label": "Badge list"}), + 56: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 57: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 58: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 59: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"required": False}, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("label", 56), ("is_small", 57), ("color", 58), ("icon_class", 28), ("link", 59)]], + {"label": "Tag"}, + ), + 61: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {"label": "Tag list"}), + 62: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + {"label": "Single link"}, + ), + 63: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 64: ( + "wagtail.blocks.StreamBlock", + [[("badge", 54)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"label": "Link", "required": False}, + ), + 66: ( + "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, + }, + ), + 67: ( + "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, + }, + ), + 68: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 69: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 70: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {}), + 71: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {}), + 72: ( + "wagtail.blocks.StreamBlock", + [[("badges", 70), ("tags", 71)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 73: ( + "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, + }, + ), + 74: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 75: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14), ("text", 15)]], + {"label": "Link"}, + ), + 76: ("wagtail.blocks.StreamBlock", [[("link", 75)]], {}), + 77: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button"}, + ), + 78: ( + "wagtail.blocks.StreamBlock", + [[("button", 77)]], + { + "help_text": "Please use only one primary button. If you use icons, align them on the same side." + }, + ), + 79: ( + "wagtail.blocks.StreamBlock", + [[("links", 76), ("buttons", 78)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 80: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with grey background", "required": False}), + 81: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 82: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 83: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 84: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 63), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 73), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 85: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 86: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 87: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 88: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 89: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with grey background", "required": False}), + 90: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 91: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 92: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 93: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 94: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 85), + ("image", 86), + ("link", 65), + ("top_detail_badges_tags", 72), + ("detail_text", 87), + ("is_small", 88), + ("grey_background", 89), + ("no_background", 90), + ("no_border", 91), + ("shadow", 92), + ("is_horizontal", 93), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 95: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 96: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("content", 95)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 97: ( + "wagtail.blocks.StreamBlock", + [[("title", 56), ("accordion", 96)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 98: ("wagtail.blocks.IntegerBlock", (), {"label": "Number of steps"}), + 99: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step"}), + 100: ("wagtail.blocks.TextBlock", (), {"label": "Detail"}), + 101: ("wagtail.blocks.StructBlock", [[("title", 56), ("detail", 100)]], {"label": "Step"}), + 102: ("wagtail.blocks.StreamBlock", [[("step", 101)]], {"label": "Steps"}), + 103: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("total", 98), ("current", 99), ("steps", 102)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 104: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 105: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 106: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 107: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 108: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 109: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 110: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 111: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 112: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 110), ("bottom_margin", 111)]], + {"group": "Page structure", "label": "Separator"}, + ), + 113: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 114: ( + "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, + }, + ), + 115: ( + "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, + }, + ), + 116: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {"label": "Image"}, + ), + 118: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 119: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 78)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 120: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Call to action label (obsolete)", + "required": False, + }, + ), + 121: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Link (obsolete)", + "required": False, + }, + ), + 122: ( + "wagtail.blocks.StructBlock", + [[("text", 118), ("cta_buttons", 119), ("cta_label", 120), ("cta_url", 121)]], + {"label": "Text and call to action"}, + ), + 123: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "DSFR components", "label": "Iframe"}, + ), + 124: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 2.", + "label": "Heading level", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 126: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 127: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 128: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 129: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 130: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 131: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 132: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("blog", 125), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 133: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 134: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("index_page", 133), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 135: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 136: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 6), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 135), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 137: ( + "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, + }, + ), + 138: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Column content"}, + ), + 139: ( + "wagtail.blocks.StructBlock", + [[("width", 137), ("content", 138)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 140: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ("column", 139), + ] + ], + {"label": "Columns"}, + ), + 141: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("bg_color", 115), + ("title", 1), + ("heading_tag", 116), + ("columns", 140), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 142: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 143: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Items"}, + ), + 144: ( + "wagtail.blocks.StructBlock", + [[("column_width", 142), ("items", 143)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 145: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Content"}, + ), + 146: ( + "wagtail.blocks.StructBlock", + [[("bg_image", 113), ("bg_color_class", 114), ("content", 145)]], + {"group": "Page structure", "label": "Full width background"}, + ), + 147: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Main content"}, + ), + 148: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 149: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 150: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 151: ("wagtail.blocks.StructBlock", [[("page", 150)]], {"label": "Page tree"}), + 152: ( + "wagtail.blocks.StreamBlock", + [[("html", 149), ("pagetree", 151)]], + {"label": "Side menu content"}, + ), + 153: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("main_content", 147), + ("sidemenu_title", 148), + ("sidemenu_content", 152), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 154: ( + "wagtail.blocks.static_block.StaticBlock", + (), + { + "admin_text": "A simple, alphabetical list of the subpages of the current page.", + "group": "Website structure", + "label": "Subpages list", + "template": "content_manager/blocks/subpages_list.html", + }, + ), + 155: ( + "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, + }, + ), + }, + ), + ), + ] diff --git a/content_manager/blocks.py b/content_manager/blocks.py index 7c848dc4..3b287e9d 100644 --- a/content_manager/blocks.py +++ b/content_manager/blocks.py @@ -12,6 +12,7 @@ from content_manager.constants import ( BUTTON_ICON_SIDE, BUTTON_TYPE_CHOICES, + GRID_3_4_6_CHOICES, HEADING_CHOICES, HEADING_CHOICES_2_5, HORIZONTAL_CARD_IMAGE_RATIOS, @@ -862,6 +863,19 @@ class ColumnBlock(CommonStreamBlock): card = VerticalCardBlock(label=_("Vertical card"), group=_("DSFR components")) +class ItemGridBlock(blocks.StructBlock): + column_width = blocks.ChoiceBlock( + label=_("Column width"), + choices=GRID_3_4_6_CHOICES, + default="4", + ) + items = ColumnBlock(label=_("Items")) + + class Meta: + icon = "grip" + template = "content_manager/blocks/item_grid.html" + + class AdjustableColumnBlock(blocks.StructBlock): width = blocks.ChoiceBlock( label=_("Column width"), @@ -925,6 +939,7 @@ class Meta: class FullWidthBlock(CommonStreamBlock): image_and_text = ImageAndTextBlock(label=_("Image and text")) card = HorizontalCardBlock(label=_("Horizontal card"), group=_("DSFR components")) + item_grid = ItemGridBlock(label=_("Item grid"), group=_("Page structure")) class Meta: icon = "minus" @@ -1000,6 +1015,7 @@ class Meta: ("iframe", IframeBlock(label=_("Iframe"), group=_("Expert syntax"))), ("separator", SeparatorBlock(label=_("Separator"), group=_("Page structure"))), ("multicolumns", MultiColumnsWithTitleBlock(label=_("Multiple columns"), group=_("Page structure"))), + ("item_grid", ItemGridBlock(label=_("Item grid"), group=_("Page structure"))), ("fullwidthbackground", FullWidthBackgroundBlock(label=_("Full width background"), group=_("Page structure"))), ( "fullwidthbackgroundwithsidemenu", diff --git a/content_manager/constants.py b/content_manager/constants.py index dcfbe33a..16c0e85b 100644 --- a/content_manager/constants.py +++ b/content_manager/constants.py @@ -12,6 +12,12 @@ ("fr-btn--icon-right", _("Right")), ) +GRID_3_4_6_CHOICES = [ + ("3", "3/12"), + ("4", "4/12"), + ("6", "6/12"), +] + HEADING_CHOICES = [ ("h2", _("Heading 2")), ("h3", _("Heading 3")), diff --git a/content_manager/locale/fr/LC_MESSAGES/django.mo b/content_manager/locale/fr/LC_MESSAGES/django.mo index 22b9b13cc8cc75015b3272abf5562c6176ccce93..81b7d6eebf929abb4e4cd31e43d5755dd13d4fd8 100644 GIT binary patch delta 5412 zcmZA52~-u=0mku*fD4GSBck$*;)WY;AO^)Haf^-B*t*w5L2)51NIgX9ps~1D?8BfY zMok*gpmD)gjcwhitsAD%Bx+pZZW~iIYBVlM{~vQXr>ArL_}x42&D?e7<>Yvg&%4Wg zoC~3T%MFLGk1-9fQ%z$=QGO{{XN}nvVN5FS#6x7zs*bc|pdLjB#Ux&J D@GcrU6WM{NBR`cc1#VR+Tn zA7OLq&+PfQdhX|4F^KlfAPQ<=6jsNHww{UM)Zai4E=ApVtF;^%lsSzx@HT274{g0> zv@xO7gOPux34iE=NkQFb7zWV3$)Lcjo9W1um^{?T7h)YOwCC5L8rp>XGdpa(0(ITz z)+^RKSeNt9Pz?vwcLy4W8fXGK8hH{0b)XNb;X$Z|hhjr~4YkJksI}aNYH%-V#K%x0 zJ#XuGP~Y>3aT}_OO{hnrI+Bc9!XYutKl{my;Y3r+MvZWV{lZ$*nwFw^ycN~(PE-fW zQG4K|^}O|l^{({^szd(laCI~cH8af`F#ozi7keVrIvCaPI8;y5P#ygxYRwB!*R95W zSc2-{9n{)BM9pL%)2EJxpk~U0n(+i{ieo?MkLuA#Y>ksK2aB;K1~qb@jzrWACZaZH zwsk&^roI|G;A7N`wuyBeg6vB(1J&_DR0o|^wy+j8;`P>2REM^rMzjw#6Q@u!aS=!2 z16v>LF@~Z^M@@ABYN?7)4X#7&u~O7t+JVfNW3Exq7jB_O^c`xA0vo$GXoR|9ysdXd zP34Oik3UCs{7v-5`KXRAMwZw9c{KdPals1BS(-S4LT{61=6KcGWQU{iOh+Mya6h#KJ- zWOB?j)D4!RM)o#pPke;B(E(J)PoN*3MRo8Zs)N^1pWjB^|1s)5wd0uoBnq){?uElq zBOHUeK^kfVQ|$R%Tc3@-oL`D+z>C^ktI-eF+j=Q#iFR0z;RfngF%_3IWBwB;R5WuR zJN;5*P;Y~iuox$xY2n^D4b}6>$XnIqp&BSg&Bzw?$AdT<4$ zp`a0ZQIFL+)W~+CrfLuB#>Z{_5_Y0~4>fZwS{d^hzKUBhG2VUNZ=&uS)Y|P(4A!FF z7`2q~Rwt2yro1qDy2iVw$9~taNJ+>{sq&Nw6T{)`3 z6WATUwAOD|*^XmIP|$Nf1vRz#n2cWc3#I}!17BfXypMW;`0+<0?2PJIZw$u%SO-U< zzMp}$F&Fjy0@NNU!e~AJD=Fv(Wym9GcB5XE=TIYkfLfZ`Y!r>;In=wpEvli;7>j+7 zSvM0{qiZn~cVbOEg6jB5)c5{{nvuI!pN`y1n=OPwC`O=q-U8KNAJm0|F&KxVZk&Od zfh=n-Y6kL=e`YOz)X*u^eXgSJe+Si3Uv{wS^*b^DI?;v`TBAOwDf}riJ0=e`#al28 z|B5`R=2O)7zejbfdS`b{qfi}efNCHP!!ZdpbAznIt>Zg0|N0=)p2$V@d@icNBGim* zu;Ey-upeANjo<<5 z1~n7i&Djvuu~g(E^9nA;MaWy#)Z?W<(WIcJJ_mK5*%*mMI0Z|wH#$*W-L)HqO*k){%Vz+I>rsz7!03~B@yQIFAe)DnD+QTWu>!+D0a`{OVjd!Yw6VhcQiY<9=oqo64b z>E_Nr6Vw`ZK<;I_p&HCVbz~Ms<2+PH*P%M_vGpiw3D2Qs^cMEOC#cQd?Rj@o_rOR! z|9vU6;)AiMo-M%kxV`cV##}+&=&`NWN^wW#K{b?u>cAjdAB$R|Ow`oRLCx%P>uzjK z{XE9dz6s#Hs2epyO=%a@ns-Aj!C;KVbkqzKpw@O7>M2-_nfM_#!f1x88BDVFM9tIy z)J%>?-Dfg7^(o{~(B>#aeX#`9z&=z*j$u4r!gd&x>V7W;b=}XfAx=YGw+PkoV$|oG zQ8Q7FdU1V$>d3WJ=3krY7AN%U^et*cPf-`v>glev2eqq{Q5R;RMwp9wLCryRbfK-U zLG7s$)JS)umarVvfs?3?Uh3(%4S&N4HTV!U19f`wvccxateWfiGRE=Ds3SR;kDGA{ zw(aBY@>Qq-`MltEs0M0g8ldi*jGBp|=#S|RgbfPUB`rbvW)2|#O!dBW(ueDDFZEgd_~An5`Tp+a%fjlMn1kBQ3s5~> zW!;SGz&@Og6{zp^9^iK171YwDqn0Ea^*)%10q8~AH*rMARhL$#go1jkLo=|rvc!zw z38HBmLcHFL;FzFIl;)8?kbT}|!BNqxC~0kVEFjfrB@GXI_XkIfI6~T(5nos1(oHoH{z|8vS;lYe*xV^1x?j^#YD$W(w^KQekp##$!*+!Z*pE$-87W z`3d=vv>^G!m)s;z$g3omTp>-#{~j4sJ|cQ>$C7WzT%x1Q#oVvdyFM(^`3*%s^1l6O zJAO%alW_6|SxI!fKx&Y0RpB`3Qu%iwe|Ok=qE-J_ZaL-Ok_hq%`4c%w29UM-1=XRK z)9=YIh&I6*GLUQ~Gs!ygD^hj*g~9`J+@5G|&BFiKvUo_&k@MtJ5cNfE(lV!Kn}Z9gie>Y<9t!?1{hmw$ delta 5331 zcmZA43w({|0mtztlDLFu?hz3Z4MLJ85lJPeph~n=%1kwi$%xvDTCJMu>(-_gQ=DiU z*H*L6Z7xe_Y?PL$))1{*UAm>MA;hht4AtNNypPXkpS>Ud^L?K8ob%kzn|ApkpZz61 z&Nm@`iwu{Kk1;JUzM(PCQceoeU1Q!2Hzo&5@i{z!jW8?1m;mgBso3A@U@-NK)=x2z z`e97RZ?Q2(L>kk?7{|1xpuSQt1#@hDBKlLGf%-y`)r0DI1!^E`Y`p^gsPDi~+->W} zu^si(_P&2J_x&ggq<@o4K^=6#`q;KzPvC76N73e0|V&an>|G zKEVCcsE+GU6ZLQIPBa)D-DpNZ1Bgd;oQ&!?9b>R3YL7>v_HqHL!xg9*uS3mryRBEF zK39WU(aZQC-arkcd9=HQ9iv%)&XeiJjd&b{n&Hd#1JhA^T8wIFKC0t)Py;MOoq=-e zcI#)>L)Me10i8h&^as?+)NjH1tAPlPzHY=?Q&An~pblGa)IbNI_IwQLd(*Hl7NG`M zjoRB|sFl2c8t7HjN@+Q@;=$G!hl1W{j~YNWCSgB(34f36u?|x(vZdQVAJpL-WG%ov z>eH|zo8>L=9{rYJ$!bTPQ>gU^;qFIcnx*sF`oTVOVABv9ZQbG?}QS z9fI1LeALQJLY=8XOvTx#721q?e;YCZ$Lyh?JvoVL;1a6A+qT{)&RwAhOyqt$)W`>+ zFAhZwG!NNUGZwW)vuu4a>VdQcb+-1R`m6TdcZ~Utg7)M(Y5+d1-Fj2h7n`G2CJA+V zyCS<`2BS{(i>L7fwNI?UrM{7@GQ&h*JP$Qm< z+OtAbLo;l>*wz=II$DAnz#3G0mG=GJsEHjw{+W}!Xr=Ct8K@a_ zLEX=_^?~S1eFUn5(Wt}qTU0|+Y`qY*#IvnSaTWCn%)#MpjY-4hn1t1B+5d4A?sB65 z$F}1H>kU-H842#lvyrE#c@ovZSk#I*=#L(pfu-0SquaZOHq+V%wIV}N6C92DRZVgz zXl6yIr7A`>yv)`&VJGUlP)m0ck6>B{{={N~MECbyiE8*XYCspT5njc{c-z{5X=`Oe zaX32B6x8ulYcXo1%TNuiLj9c9qrO;$aX!ZE$G+4rC-dJ6*!dy%dnKq2SKuSK)>@0| zr+te1;Oc^$3C9eekj)#TQ6E^2T7ixD0PaRTKn|m3=ubrh3&kLe!lu{(_4zDpg1M;A z4?%5ZK57fcp}s#0ThqUpLqU(mb*PzEq4wq!Y9`lEPp+R(9r>rZPrfi@RZS<<&uJv` zm^ZH?PhV4t8bBrLQN0Hn;z?Wo9%Ja=+@hcXM0Ru!TPmvKUZ|~j3f0gs)D{$=209T# zun5)gV${GtKz(j2YDGS=9zvb98VtcR=xF3ODX7D+boYy~7(_h*)o>PS1$tU@u@&_J z$UifY7j;yIYNrC#!A{gbzq0jOTfd9iqOeY^zm_nLBhDh2Cs9l6U?|Q*ewk(^>Im%0O4Ax&GAIuGPn2%bKmr?giFc{0MTTm;p z*VYfBo(DCknchMTASlzAUtk;5=L=Eq&qN)*Qq)9OIQEV8s2NnD8aR&pSuk~|fdxIx zpIVH^x%e!`<2mG?3FP6RrSFYuXCOvkK90vi?1g7hTbG#S{w;7Gr_hWW6Hp_26E)&_ zs3l&6TJpshiEC|r7wWVh#xZymV{s_IoSlpw841 z)E}ewQ4?B=`d(!Y>#w~&$PJz1^QbSz^>AmHfZEG6)IhUry+7(u4MEMc0JVjaQ3IHX z8t8mf$4gNieu$dbcKjHR_Hf+4Qj2=>nB~S{)Ij3-txU%}9FM1Q4CX%S&S)cQKwB^d z_n{g-k6MX(z1`1+;}q)A7>5f{6Rtpg{(wV44V^`e{0{2S1U%-R=C-Jrc0hfxD{4=N zAY(FtrSQ*t01pGU{DQ+FM;kdZCwJ!)KnFpvY(TQd&&zk%Q#_uetWdLaT z^AjE>=gA(=z~JtIrzy=QTB+NfWxoCMivoWn~9z_mqma!f~SgO)iuFl2)WGIZ9q4Es3ttE@p#gSxBN&YHK2!i9F=uMKiucY1u~Q9+T>!cdG+iGjc{J2=tthSZ*9b{$wwrNyh7d~x_T4+ zIYMeSG+T2gKAh%rV+7G5SVkTv>xr%v zWRkb!zWg12Ap7jScGeg1qAiQ-8eB!x^P{~~Xb>EzS$ g*TWkJl)u-iEU + {% for item in value.items %} +
{% include_block item %}
+ {% endfor %} + diff --git a/events/migrations/0006_alter_evententrypage_body_alter_eventsindexpage_body.py b/events/migrations/0006_alter_evententrypage_body_alter_eventsindexpage_body.py new file mode 100644 index 00000000..8fb30d9d --- /dev/null +++ b/events/migrations/0006_alter_evententrypage_body_alter_eventsindexpage_body.py @@ -0,0 +1,2585 @@ +# Generated by Django 5.0.8 on 2024-08-27 16:55 + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("events", "0005_alter_evententrypage_body_alter_eventsindexpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="evententrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 22), + ("alert", 27), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("video", 49), + ("transcription", 50), + ("badges_list", 55), + ("tags_list", 61), + ("link", 62), + ("card", 84), + ("tile", 94), + ("accordions", 97), + ("stepper", 103), + ("markdown", 104), + ("iframe", 109), + ("separator", 112), + ("multicolumns", 141), + ("item_grid", 144), + ("fullwidthbackground", 146), + ("fullwidthbackgroundwithsidemenu", 153), + ("subpageslist", 154), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("html", 155), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Title", "required": False}), + 2: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "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, + }, + ), + 3: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image"}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Alternative text (textual description of the image)", "required": False}, + ), + 5: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + "label": "Witdh", + "required": False, + }, + ), + 6: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + "label": "Image ratio", + "required": False, + }, + ), + 7: ("wagtail.blocks.CharBlock", (), {"label": "Caption", "required": False}), + 8: ("wagtail.blocks.URLBlock", (), {"label": "Link", "required": False}), + 9: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {}, + ), + 10: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("right", "Right")], + "label": "Side where the image is displayed", + }, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("5", "5/12"), ("6", "6/12")], "label": "Image width"}, + ), + 12: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 13: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 14: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 15: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 16: ( + "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, + }, + ), + 17: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 18: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 19: ( + "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, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 3), + ("image_side", 10), + ("image_ratio", 11), + ("text", 0), + ("link", 18), + ("link_label", 19), + ("page", 20), + ("link_url", 21), + ] + ], + {"label": "Image and text"}, + ), + 23: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 24: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 25: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 26: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 27: ( + "wagtail.blocks.StructBlock", + [[("title", 23), ("description", 24), ("level", 25), ("heading_tag", 26)]], + {"label": "Alert message"}, + ), + 28: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 29: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + "required": False, + }, + ), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button", "required": False}, + ), + 33: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 34: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 26), + ("icon_class", 28), + ("text", 29), + ("button", 32), + ("color", 33), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 35: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + }, + ), + 36: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 37: ( + "wagtail.blocks.StructBlock", + [[("text", 35), ("color", 33), ("size", 36)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 38: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 39: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 40: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 41: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 42: ( + "wagtail.blocks.StructBlock", + [[("image", 38), ("quote", 39), ("author_name", 40), ("author_title", 41), ("color", 33)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 43: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 44: ( + "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", + }, + ), + 45: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 46: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 47: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 48: ( + "wagtail.blocks.StructBlock", + [[("title", 46), ("content", 47)]], + {"label": "Transcription", "required": False}, + ), + 49: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 43), + ("caption", 7), + ("url", 44), + ("width", 5), + ("video_ratio", 45), + ("transcription", 48), + ] + ], + {"label": "Video"}, + ), + 50: ("wagtail.blocks.StructBlock", [[("title", 46), ("content", 47)]], {"label": "Transcription"}), + 51: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 52: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 53: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 54: ( + "wagtail.blocks.StructBlock", + [[("text", 51), ("color", 52), ("hide_icon", 53)]], + {"label": "Badge"}, + ), + 55: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {"label": "Badge list"}), + 56: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 57: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 58: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 59: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"required": False}, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("label", 56), ("is_small", 57), ("color", 58), ("icon_class", 28), ("link", 59)]], + {"label": "Tag"}, + ), + 61: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {"label": "Tag list"}), + 62: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + {"label": "Single link"}, + ), + 63: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 64: ( + "wagtail.blocks.StreamBlock", + [[("badge", 54)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"label": "Link", "required": False}, + ), + 66: ( + "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, + }, + ), + 67: ( + "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, + }, + ), + 68: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 69: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 70: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {}), + 71: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {}), + 72: ( + "wagtail.blocks.StreamBlock", + [[("badges", 70), ("tags", 71)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 73: ( + "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, + }, + ), + 74: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 75: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14), ("text", 15)]], + {"label": "Link"}, + ), + 76: ("wagtail.blocks.StreamBlock", [[("link", 75)]], {}), + 77: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button"}, + ), + 78: ( + "wagtail.blocks.StreamBlock", + [[("button", 77)]], + { + "help_text": "Please use only one primary button. If you use icons, align them on the same side." + }, + ), + 79: ( + "wagtail.blocks.StreamBlock", + [[("links", 76), ("buttons", 78)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 80: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with grey background", "required": False}), + 81: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 82: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 83: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 84: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 63), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 73), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 85: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 86: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 87: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 88: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 89: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with grey background", "required": False}), + 90: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 91: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 92: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 93: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 94: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 85), + ("image", 86), + ("link", 65), + ("top_detail_badges_tags", 72), + ("detail_text", 87), + ("is_small", 88), + ("grey_background", 89), + ("no_background", 90), + ("no_border", 91), + ("shadow", 92), + ("is_horizontal", 93), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 95: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 96: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("content", 95)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 97: ( + "wagtail.blocks.StreamBlock", + [[("title", 56), ("accordion", 96)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 98: ("wagtail.blocks.IntegerBlock", (), {"label": "Number of steps"}), + 99: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step"}), + 100: ("wagtail.blocks.TextBlock", (), {"label": "Detail"}), + 101: ("wagtail.blocks.StructBlock", [[("title", 56), ("detail", 100)]], {"label": "Step"}), + 102: ("wagtail.blocks.StreamBlock", [[("step", 101)]], {"label": "Steps"}), + 103: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("total", 98), ("current", 99), ("steps", 102)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 104: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 105: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 106: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 107: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 108: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 109: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 110: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 111: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 112: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 110), ("bottom_margin", 111)]], + {"group": "Page structure", "label": "Separator"}, + ), + 113: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 114: ( + "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, + }, + ), + 115: ( + "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, + }, + ), + 116: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {"label": "Image"}, + ), + 118: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 119: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 78)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 120: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Call to action label (obsolete)", + "required": False, + }, + ), + 121: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Link (obsolete)", + "required": False, + }, + ), + 122: ( + "wagtail.blocks.StructBlock", + [[("text", 118), ("cta_buttons", 119), ("cta_label", 120), ("cta_url", 121)]], + {"label": "Text and call to action"}, + ), + 123: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "DSFR components", "label": "Iframe"}, + ), + 124: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 2.", + "label": "Heading level", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 126: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 127: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 128: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 129: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 130: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 131: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 132: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("blog", 125), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 133: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 134: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("index_page", 133), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 135: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 136: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 6), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 135), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 137: ( + "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, + }, + ), + 138: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Column content"}, + ), + 139: ( + "wagtail.blocks.StructBlock", + [[("width", 137), ("content", 138)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 140: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ("column", 139), + ] + ], + {"label": "Columns"}, + ), + 141: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("bg_color", 115), + ("title", 1), + ("heading_tag", 116), + ("columns", 140), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 142: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 143: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Items"}, + ), + 144: ( + "wagtail.blocks.StructBlock", + [[("column_width", 142), ("items", 143)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 145: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Content"}, + ), + 146: ( + "wagtail.blocks.StructBlock", + [[("bg_image", 113), ("bg_color_class", 114), ("content", 145)]], + {"group": "Page structure", "label": "Full width background"}, + ), + 147: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Main content"}, + ), + 148: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 149: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 150: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 151: ("wagtail.blocks.StructBlock", [[("page", 150)]], {"label": "Page tree"}), + 152: ( + "wagtail.blocks.StreamBlock", + [[("html", 149), ("pagetree", 151)]], + {"label": "Side menu content"}, + ), + 153: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("main_content", 147), + ("sidemenu_title", 148), + ("sidemenu_content", 152), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 154: ( + "wagtail.blocks.static_block.StaticBlock", + (), + { + "admin_text": "A simple, alphabetical list of the subpages of the current page.", + "group": "Website structure", + "label": "Subpages list", + "template": "content_manager/blocks/subpages_list.html", + }, + ), + 155: ( + "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, + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="eventsindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 22), + ("alert", 27), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("video", 49), + ("transcription", 50), + ("badges_list", 55), + ("tags_list", 61), + ("link", 62), + ("card", 84), + ("tile", 94), + ("accordions", 97), + ("stepper", 103), + ("markdown", 104), + ("iframe", 109), + ("separator", 112), + ("multicolumns", 141), + ("item_grid", 144), + ("fullwidthbackground", 146), + ("fullwidthbackgroundwithsidemenu", 153), + ("subpageslist", 154), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("html", 155), + ], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text"}), + 1: ("wagtail.blocks.CharBlock", (), {"label": "Title", "required": False}), + 2: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "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, + }, + ), + 3: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image"}), + 4: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Alternative text (textual description of the image)", "required": False}, + ), + 5: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + "label": "Witdh", + "required": False, + }, + ), + 6: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + "label": "Image ratio", + "required": False, + }, + ), + 7: ("wagtail.blocks.CharBlock", (), {"label": "Caption", "required": False}), + 8: ("wagtail.blocks.URLBlock", (), {"label": "Link", "required": False}), + 9: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {}, + ), + 10: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("right", "Right")], + "label": "Side where the image is displayed", + }, + ), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("5", "5/12"), ("6", "6/12")], "label": "Image width"}, + ), + 12: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 13: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 14: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 15: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 16: ( + "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, + }, + ), + 17: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 18: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 19: ( + "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, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 3), + ("image_side", 10), + ("image_ratio", 11), + ("text", 0), + ("link", 18), + ("link_label", 19), + ("page", 20), + ("link_url", 21), + ] + ], + {"label": "Image and text"}, + ), + 23: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 24: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 25: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 26: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 27: ( + "wagtail.blocks.StructBlock", + [[("title", 23), ("description", 24), ("level", 25), ("heading_tag", 26)]], + {"label": "Alert message"}, + ), + 28: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 29: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + "required": False, + }, + ), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button", "required": False}, + ), + 33: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 34: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 26), + ("icon_class", 28), + ("text", 29), + ("button", 32), + ("color", 33), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 35: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + ], + "label": "Content", + }, + ), + 36: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 37: ( + "wagtail.blocks.StructBlock", + [[("text", 35), ("color", 33), ("size", 36)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 38: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 39: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 40: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 41: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 42: ( + "wagtail.blocks.StructBlock", + [[("image", 38), ("quote", 39), ("author_name", 40), ("author_title", 41), ("color", 33)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 43: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 44: ( + "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", + }, + ), + 45: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 46: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 47: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 48: ( + "wagtail.blocks.StructBlock", + [[("title", 46), ("content", 47)]], + {"label": "Transcription", "required": False}, + ), + 49: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 43), + ("caption", 7), + ("url", 44), + ("width", 5), + ("video_ratio", 45), + ("transcription", 48), + ] + ], + {"label": "Video"}, + ), + 50: ("wagtail.blocks.StructBlock", [[("title", 46), ("content", 47)]], {"label": "Transcription"}), + 51: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 52: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 53: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 54: ( + "wagtail.blocks.StructBlock", + [[("text", 51), ("color", 52), ("hide_icon", 53)]], + {"label": "Badge"}, + ), + 55: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {"label": "Badge list"}), + 56: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 57: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 58: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 59: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"required": False}, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("label", 56), ("is_small", 57), ("color", 58), ("icon_class", 28), ("link", 59)]], + {"label": "Tag"}, + ), + 61: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {"label": "Tag list"}), + 62: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("icon", 16), + ("size", 17), + ] + ], + {"label": "Single link"}, + ), + 63: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 64: ( + "wagtail.blocks.StreamBlock", + [[("badge", 54)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14)]], + {"label": "Link", "required": False}, + ), + 66: ( + "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, + }, + ), + 67: ( + "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, + }, + ), + 68: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 69: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 70: ("wagtail.blocks.StreamBlock", [[("badge", 54)]], {}), + 71: ("wagtail.blocks.StreamBlock", [[("tag", 60)]], {}), + 72: ( + "wagtail.blocks.StreamBlock", + [[("badges", 70), ("tags", 71)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 73: ( + "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, + }, + ), + 74: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 75: ( + "wagtail.blocks.StructBlock", + [[("page", 12), ("document", 13), ("external_url", 14), ("text", 15)]], + {"label": "Link"}, + ), + 76: ("wagtail.blocks.StreamBlock", [[("link", 75)]], {}), + 77: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 12), + ("document", 13), + ("external_url", 14), + ("text", 15), + ("button_type", 30), + ("icon_class", 28), + ("icon_side", 31), + ] + ], + {"label": "Button"}, + ), + 78: ( + "wagtail.blocks.StreamBlock", + [[("button", 77)]], + { + "help_text": "Please use only one primary button. If you use icons, align them on the same side." + }, + ), + 79: ( + "wagtail.blocks.StreamBlock", + [[("links", 76), ("buttons", 78)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 80: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with grey background", "required": False}), + 81: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 82: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 83: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 84: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 63), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 73), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 85: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 86: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 87: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 88: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 89: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with grey background", "required": False}), + 90: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 91: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 92: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 93: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 94: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 85), + ("image", 86), + ("link", 65), + ("top_detail_badges_tags", 72), + ("detail_text", 87), + ("is_small", 88), + ("grey_background", 89), + ("no_background", 90), + ("no_border", 91), + ("shadow", 92), + ("is_horizontal", 93), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 95: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 96: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("content", 95)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 97: ( + "wagtail.blocks.StreamBlock", + [[("title", 56), ("accordion", 96)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 98: ("wagtail.blocks.IntegerBlock", (), {"label": "Number of steps"}), + 99: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step"}), + 100: ("wagtail.blocks.TextBlock", (), {"label": "Detail"}), + 101: ("wagtail.blocks.StructBlock", [[("title", 56), ("detail", 100)]], {"label": "Step"}), + 102: ("wagtail.blocks.StreamBlock", [[("step", 101)]], {"label": "Steps"}), + 103: ( + "wagtail.blocks.StructBlock", + [[("title", 56), ("total", 98), ("current", 99), ("steps", 102)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 104: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 105: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 106: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 107: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 108: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 109: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 110: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 111: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 112: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 110), ("bottom_margin", 111)]], + {"group": "Page structure", "label": "Separator"}, + ), + 113: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 114: ( + "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, + }, + ), + 115: ( + "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, + }, + ), + 116: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 2), + ("image", 3), + ("alt", 4), + ("width", 5), + ("image_ratio", 6), + ("caption", 7), + ("url", 8), + ] + ], + {"label": "Image"}, + ), + 118: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 119: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 78)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 120: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Call to action label (obsolete)", + "required": False, + }, + ), + 121: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "This field is obsolete and will be removed in the near future. Please replace with the CTA buttons above.", + "label": "Link (obsolete)", + "required": False, + }, + ), + 122: ( + "wagtail.blocks.StructBlock", + [[("text", 118), ("cta_buttons", 119), ("cta_label", 120), ("cta_url", 121)]], + {"label": "Text and call to action"}, + ), + 123: ( + "wagtail.blocks.StructBlock", + [[("title", 105), ("url", 106), ("height", 107), ("parameters", 108)]], + {"group": "DSFR components", "label": "Iframe"}, + ), + 124: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 2.", + "label": "Heading level", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 126: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 127: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 128: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 129: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 130: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 131: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 132: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("blog", 125), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 133: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 134: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 124), + ("index_page", 133), + ("entries_count", 126), + ("category_filter", 127), + ("tag_filter", 128), + ("author_filter", 129), + ("source_filter", 130), + ("show_filters", 131), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 135: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 136: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 56), + ("heading_tag", 26), + ("description", 29), + ("image", 38), + ("image_ratio", 6), + ("image_badge", 64), + ("link", 65), + ("url", 66), + ("document", 67), + ("top_detail_text", 68), + ("top_detail_icon", 69), + ("top_detail_badges_tags", 72), + ("bottom_detail_text", 135), + ("bottom_detail_icon", 74), + ("call_to_action", 79), + ("grey_background", 80), + ("no_background", 81), + ("no_border", 82), + ("shadow", 83), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 137: ( + "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, + }, + ), + 138: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Column content"}, + ), + 139: ( + "wagtail.blocks.StructBlock", + [[("width", 137), ("content", 138)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 140: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ("column", 139), + ] + ], + {"label": "Columns"}, + ), + 141: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("bg_color", 115), + ("title", 1), + ("heading_tag", 116), + ("columns", 140), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 142: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 143: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("card", 136), + ] + ], + {"label": "Items"}, + ), + 144: ( + "wagtail.blocks.StructBlock", + [[("column_width", 142), ("items", 143)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 145: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Content"}, + ), + 146: ( + "wagtail.blocks.StructBlock", + [[("bg_image", 113), ("bg_color_class", 114), ("content", 145)]], + {"group": "Page structure", "label": "Full width background"}, + ), + 147: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 117), + ("video", 49), + ("transcription", 50), + ("callout", 34), + ("highlight", 37), + ("quote", 42), + ("text_cta", 122), + ("link", 62), + ("iframe", 123), + ("tile", 94), + ("blog_recent_entries", 132), + ("events_recent_entries", 134), + ("image_and_text", 22), + ("card", 84), + ("item_grid", 144), + ] + ], + {"label": "Main content"}, + ), + 148: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 149: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 150: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 151: ("wagtail.blocks.StructBlock", [[("page", 150)]], {"label": "Page tree"}), + 152: ( + "wagtail.blocks.StreamBlock", + [[("html", 149), ("pagetree", 151)]], + {"label": "Side menu content"}, + ), + 153: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 113), + ("bg_color_class", 114), + ("main_content", 147), + ("sidemenu_title", 148), + ("sidemenu_content", 152), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 154: ( + "wagtail.blocks.static_block.StaticBlock", + (), + { + "admin_text": "A simple, alphabetical list of the subpages of the current page.", + "group": "Website structure", + "label": "Subpages list", + "template": "content_manager/blocks/subpages_list.html", + }, + ), + 155: ( + "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, + }, + ), + }, + ), + ), + ]