diff --git a/tbx/core/blocks.py b/tbx/core/blocks.py index 05e5507b..582815e5 100644 --- a/tbx/core/blocks.py +++ b/tbx/core/blocks.py @@ -654,11 +654,16 @@ def clean(self, value): class BlogChooserBlock(blocks.StructBlock): featured_blog_heading = blocks.CharBlock(max_length=255) + intro = blocks.RichTextBlock( + features=settings.NO_HEADING_RICH_TEXT_FEATURES, required=False + ) blog_pages = blocks.ListBlock( blocks.PageChooserBlock(page_type="blog.BlogPage"), min_num=1, max_num=3, ) + primary_button = LinkBlock(label="Primary button", required=False) + secondary_button = LinkBlock(label="Secondary button", required=False) def get_context(self, value, parent_context=None): context = super().get_context(value, parent_context=parent_context) @@ -680,11 +685,16 @@ def get_context(self, value, parent_context=None): class WorkChooserBlock(blocks.StructBlock): featured_work_heading = blocks.CharBlock(max_length=255) + intro = blocks.RichTextBlock( + features=settings.NO_HEADING_RICH_TEXT_FEATURES, required=False + ) work_pages = blocks.ListBlock( blocks.PageChooserBlock(page_type=["work.WorkPage", "work.HistoricalWorkPage"]), min_num=1, max_num=3, ) + primary_button = LinkBlock(label="Primary button", required=False) + secondary_button = LinkBlock(label="Secondary button", required=False) def get_context(self, value, parent_context=None): context = super().get_context(value, parent_context) diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/blog_chooser_block.html b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/blog_chooser_block.html index 075b5d6a..2e412123 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/blog_chooser_block.html +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/blog_chooser_block.html @@ -1,11 +1,20 @@ {% load wagtailcore_tags %} +{# Section heading #} {% if is_standard_page %}
An injection of fresh ideas, and the occasional challenging opinion, to ignite your fire.
' + # primary_button: + # - value: + # text: Primary button + # url: '#' + # secondary_button: + # - value: + # text: Secondary button + # url: '#' blog_pages: - title: Explore the potential of AI in content management date: 20 Oct 2023 diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/work_chooser_block.html b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/work_chooser_block.html index 17d96277..bb8cb4d0 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/work_chooser_block.html +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/work_chooser_block.html @@ -1,12 +1,21 @@ {% load wagtailcore_tags %} {% if work_pages %} + {# Section heading #} {% if is_standard_page %}An injection of fresh ideas, and the occasional challenging opinion, to ignite your fire.
' + # primary_button: + # - value: + # text: Primary button + # url: '#' + # secondary_button: + # - value: + # text: Secondary button + # url: '#' work_pages: - title: Imagining and designing a future product for MQ in 5 days flat client: 'MQ: Transforming Mental Health'