diff --git a/.gitignore b/.gitignore index 4987993e..4a055aa7 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,4 @@ dmypy.json config.json cron.json temp.json +.local/ diff --git a/blog/migrations/0050_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py b/blog/migrations/0050_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py new file mode 100644 index 00000000..728ab6bb --- /dev/null +++ b/blog/migrations/0050_alter_blogentrypage_body_alter_blogindexpage_body_and_more.py @@ -0,0 +1,4340 @@ +# Generated by Django 5.2.5 on 2025-09-11 15:07 + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("blog", "0049_alter_blogentrypage_body_alter_blogindexpage_body_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="blogentrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="blogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="category", + name="colophon", + field=wagtail.fields.StreamField( + [("paragraph", 0), ("imageandtext", 14), ("quote", 20), ("multicolumns", 158), ("contact_card", 162)], + blank=True, + block_lookup={ + 0: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text"}), + 1: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 2: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 3: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 4: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 5: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 6: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 7: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 8: ( + "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, + }, + ), + 9: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 10: ( + "wagtail.blocks.StructBlock", + [[("page", 4), ("document", 5), ("external_url", 6), ("text", 7), ("icon", 8), ("size", 9)]], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 11: ( + "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, + }, + ), + 12: ( + "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, + }, + ), + 13: ( + "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, + }, + ), + 14: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 1), + ("image_side", 2), + ("image_ratio", 3), + ("text", 0), + ("link", 10), + ("link_label", 11), + ("page", 12), + ("link_url", 13), + ] + ], + {"label": "Bloc image et texte"}, + ), + 15: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 17: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 18: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 19: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 20: ( + "wagtail.blocks.StructBlock", + [[("image", 15), ("quote", 16), ("author_name", 17), ("author_title", 18), ("color", 19)]], + {"label": "Citation"}, + ), + 21: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 22: ( + "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, + }, + ), + 23: ( + "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, + }, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Title", "required": False}), + 25: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 26: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 27: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 28: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 29: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "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, + }, + ), + 30: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image"}), + 31: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Alternative text (textual description of the image)", "required": False}, + ), + 32: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-content-media--sm", "Small"), + ("", "Medium"), + ("fr-content-media--lg", "Large"), + ], + "label": "Witdh", + "required": False, + }, + ), + 33: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-ratio-32x9", "32x9"), + ("fr-ratio-16x9", "16x9"), + ("fr-ratio-3x2", "3x2"), + ("fr-ratio-4x3", "4x3"), + ("fr-ratio-1x1", "1x1"), + ("fr-ratio-3x4", "3x4"), + ("fr-ratio-2x3", "2x3"), + ], + "label": "Image ratio", + "required": False, + }, + ), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Caption", "required": False}), + 35: ("wagtail.blocks.URLBlock", (), {"label": "Link", "required": False}), + 36: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 24), + ("heading_tag", 29), + ("image", 30), + ("alt", 31), + ("width", 32), + ("image_ratio", 33), + ("caption", 34), + ("url", 35), + ] + ], + {"label": "Centered image"}, + ), + 37: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 1), + ("image_side", 2), + ("image_ratio", 3), + ("text", 0), + ("link", 10), + ("link_label", 11), + ("page", 12), + ("link_url", 13), + ] + ], + {"label": "Image and text"}, + ), + 38: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 39: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 40: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 41: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 38), ("text", 39), ("pictogram", 40)]], + {"label": "Table"}, + ), + 42: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 43: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 44: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 45: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 46: ( + "wagtail.blocks.StructBlock", + [[("title", 42), ("description", 43), ("level", 44), ("heading_tag", 45)]], + {"label": "Alert message"}, + ), + 47: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 48: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 49: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 50: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 51: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 52: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 4), + ("document", 5), + ("external_url", 6), + ("text", 48), + ("button_type", 49), + ("icon_class", 50), + ("icon_side", 51), + ] + ], + {"label": "Button"}, + ), + 53: ( + "wagtail.blocks.StreamBlock", + [[("button", 52)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 54: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 53)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 55: ( + "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, + }, + ), + 56: ( + "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, + }, + ), + 57: ( + "wagtail.blocks.StructBlock", + [[("text", 47), ("cta_buttons", 54), ("cta_label", 55), ("cta_url", 56)]], + {"label": "Text and call to action"}, + ), + 58: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 59: ( + "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", + }, + ), + 60: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 61: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 62: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 63: ( + "wagtail.blocks.StructBlock", + [[("title", 61), ("content", 62)]], + {"label": "Transcription", "required": False}, + ), + 64: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 58), + ("caption", 34), + ("url", 59), + ("width", 32), + ("video_ratio", 60), + ("transcription", 63), + ] + ], + {"label": "Video"}, + ), + 65: ("wagtail.blocks.StructBlock", [[("title", 61), ("content", 62)]], {"label": "Transcription"}), + 66: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 67: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 68: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 69: ( + "wagtail.blocks.StructBlock", + [[("text", 66), ("color", 67), ("hide_icon", 68)]], + {"label": "Badge"}, + ), + 70: ("wagtail.blocks.StreamBlock", [[("badge", 69)]], {"label": "Badge list"}), + 71: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 72: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 73: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 74: ( + "wagtail.blocks.StructBlock", + [[("page", 4), ("document", 5), ("external_url", 6)]], + {"required": False}, + ), + 75: ( + "wagtail.blocks.StructBlock", + [[("label", 71), ("is_small", 72), ("color", 73), ("icon_class", 50), ("link", 74)]], + {"label": "Tag"}, + ), + 76: ("wagtail.blocks.StreamBlock", [[("tag", 75)]], {"label": "Tag list"}), + 77: ( + "wagtail.blocks.StreamBlock", + [[("button", 52)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 78: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 79: ( + "wagtail.blocks.StructBlock", + [[("buttons", 77), ("position", 78)]], + {"label": "Button list"}, + ), + 80: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 81: ( + "wagtail.blocks.StructBlock", + [[("title", 71), ("content", 80)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 82: ( + "wagtail.blocks.StreamBlock", + [[("title", 71), ("accordion", 81)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 83: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 84: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 4), + ("document", 5), + ("external_url", 6), + ("text", 48), + ("button_type", 49), + ("icon_class", 50), + ("icon_side", 51), + ] + ], + {"label": "Button", "required": False}, + ), + 85: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 24), + ("heading_tag", 45), + ("icon_class", 50), + ("text", 83), + ("button", 84), + ("color", 19), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 86: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 87: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 88: ( + "wagtail.blocks.StructBlock", + [[("text", 86), ("color", 19), ("size", 87)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 89: ( + "wagtail.blocks.StructBlock", + [[("image", 15), ("quote", 16), ("author_name", 17), ("author_title", 18), ("color", 19)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 4), ("document", 5), ("external_url", 6), ("text", 7), ("icon", 8), ("size", 9)]], + {"label": "Single link"}, + ), + 91: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 92: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 93: ( + "wagtail.blocks.StructBlock", + [[("page", 4), ("document", 5), ("external_url", 6)]], + {"label": "Link", "required": False}, + ), + 94: ("wagtail.blocks.StreamBlock", [[("badge", 69)]], {}), + 95: ("wagtail.blocks.StreamBlock", [[("tag", 75)]], {}), + 96: ( + "wagtail.blocks.StreamBlock", + [[("badges", 94), ("tags", 95)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 97: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 98: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 99: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with grey background", "required": False}), + 100: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 101: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 102: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 103: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 104: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 71), + ("heading_tag", 45), + ("description", 91), + ("image", 92), + ("link", 93), + ("top_detail_badges_tags", 96), + ("detail_text", 97), + ("is_small", 98), + ("grey_background", 99), + ("no_background", 100), + ("no_border", 101), + ("shadow", 102), + ("is_horizontal", 103), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 105: ( + "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, + }, + ), + 106: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 107: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 108: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 109: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 110: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 111: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 113: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 24), + ("heading_tag", 105), + ("blog", 106), + ("entries_count", 107), + ("category_filter", 108), + ("tag_filter", 109), + ("author_filter", 110), + ("source_filter", 111), + ("show_filters", 112), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 114: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 115: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 24), + ("heading_tag", 105), + ("index_page", 114), + ("entries_count", 107), + ("category_filter", 108), + ("tag_filter", 109), + ("author_filter", 110), + ("source_filter", 111), + ("show_filters", 112), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 116: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 117: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Current step", "max_value": 8, "min_value": 1}, + ), + 118: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 119: ("wagtail.blocks.StructBlock", [[("title", 71), ("detail", 118)]], {"label": "Step"}), + 120: ("wagtail.blocks.StreamBlock", [[("step", 119)]], {"label": "Steps"}), + 121: ( + "wagtail.blocks.StructBlock", + [[("title", 71), ("total", 116), ("current", 117), ("steps", 120)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 122: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 123: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 124: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 125: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 126: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 127: ( + "wagtail.blocks.StructBlock", + [[("title", 123), ("url", 124), ("height", 125), ("parameters", 126)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 128: ( + "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, + }, + ), + 129: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 130: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 131: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 129), ("bottom_margin", 130)]], + {"group": "Page structure", "label": "Separator"}, + ), + 132: ( + "wagtail.blocks.StreamBlock", + [[("badge", 69)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 133: ( + "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, + }, + ), + 134: ( + "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, + }, + ), + 135: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 136: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 137: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 138: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 139: ( + "wagtail.blocks.StructBlock", + [[("page", 4), ("document", 5), ("external_url", 6), ("text", 7)]], + {"label": "Link"}, + ), + 140: ("wagtail.blocks.StreamBlock", [[("link", 139)]], {}), + 141: ( + "wagtail.blocks.StreamBlock", + [[("links", 140), ("buttons", 53)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 142: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 143: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 144: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 145: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 146: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 71), + ("heading_tag", 45), + ("description", 83), + ("image", 15), + ("image_ratio", 33), + ("image_badge", 132), + ("link", 93), + ("url", 133), + ("document", 134), + ("top_detail_text", 135), + ("top_detail_icon", 136), + ("top_detail_badges_tags", 96), + ("bottom_detail_text", 137), + ("bottom_detail_icon", 138), + ("call_to_action", 141), + ("grey_background", 142), + ("no_background", 143), + ("no_border", 144), + ("shadow", 145), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 147: ( + "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, + }, + ), + 148: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 149: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 150: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 151: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 152: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 153: ("wagtail.blocks.StreamBlock", [[("tag", 75)]], {"label": "Tags", "required": False}), + 154: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 148), + ("link", 93), + ("heading_tag", 29), + ("name", 149), + ("role", 150), + ("organization", 151), + ("contact_info", 152), + ("image", 15), + ("tags", 153), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 155: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 36), + ("imageandtext", 37), + ("table", 41), + ("alert", 46), + ("text_cta", 57), + ("video", 64), + ("transcription", 65), + ("badges_list", 70), + ("tags_list", 76), + ("buttons_list", 79), + ("accordions", 82), + ("callout", 85), + ("highlight", 88), + ("quote", 89), + ("link", 90), + ("tile", 104), + ("blog_recent_entries", 113), + ("events_recent_entries", 115), + ("stepper", 121), + ("markdown", 122), + ("iframe", 127), + ("html", 128), + ("separator", 131), + ("card", 146), + ("contact_card", 154), + ] + ], + {"label": "Column content"}, + ), + 156: ( + "wagtail.blocks.StructBlock", + [[("width", 147), ("content", 155)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 157: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 36), + ("imageandtext", 37), + ("table", 41), + ("alert", 46), + ("text_cta", 57), + ("video", 64), + ("transcription", 65), + ("badges_list", 70), + ("tags_list", 76), + ("buttons_list", 79), + ("accordions", 82), + ("callout", 85), + ("highlight", 88), + ("quote", 89), + ("link", 90), + ("tile", 104), + ("blog_recent_entries", 113), + ("events_recent_entries", 115), + ("stepper", 121), + ("markdown", 122), + ("iframe", 127), + ("html", 128), + ("separator", 131), + ("card", 146), + ("column", 156), + ] + ], + {"label": "Columns"}, + ), + 158: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 21), + ("bg_color_class", 22), + ("bg_color", 23), + ("title", 24), + ("heading_tag", 25), + ("top_margin", 26), + ("bottom_margin", 27), + ("vertical_align", 28), + ("columns", 157), + ] + ], + {"label": "Multi-colonnes"}, + ), + 159: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255}), + 160: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255}), + 161: ("wagtail.blocks.CharBlock", (), {"label": "Organization", "max_length": 255}), + 162: ( + "wagtail.blocks.StructBlock", + [[("name", 159), ("role", 160), ("organization", 161), ("contact_info", 152), ("image", 30)]], + {"label": "Contact card"}, + ), + }, + help_text="Text displayed at the end of every page in the category", + ), + ), + ] diff --git a/config/settings.py b/config/settings.py index 9be03113..ef6a3dbb 100644 --- a/config/settings.py +++ b/config/settings.py @@ -352,6 +352,8 @@ def show_toolbar(request): "document-link", "image", "embed", + "blue_text", + "white_text", "text-center", ] diff --git a/content_manager/constants.py b/content_manager/constants.py index 4f75baf0..6a3a6f33 100644 --- a/content_manager/constants.py +++ b/content_manager/constants.py @@ -83,6 +83,8 @@ "superscript", "subscript", "strikethrough", + "blue_text", + "white_text", "text-center", ] diff --git a/content_manager/migrations/0064_alter_catalogindexpage_body_alter_contentpage_body.py b/content_manager/migrations/0064_alter_catalogindexpage_body_alter_contentpage_body.py new file mode 100644 index 00000000..5c404bb7 --- /dev/null +++ b/content_manager/migrations/0064_alter_catalogindexpage_body_alter_contentpage_body.py @@ -0,0 +1,3090 @@ +# Generated by Django 5.2.5 on 2025-09-11 15:07 + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("content_manager", "0063_alter_catalogindexpage_body_alter_contentpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="catalogindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="contentpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + ] diff --git a/content_manager/static/content_manager/css/text-colors-dropdown.css b/content_manager/static/content_manager/css/text-colors-dropdown.css new file mode 100644 index 00000000..48f7c30d --- /dev/null +++ b/content_manager/static/content_manager/css/text-colors-dropdown.css @@ -0,0 +1,163 @@ +.color-option:hover { + background-color: #f5f5f5; +} + +.Draftail-Toolbar .color-dropdown-wrapper .Draftail-ToolbarButton { + margin: 0; +} + +.cmsfr-text--blue { + color: var(--bf500); +} + +.cmsfr-text--white { + color: #ffffff; +} + +.public-DraftStyleDefault-block .cmsfr-text--white { + background-color: var(--g800); + padding: 0 2px; +} + +/* Styles for Draftail editor */ +.DraftEditor-editorContainer .cmsfr-text--blue, +.public-DraftEditor-content .cmsfr-text--blue, +[contenteditable] .cmsfr-text--blue { + color: var(--bf500) !important; +} + +.DraftEditor-editorContainer .cmsfr-text--white, +.public-DraftEditor-content .cmsfr-text--white, +[contenteditable] .cmsfr-text--white { + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 1px 3px !important; + border-radius: 2px !important; + text-shadow: none !important; +} + +/* Draftail styles for inline styles */ +.public-DraftStyleDefault-ltr .BLUETEXT { + color: var(--bf500) !important; + display: inline !important; + visibility: visible !important; +} + +.public-DraftStyleDefault-ltr .WHITETEXT { + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + outline: 1px solid #999999 !important; + outline-offset: -1px !important; + display: inline !important; + visibility: visible !important; +} + + +.DraftEditor-root .public-DraftStyleDefault-ltr .BLUETEXT { + color: var(--bf500) !important; + display: inline !important; + visibility: visible !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr .WHITETEXT { + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + outline: 1px solid #999999 !important; + outline-offset: -1px !important; + cursor: text !important; + display: inline !important; + visibility: visible !important; +} + +/* Improve white text selection */ +.DraftEditor-root .public-DraftStyleDefault-ltr .WHITETEXT::selection { + background-color: #0078d4 !important; + color: #ffffff !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr .WHITETEXT::-moz-selection { + background-color: #0078d4 !important; + color: #ffffff !important; +} + +/* Force display even with inline display:none style */ +span[style*="display: none"].BLUETEXT, +span[style*="display:none"].BLUETEXT, +.DraftEditor-root span[style*="display: none"].BLUETEXT, +.DraftEditor-root span[style*="display:none"].BLUETEXT { + display: inline !important; + visibility: visible !important; + color: var(--bf500) !important; +} + +span[style*="display: none"].WHITETEXT, +span[style*="display:none"].WHITETEXT, +.DraftEditor-root span[style*="display: none"].WHITETEXT, +.DraftEditor-root span[style*="display:none"].WHITETEXT { + display: inline !important; + visibility: visible !important; + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + outline: 1px solid #999999 !important; + outline-offset: -1px !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr span[class~="BLUETEXT"][style] { + display: inline !important; + visibility: visible !important; + color: var(--bf500) !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr span[class~="WHITETEXT"][style] { + display: inline !important; + visibility: visible !important; + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + outline: 1px solid #999999 !important; + outline-offset: -1px !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr .public-DraftStyleDefault-block .public-DraftStyleDefault-ltr span.BLUETEXT { + color: var(--bf500) !important; + display: inline !important; +} + +.DraftEditor-root .public-DraftStyleDefault-ltr .public-DraftStyleDefault-block .public-DraftStyleDefault-ltr span.WHITETEXT { + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + display: inline !important; +} + +.DraftEditor-editorContainer span.BLUETEXT, +.DraftEditor-editorContainer .BLUETEXT, +.public-DraftEditor-content span.BLUETEXT, +.public-DraftEditor-content .BLUETEXT, +div[data-contents="true"] span.BLUETEXT, +div[data-contents="true"] .BLUETEXT { + color: var(--bf500) !important; + display: inline !important; +} + +.DraftEditor-editorContainer span.WHITETEXT, +.DraftEditor-editorContainer .WHITETEXT, +.public-DraftEditor-content span.WHITETEXT, +.public-DraftEditor-content .WHITETEXT, +div[data-contents="true"] span.WHITETEXT, +div[data-contents="true"] .WHITETEXT { + color: #ffffff !important; + background-color: var(--g800) !important; + padding: 2px 4px !important; + border-radius: 3px !important; + display: inline !important; +} + diff --git a/content_manager/static/content_manager/js/text-colors-dropdown.js b/content_manager/static/content_manager/js/text-colors-dropdown.js new file mode 100644 index 00000000..cf18bb35 --- /dev/null +++ b/content_manager/static/content_manager/js/text-colors-dropdown.js @@ -0,0 +1,324 @@ +// Script to add a color dropdown menu in Draftail +(function() { + 'use strict'; + + const COLORS = [ + { label: 'Bleu', value: '#000091', color: '#000091' }, + { label: 'Blanc', value: '#ffffff', color: '#ffffff' }, + { label: 'Par défaut', value: 'remove', color: 'transparent' } + ]; + + const MENU_STYLES = ` + position: absolute; + top: 100%; + left: 0; + background: white; + border: 1px solid #e3e3e3; + border-radius: 3px; + box-shadow: 0 2px 8px rgba(0,0,0,0.15); + padding: 4px 0; + display: none; + z-index: 10000; + min-width: 140px; + margin-top: 2px; + `; + + const OPTION_STYLES = ` + display: block; + width: 100%; + padding: 8px 12px; + border: none; + background: white; + text-align: left; + cursor: pointer; + font-size: 14px; + `; + + // DOM elements creation + function createWrapper() { + const wrapper = document.createElement('div'); + wrapper.className = 'color-dropdown-wrapper'; + Object.assign(wrapper.style, { + display: 'inline-block', + position: 'relative', + verticalAlign: 'middle' + }); + return wrapper; + } + + function createButton() { + const button = document.createElement('button'); + button.className = 'Draftail-ToolbarButton'; + button.type = 'button'; + button.setAttribute('aria-label', 'Couleur du texte'); + button.setAttribute('title', 'Couleur du texte'); + Object.assign(button.style, { width: '32px', height: '32px' }); + button.innerHTML = ` + + A + + `; + return button; + } + + function createMenu() { + const menu = document.createElement('div'); + menu.className = 'color-dropdown-menu'; + menu.style.cssText = MENU_STYLES; + return menu; + } + + function createColorSquare(color) { + const square = document.createElement('span'); + const baseStyles = ` + display: inline-block; + width: 14px; + height: 14px; + margin-right: 8px; + vertical-align: middle; + border-radius: 2px; + `; + + if (color.value === 'remove') { + square.style.cssText = baseStyles + ` + background: linear-gradient(45deg, transparent 45%, #999 45%, #999 55%, transparent 55%); + border: 1px solid #999; + `; + } else { + const borderColor = color.value === COLORS[1].value ? '#999' : '#ccc'; + square.style.cssText = baseStyles + ` + background-color: ${color.color}; + border: 1px solid ${borderColor}; + `; + } + + return square; + } + + function createColorOption(color, onSelect) { + const option = document.createElement('button'); + option.className = 'color-option'; + option.style.cssText = OPTION_STYLES; + + option.appendChild(createColorSquare(color)); + option.appendChild(document.createTextNode(color.label)); + + option.onmouseover = () => option.style.background = '#f0f0f0'; + option.onmouseout = () => option.style.background = 'white'; + option.onmousedown = onSelect; + + return option; + } + + // Event handling + function setupHoverBehavior(wrapper, menu) { + let hoverTimeout; + + const showMenu = () => { + clearTimeout(hoverTimeout); + menu.style.display = 'block'; + }; + + const hideMenuDelayed = (delay = 200) => { + hoverTimeout = setTimeout(() => { + menu.style.display = 'none'; + }, delay); + }; + + wrapper.onmouseenter = showMenu; + wrapper.onmouseleave = () => hideMenuDelayed(200); + menu.onmouseenter = showMenu; + menu.onmouseleave = () => hideMenuDelayed(100); + + return hoverTimeout; + } + + // DraftJS instance search and manipulation + function findDraftJSInstance(editorWrapper) { + const reactKeys = Object.keys(editorWrapper).filter(key => key.startsWith('__react')); + + for (const key of reactKeys) { + let fiber = editorWrapper[key]; + while (fiber) { + if (fiber.stateNode?.getEditorState && fiber.stateNode?.onChange) { + return fiber.stateNode; + } + fiber = fiber.return || fiber.child; + if (!fiber) break; + } + } + return null; + } + + function removeColorStyles(contentState, selection) { + ['BLUETEXT', 'WHITETEXT'].forEach(style => { + contentState = window.DraftJS.Modifier.removeInlineStyle(contentState, selection, style); + }); + return contentState; + } + + function applyColorStyle(editorInstance, color) { + const { EditorState, RichUtils, Modifier } = window.DraftJS; + const editorState = editorInstance.getEditorState(); + const selection = editorState.getSelection(); + + if (selection.isCollapsed()) return false; + + let contentState = editorState.getCurrentContent(); + let newEditorState; + + if (color === 'remove') { + contentState = removeColorStyles(contentState, selection); + newEditorState = EditorState.push(editorState, contentState, 'change-inline-style'); + } else { + const styleMap = { [COLORS[0].value]: 'BLUETEXT', [COLORS[1].value]: 'WHITETEXT' }; + const targetStyle = styleMap[color]; + const otherStyle = targetStyle === 'BLUETEXT' ? 'WHITETEXT' : 'BLUETEXT'; + + contentState = Modifier.removeInlineStyle(contentState, selection, otherStyle); + newEditorState = EditorState.push(editorState, contentState, 'change-inline-style'); + newEditorState = RichUtils.toggleInlineStyle(newEditorState, targetStyle); + } + + if (newEditorState) { + editorInstance.onChange(newEditorState); + return true; + } + return false; + } + + function applyColor(toolbar, color) { + const editorWrapper = toolbar.closest('.DraftEditor-root, .Draftail-Editor'); + if (!editorWrapper || !window.DraftJS) return; + + const editorInstance = findDraftJSInstance(editorWrapper); + if (editorInstance) { + applyColorStyle(editorInstance, color); + } + } + + // Style utilities + function forceColorStyles() { + const applyForcedStyles = (selector, styles) => { + document.querySelectorAll(selector).forEach(el => { + if (el.style.display === 'none') { + Object.assign(el.style, styles); + } + }); + }; + + applyForcedStyles('.BLUETEXT', { + display: 'inline', + color: COLORS[0].value, + visibility: 'visible' + }); + + applyForcedStyles('.WHITETEXT', { + display: 'inline', + color: COLORS[1].value, + backgroundColor: '#1e1e1e', + padding: '2px 4px', + borderRadius: '3px', + visibility: 'visible' + }); + } + + // Dropdown construction + function buildDropdown(toolbar) { + const wrapper = createWrapper(); + const button = createButton(); + const menu = createMenu(); + + button.onclick = e => e.preventDefault(); + + COLORS.forEach(color => { + const onSelect = (e) => { + e.preventDefault(); + e.stopPropagation(); + applyColor(toolbar, color.value); + menu.style.display = 'none'; + }; + + const option = createColorOption(color, onSelect); + menu.appendChild(option); + }); + + wrapper.appendChild(button); + wrapper.appendChild(menu); + setupHoverBehavior(wrapper, menu); + + return wrapper; + } + + function insertDropdown(toolbar, dropdown) { + const metaToolbar = toolbar.querySelector('.Draftail-MetaToolbar'); + if (metaToolbar) { + toolbar.insertBefore(dropdown, metaToolbar); + } else { + toolbar.appendChild(dropdown); + } + } + + // Main functions + function addDropdownToToolbar(toolbar) { + if (toolbar.querySelector('.color-dropdown-wrapper')) return false; + + const dropdown = buildDropdown(toolbar); + insertDropdown(toolbar, dropdown); + return true; + } + + function initDropdowns() { + document.querySelectorAll('.Draftail-Toolbar') + .forEach(addDropdownToToolbar); + forceColorStyles(); + } + + function observeNewToolbars() { + const observer = new MutationObserver(mutations => { + mutations.forEach(mutation => { + mutation.addedNodes.forEach(node => { + if (node.nodeType !== 1) return; + + if (node.classList?.contains('Draftail-Toolbar')) { + addDropdownToToolbar(node); + } else { + node.querySelectorAll?.('.Draftail-Toolbar') + .forEach(addDropdownToToolbar); + } + }); + }); + }); + + observer.observe(document.body, { + childList: true, + subtree: true + }); + } + + function observeStyleChanges() { + const observer = new MutationObserver(forceColorStyles); + observer.observe(document.body, { + childList: true, + subtree: true, + attributes: true, + attributeFilter: ['class', 'style'] + }); + } + + // Initialization + function init() { + initDropdowns(); + observeNewToolbars(); + observeStyleChanges(); + + [500, 1500, 3000].forEach(delay => { + setTimeout(initDropdowns, delay); + }); + + setInterval(forceColorStyles, 2000); + } + + init(); + +})(); \ No newline at end of file diff --git a/content_manager/wagtail_hooks.py b/content_manager/wagtail_hooks.py index 8c10aefc..7545fac2 100644 --- a/content_manager/wagtail_hooks.py +++ b/content_manager/wagtail_hooks.py @@ -2,7 +2,65 @@ from django.templatetags.static import static from django.utils.html import format_html from wagtail import hooks -from wagtail.admin.rich_text.converters.html_to_contentstate import BlockElementHandler +from wagtail.admin.rich_text.converters.html_to_contentstate import BlockElementHandler, InlineStyleElementHandler + + +@hooks.register("register_rich_text_features") +def register_text_colors(features): + """ + Register text color features: blue and white (black is default) + """ + # Configuration pour le texte bleu + features.register_editor_plugin( + "draftail", + "blue_text", + draftail_features.InlineStyleFeature( + { + "type": "BLUETEXT", + # Pas de label = pas de bouton dans la toolbar + "style": { + "color": "#000091", + "fontWeight": "normal", + }, + } + ), + ) + + # Configuration pour le texte blanc + features.register_editor_plugin( + "draftail", + "white_text", + draftail_features.InlineStyleFeature( + { + "type": "WHITETEXT", + # Pas de label = pas de bouton dans la toolbar + "style": { + "color": "#ffffff", + "backgroundColor": "#1e1e1e", + "padding": "2px 4px", + "borderRadius": "3px", + }, + } + ), + ) + + # Conversion pour la base de données - texte bleu + db_conversion_blue = { + "from_database_format": {'span[class="cmsfr-text--blue"]': InlineStyleElementHandler("BLUETEXT")}, + "to_database_format": {"style_map": {"BLUETEXT": 'span class="cmsfr-text--blue"'}}, + } + features.register_converter_rule("contentstate", "blue_text", db_conversion_blue) + + # Conversion pour la base de données - texte blanc + db_conversion_white = { + "from_database_format": {'span[class="cmsfr-text--white"]': InlineStyleElementHandler("WHITETEXT")}, + "to_database_format": {"style_map": {"WHITETEXT": 'span class="cmsfr-text--white"'}}, + } + features.register_converter_rule("contentstate", "white_text", db_conversion_white) + + # Ajouter aux features par défaut + features.default_features.append("blue_text") + features.default_features.append("white_text") @hooks.register("register_rich_text_features") @@ -43,4 +101,21 @@ def register_text_center_feature(features): @hooks.register("insert_editor_js") def editor_js(): - return format_html('', static("content_manager/js/text-center.js")) + return format_html( + '', + static("content_manager/js/text-center.js"), + static("content_manager/js/text-colors-dropdown.js"), + ) + + +@hooks.register("insert_editor_css") +def editor_css(): + return format_html('', static("content_manager/css/text-colors-dropdown.css")) + + +@hooks.register("insert_global_admin_js") +def global_admin_js(): + return format_html( + '', + static("content_manager/js/text-colors-dropdown.js"), + ) diff --git a/events/migrations/0022_alter_evententrypage_body_alter_eventsindexpage_body.py b/events/migrations/0022_alter_evententrypage_body_alter_eventsindexpage_body.py new file mode 100644 index 00000000..a3039865 --- /dev/null +++ b/events/migrations/0022_alter_evententrypage_body_alter_eventsindexpage_body.py @@ -0,0 +1,3090 @@ +# Generated by Django 5.2.5 on 2025-09-11 15:07 + +import wagtail.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("events", "0021_alter_evententrypage_body_alter_eventsindexpage_body"), + ] + + operations = [ + migrations.AlterField( + model_name="evententrypage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + migrations.AlterField( + model_name="eventsindexpage", + name="body", + field=wagtail.fields.StreamField( + [ + ("paragraph", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("link", 66), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("stepper", 87), + ("card", 107), + ("tile", 117), + ("tabs", 150), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("multicolumns", 162), + ("item_grid", 166), + ("fullwidthbackground", 168), + ("fullwidthbackgroundwithsidemenu", 175), + ("subpageslist", 176), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ], + 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), + ] + ], + {"label": "Centered image"}, + ), + 10: ("wagtail.images.blocks.ImageBlock", [], {"label": "Image"}), + 11: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("left", "Left (displayed above text in mobile view)"), + ("left_below", "Left (displayed below text in mobile view)"), + ("right", "Right (displayed below text in mobile view)"), + ("right_above", "Right (displayed above text in mobile view)"), + ], + "label": "Image position", + }, + ), + 12: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("3", "3/12"), ("4", "4/12"), ("5", "5/12"), ("6", "6/12")], + "label": "Image width", + }, + ), + 13: ( + "wagtail.blocks.PageChooserBlock", + (), + { + "help_text": "Link to a page of this site. Use either this, the document, or the external URL parameter.", + "label": "Page", + "required": False, + }, + ), + 14: ( + "wagtail.documents.blocks.DocumentChooserBlock", + (), + { + "help_text": "Use either this, the external URL or the page parameter.", + "label": "Document", + "required": False, + }, + ), + 15: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Use either this, the document or the page parameter.", + "label": "External URL", + "required": False, + }, + ), + 16: ("wagtail.blocks.CharBlock", (), {"label": "Link label", "required": False}), + 17: ( + "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, + }, + ), + 18: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-link--sm", "Small"), ("", "Medium"), ("fr-link--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 19: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + { + "help_text": "The link is shown at the bottom of the text block, with an arrow", + "label": "Link", + "required": False, + }, + ), + 20: ( + "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, + }, + ), + 21: ( + "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, + }, + ), + 22: ( + "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, + }, + ), + 23: ( + "wagtail.blocks.StructBlock", + [ + [ + ("image", 10), + ("image_side", 11), + ("image_ratio", 12), + ("text", 0), + ("link", 19), + ("link_label", 20), + ("page", 21), + ("link_url", 22), + ] + ], + {"label": "Image and text"}, + ), + 24: ("wagtail.blocks.CharBlock", (), {"label": "Row heading", "required": False}), + 25: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Text", + "required": False, + }, + ), + 26: ("wagtail.images.blocks.ImageBlock", [], {"label": "Pictogram"}), + 27: ( + "wagtail.contrib.typed_table_block.blocks.TypedTableBlock", + [[("row_heading", 24), ("text", 25), ("pictogram", 26)]], + {"label": "Table"}, + ), + 28: ("wagtail.blocks.CharBlock", (), {"label": "Message title", "required": False}), + 29: ("wagtail.blocks.TextBlock", (), {"label": "Message text", "required": False}), + 30: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("error", "Error"), + ("success", "Success"), + ("info", "Information"), + ("warning", "Warning"), + ], + "label": "Message type", + }, + ), + 31: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("h3", "Heading 3"), + ("h4", "Heading 4"), + ("h5", "Heading 5"), + ("h6", "Heading 6"), + ("p", "Paragraph"), + ], + "help_text": "Adapt to the page layout. Defaults to heading 3.", + "label": "Heading level", + }, + ), + 32: ( + "wagtail.blocks.StructBlock", + [[("title", 28), ("description", 29), ("level", 30), ("heading_tag", 31)]], + {"label": "Alert message"}, + ), + 33: ("wagtail.blocks.RichTextBlock", (), {"label": "Rich text", "required": False}), + 34: ("wagtail.blocks.CharBlock", (), {"label": "Button label", "required": False}), + 35: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("fr-btn", "Primary"), + ("fr-btn fr-btn--secondary", "Secundary"), + ("fr-btn fr-btn--tertiary", "Tertiary"), + ("fr-btn fr-btn--tertiary-no-outline", "Tertiary without border"), + ], + "label": "Button type", + "required": False, + }, + ), + 36: ("content_manager.blocks.IconPickerBlock", (), {"label": "Icon", "required": False}), + 37: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-btn--icon-left", "Left"), ("fr-btn--icon-right", "Right")], + "label": "Icon side", + "required": False, + }, + ), + 38: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button"}, + ), + 39: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 40: ( + "wagtail.blocks.StreamBlock", + [[("buttons", 39)]], + {"label": "Call-to-action buttons", "max_num": 1, "required": False}, + ), + 41: ( + "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, + }, + ), + 42: ( + "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, + }, + ), + 43: ( + "wagtail.blocks.StructBlock", + [[("text", 33), ("cta_buttons", 40), ("cta_label", 41), ("cta_url", 42)]], + {"label": "Text and call to action"}, + ), + 44: ("wagtail.blocks.CharBlock", (), {"label": "Video title", "required": False}), + 45: ( + "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", + }, + ), + 46: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-ratio-16x9", "16x9"), ("fr-ratio-4x3", "4x3"), ("fr-ratio-1x1", "1x1")], + "label": "Video ratio", + "required": False, + }, + ), + 47: ( + "wagtail.blocks.CharBlock", + (), + {"default": "Transcription", "label": "Title", "required": False}, + ), + 48: ("wagtail.blocks.RichTextBlock", (), {"label": "Transcription content", "required": False}), + 49: ( + "wagtail.blocks.StructBlock", + [[("title", 47), ("content", 48)]], + {"label": "Transcription", "required": False}, + ), + 50: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 44), + ("caption", 7), + ("url", 45), + ("width", 5), + ("video_ratio", 46), + ("transcription", 49), + ] + ], + {"label": "Video"}, + ), + 51: ("wagtail.blocks.StructBlock", [[("title", 47), ("content", 48)]], {"label": "Transcription"}), + 52: ("wagtail.blocks.CharBlock", (), {"label": "Badge label", "required": False}), + 53: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", [("new", "New"), ("grey", "Grey")]), + ( + "System colors", + [ + ("info", "Info"), + ("success", "Success"), + ("warning", "Warning"), + ("error", "Error"), + ], + ), + ( + "Illustration colors", + [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + ), + ], + "label": "Badge color", + "required": False, + }, + ), + 54: ("wagtail.blocks.BooleanBlock", (), {"label": "Hide badge icon", "required": False}), + 55: ( + "wagtail.blocks.StructBlock", + [[("text", 52), ("color", 53), ("hide_icon", 54)]], + {"label": "Badge"}, + ), + 56: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {"label": "Badge list"}), + 57: ("wagtail.blocks.CharBlock", (), {"label": "Title"}), + 58: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tag", "required": False}), + 59: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "help_text": "Only for clickable tags", + "label": "Tag color", + "required": False, + }, + ), + 60: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"required": False}, + ), + 61: ( + "wagtail.blocks.StructBlock", + [[("label", 57), ("is_small", 58), ("color", 59), ("icon_class", 36), ("link", 60)]], + {"label": "Tag"}, + ), + 62: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tag list"}), + 63: ( + "wagtail.blocks.StreamBlock", + [[("button", 38)]], + { + "help_text": "Please use only one primary button.\n If you use icons, use them on all buttons and align them on the same side.", + "label": "Buttons", + }, + ), + 64: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("", "Left"), + ("fr-btns-group--center", "Center"), + ("fr-btns-group--right", "Right"), + ( + "fr-btns-group--right fr-btns-group--inline-reverse", + "Right (reverse order on desktop)", + ), + ], + "label": "Position", + "required": False, + }, + ), + 65: ( + "wagtail.blocks.StructBlock", + [[("buttons", 63), ("position", 64)]], + {"label": "Button list"}, + ), + 66: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 16), + ("icon", 17), + ("size", 18), + ] + ], + {"label": "Single link"}, + ), + 67: ("wagtail.blocks.RichTextBlock", (), {"label": "Content"}), + 68: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 67)]], + {"label": "Accordion", "max_num": 15, "min_num": 1}, + ), + 69: ( + "wagtail.blocks.StreamBlock", + [[("title", 57), ("accordion", 68)]], + {"group": "DSFR components", "label": "Accordions"}, + ), + 70: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + "required": False, + }, + ), + 71: ( + "wagtail.blocks.StructBlock", + [ + [ + ("page", 13), + ("document", 14), + ("external_url", 15), + ("text", 34), + ("button_type", 35), + ("icon_class", 36), + ("icon_side", 37), + ] + ], + {"label": "Button", "required": False}, + ), + 72: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("green-tilleul-verveine", "Tilleul verveine"), + ("green-bourgeon", "Bourgeon"), + ("green-emeraude", "Émeraude"), + ("green-menthe", "Menthe"), + ("green-archipel", "Archipel"), + ("blue-ecume", "Écume"), + ("blue-cumulus", "Cumulus"), + ("purple-glycine", "Glycine"), + ("pink-macaron", "Macaron"), + ("pink-tuile", "Tuile"), + ("yellow-tournesol", "Tournesol"), + ("yellow-moutarde", "Moutarde"), + ("orange-terre-battue", "Terre battue"), + ("brown-cafe-creme", "Café crème"), + ("brown-caramel", "Caramel"), + ("brown-opera", "Opéra"), + ("beige-gris-galet", "Gris galet"), + ], + "label": "Color", + "required": False, + }, + ), + 73: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 31), + ("icon_class", 36), + ("text", 70), + ("button", 71), + ("color", 72), + ] + ], + {"group": "DSFR components", "label": "Callout"}, + ), + 74: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": [ + "bold", + "italic", + "link", + "document-link", + "superscript", + "subscript", + "strikethrough", + "blue_text", + "white_text", + "text-center", + ], + "label": "Content", + }, + ), + 75: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-text--sm", "Small"), ("", "Medium"), ("fr-text--lg", "Large")], + "label": "Size", + "required": False, + }, + ), + 76: ( + "wagtail.blocks.StructBlock", + [[("text", 74), ("color", 72), ("size", 75)]], + {"group": "DSFR components", "label": "Highlight"}, + ), + 77: ("wagtail.images.blocks.ImageChooserBlock", (), {"label": "Image", "required": False}), + 78: ("wagtail.blocks.CharBlock", (), {"label": "Quote"}), + 79: ("wagtail.blocks.CharBlock", (), {"label": "Author name", "required": False}), + 80: ("wagtail.blocks.CharBlock", (), {"label": "Author title", "required": False}), + 81: ( + "wagtail.blocks.StructBlock", + [[("image", 77), ("quote", 78), ("author_name", 79), ("author_title", 80), ("color", 72)]], + {"group": "DSFR components", "label": "Quote"}, + ), + 82: ( + "wagtail.blocks.IntegerBlock", + (), + {"label": "Number of steps", "max_value": 8, "min_value": 1}, + ), + 83: ("wagtail.blocks.IntegerBlock", (), {"label": "Current step", "max_value": 8, "min_value": 1}), + 84: ("wagtail.blocks.TextBlock", (), {"label": "Detail", "required": False}), + 85: ("wagtail.blocks.StructBlock", [[("title", 57), ("detail", 84)]], {"label": "Step"}), + 86: ("wagtail.blocks.StreamBlock", [[("step", 85)]], {"label": "Steps"}), + 87: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("total", 82), ("current", 83), ("steps", 86)]], + {"group": "DSFR components", "label": "Stepper"}, + ), + 88: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("fr-card--horizontal-tier", "1/3"), ("fr-card--horizontal-half", "50/50")], + "label": "Image ratio", + "required": False, + }, + ), + 89: ( + "wagtail.blocks.StreamBlock", + [[("badge", 55)]], + { + "help_text": "Only used if the card has an image.", + "label": "Image area badge", + "max_num": 1, + "required": False, + }, + ), + 90: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15)]], + {"label": "Link", "required": False}, + ), + 91: ( + "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, + }, + ), + 92: ( + "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, + }, + ), + 93: ("wagtail.blocks.CharBlock", (), {"label": "Top detail: text", "required": False}), + 94: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Top detail: icon", "required": False}, + ), + 95: ("wagtail.blocks.StreamBlock", [[("badge", 55)]], {}), + 96: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {}), + 97: ( + "wagtail.blocks.StreamBlock", + [[("badges", 95), ("tags", 96)]], + {"label": "Top detail: badges or tags", "max_num": 1, "required": False}, + ), + 98: ( + "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, + }, + ), + 99: ( + "content_manager.blocks.IconPickerBlock", + (), + {"label": "Bottom detail: icon", "required": False}, + ), + 100: ( + "wagtail.blocks.StructBlock", + [[("page", 13), ("document", 14), ("external_url", 15), ("text", 16)]], + {"label": "Link"}, + ), + 101: ("wagtail.blocks.StreamBlock", [[("link", 100)]], {}), + 102: ( + "wagtail.blocks.StreamBlock", + [[("links", 101), ("buttons", 39)]], + { + "help_text": "Incompatible with the bottom detail text.", + "label": "Bottom call-to-action: links or buttons", + "max_num": 1, + "required": False, + }, + ), + 103: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Card with grey background", "required": False}, + ), + 104: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without background", "required": False}), + 105: ("wagtail.blocks.BooleanBlock", (), {"label": "Card without border", "required": False}), + 106: ("wagtail.blocks.BooleanBlock", (), {"label": "Card with a shadow", "required": False}), + 107: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 88), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 98), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Horizontal card"}, + ), + 108: ( + "wagtail.blocks.RichTextBlock", + (), + { + "features": ["bold", "italic", "superscript", "subscript", "strikethrough"], + "label": "Content", + "required": False, + }, + ), + 109: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"help_text": "Prefer SVG files.", "label": "Image", "required": False}, + ), + 110: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "If the tile links to a downloadable document, the values are pre-filled.", + "label": "Detail text", + "required": False, + }, + ), + 111: ("wagtail.blocks.BooleanBlock", (), {"label": "Small tile", "required": False}), + 112: ( + "wagtail.blocks.BooleanBlock", + (), + {"label": "Tile with grey background", "required": False}, + ), + 113: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without background", "required": False}), + 114: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile without border", "required": False}), + 115: ("wagtail.blocks.BooleanBlock", (), {"label": "Tile with a shadow", "required": False}), + 116: ("wagtail.blocks.BooleanBlock", (), {"label": "Horizontal tile", "required": False}), + 117: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 108), + ("image", 109), + ("link", 90), + ("top_detail_badges_tags", 97), + ("detail_text", 110), + ("is_small", 111), + ("grey_background", 112), + ("no_background", 113), + ("no_border", 114), + ("shadow", 115), + ("is_horizontal", 116), + ] + ], + {"group": "DSFR components", "label": "Tile"}, + ), + 118: ( + "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, + }, + ), + 119: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Blog", "page_type": ["blog.BlogIndexPage"]}, + ), + 120: ( + "wagtail.blocks.IntegerBlock", + (), + { + "default": 3, + "label": "Number of entries", + "max_value": 8, + "min_value": 1, + "required": False, + }, + ), + 121: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Category",), + {"label": "Filter by category", "required": False}, + ), + 122: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("content_manager.Tag",), + {"label": "Filter by tag", "required": False}, + ), + 123: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + {"label": "Filter by author", "required": False}, + ), + 124: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Organization",), + { + "help_text": "The source is the organization of the post author", + "label": "Filter by source", + "required": False, + }, + ), + 125: ( + "wagtail.blocks.BooleanBlock", + (), + {"default": False, "label": "Show filters", "required": False}, + ), + 126: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("blog", 119), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Blog recent entries"}, + ), + 127: ( + "wagtail.blocks.PageChooserBlock", + (), + {"label": "Event calendar", "page_type": ["events.EventsIndexPage"]}, + ), + 128: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 1), + ("heading_tag", 118), + ("index_page", 127), + ("entries_count", 120), + ("category_filter", 121), + ("tag_filter", 122), + ("author_filter", 123), + ("source_filter", 124), + ("show_filters", 125), + ] + ], + {"group": "Website structure", "label": "Event calendar recent entries"}, + ), + 129: ("wagtailmarkdown.blocks.MarkdownBlock", (), {"group": "Expert syntax", "label": "Markdown"}), + 130: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Accessibility: The title should describe, in a clear and concise manner, the embedded content.", + "label": "Title", + }, + ), + 131: ( + "wagtail.blocks.URLBlock", + (), + { + "help_text": "Example for Tally: https://tally.so/embed/w2jMRa", + "label": "URL of the iframe", + }, + ), + 132: ("wagtail.blocks.IntegerBlock", (), {"label": "Height (in pixels)"}), + 133: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "For example: \"allow='geolocation'\".", + "label": "Parameters", + "required": False, + }, + ), + 134: ( + "wagtail.blocks.StructBlock", + [[("title", 130), ("url", 131), ("height", 132), ("parameters", 133)]], + {"group": "Expert syntax", "label": "Iframe"}, + ), + 135: ( + "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, + }, + ), + 136: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Top margin", "max_value": 15, "min_value": 0}, + ), + 137: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 3, "label": "Bottom margin", "max_value": 15, "min_value": 0}, + ), + 138: ( + "wagtail.blocks.StructBlock", + [[("top_margin", 136), ("bottom_margin", 137)]], + {"group": "Page structure", "label": "Separator"}, + ), + 139: ( + "wagtail.blocks.CharBlock", + (), + { + "help_text": "Incompatible with the bottom call-to-action.", + "label": "Bottom detail: text", + "required": False, + }, + ), + 140: ( + "wagtail.blocks.StructBlock", + [ + [ + ("title", 57), + ("heading_tag", 31), + ("description", 70), + ("image", 77), + ("image_ratio", 6), + ("image_badge", 89), + ("link", 90), + ("url", 91), + ("document", 92), + ("top_detail_text", 93), + ("top_detail_icon", 94), + ("top_detail_badges_tags", 97), + ("bottom_detail_text", 139), + ("bottom_detail_icon", 99), + ("call_to_action", 102), + ("grey_background", 103), + ("no_background", 104), + ("no_border", 105), + ("shadow", 106), + ] + ], + {"group": "DSFR components", "label": "Vertical card"}, + ), + 141: ( + "wagtail.snippets.blocks.SnippetChooserBlock", + ("blog.Person",), + { + "help_text": "Optional, all values can be manually specified or overriden below", + "label": "Person", + "required": False, + }, + ), + 142: ("wagtail.blocks.CharBlock", (), {"label": "Name", "max_length": 255, "required": False}), + 143: ("wagtail.blocks.CharBlock", (), {"label": "Role", "max_length": 255, "required": False}), + 144: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Organization", "max_length": 255, "required": False}, + ), + 145: ( + "wagtail.blocks.CharBlock", + (), + {"label": "Contact info", "max_length": 500, "required": False}, + ), + 146: ("wagtail.blocks.StreamBlock", [[("tag", 61)]], {"label": "Tags", "required": False}), + 147: ( + "wagtail.blocks.StructBlock", + [ + [ + ("contact", 141), + ("link", 90), + ("heading_tag", 2), + ("name", 142), + ("role", 143), + ("organization", 144), + ("contact_info", 145), + ("image", 77), + ("tags", 146), + ] + ], + {"group": "Extra components", "label": "Contact card"}, + ), + 148: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Content"}, + ), + 149: ( + "wagtail.blocks.StructBlock", + [[("title", 57), ("content", 148)]], + {"label": "Tab", "max_num": 15, "min_num": 1}, + ), + 150: ( + "wagtail.blocks.StreamBlock", + [[("tabs", 149)]], + {"group": "DSFR components", "label": "Tabs"}, + ), + 151: ( + "wagtail.images.blocks.ImageChooserBlock", + (), + {"label": "Background image", "required": False}, + ), + 152: ( + "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, + }, + ), + 153: ( + "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, + }, + ), + 154: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [ + ("h2", "Heading 2"), + ("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, + }, + ), + 155: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Top margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 156: ( + "wagtail.blocks.IntegerBlock", + (), + {"default": 5, "label": "Bottom margin", "max_value": 15, "min_value": 0, "required": False}, + ), + 157: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("top", "Top"), ("middle", "Middle"), ("bottom", "Bottom")], + "label": "Vertical align", + "required": False, + }, + ), + 158: ( + "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, + }, + ), + 159: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Column content"}, + ), + 160: ( + "wagtail.blocks.StructBlock", + [[("width", 158), ("content", 159)]], + {"group": "Page structure", "label": "Adjustable column"}, + ), + 161: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("column", 160), + ] + ], + {"label": "Columns"}, + ), + 162: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("bg_color", 153), + ("title", 1), + ("heading_tag", 154), + ("top_margin", 155), + ("bottom_margin", 156), + ("vertical_align", 157), + ("columns", 161), + ] + ], + {"group": "Page structure", "label": "Multiple columns"}, + ), + 163: ( + "wagtail.blocks.ChoiceBlock", + [], + {"choices": [("3", "3/12"), ("4", "4/12"), ("6", "6/12")], "label": "Column width"}, + ), + 164: ( + "wagtail.blocks.ChoiceBlock", + [], + { + "choices": [("left", "Left"), ("center", "Center"), ("right", "Right")], + "label": "Horizontal align", + "required": False, + }, + ), + 165: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("card", 140), + ("contact_card", 147), + ] + ], + {"label": "Items"}, + ), + 166: ( + "wagtail.blocks.StructBlock", + [[("column_width", 163), ("horizontal_align", 164), ("vertical_align", 157), ("items", 165)]], + {"group": "Page structure", "label": "Item grid"}, + ), + 167: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Content"}, + ), + 168: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("content", 167), + ] + ], + {"group": "Page structure", "label": "Full width background"}, + ), + 169: ( + "wagtail.blocks.StreamBlock", + [ + [ + ("text", 0), + ("image", 9), + ("imageandtext", 23), + ("table", 27), + ("alert", 32), + ("text_cta", 43), + ("video", 50), + ("transcription", 51), + ("badges_list", 56), + ("tags_list", 62), + ("buttons_list", 65), + ("accordions", 69), + ("callout", 73), + ("highlight", 76), + ("quote", 81), + ("link", 66), + ("tile", 117), + ("blog_recent_entries", 126), + ("events_recent_entries", 128), + ("stepper", 87), + ("markdown", 129), + ("iframe", 134), + ("html", 135), + ("separator", 138), + ("image_and_text", 23), + ("card", 107), + ("tabs", 150), + ("item_grid", 166), + ] + ], + {"label": "Main content"}, + ), + 170: ("wagtail.blocks.CharBlock", (), {"label": "Side menu title", "required": False}), + 171: ( + "wagtail.blocks.RawHTMLBlock", + (), + { + "help_text": "Warning: Use HTML block with caution. Malicious code can compromise the security of the site.", + "label": "HTML", + }, + ), + 172: ("wagtail.blocks.PageChooserBlock", (), {"label": "Parent page"}), + 173: ("wagtail.blocks.StructBlock", [[("page", 172)]], {"label": "Page tree"}), + 174: ( + "wagtail.blocks.StreamBlock", + [[("html", 171), ("pagetree", 173)]], + {"label": "Side menu content"}, + ), + 175: ( + "wagtail.blocks.StructBlock", + [ + [ + ("bg_image", 151), + ("bg_color_class", 152), + ("top_margin", 155), + ("bottom_margin", 156), + ("main_content", 169), + ("sidemenu_title", 170), + ("sidemenu_content", 174), + ] + ], + {"group": "Page structure", "label": "Full width background with side menu"}, + ), + 176: ( + "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", + }, + ), + }, + ), + ), + ] diff --git a/static/css/style.css b/static/css/style.css index 2552cccd..3b40376e 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -90,3 +90,10 @@ p:empty { order: 2; } } + +.cmsfr-text--blue { + color: var(--text-active-blue-france) !important; +} +.cmsfr-text--white { + color: var(--grey-1000-50) !important; +}