From 48e532016abb64333a641c1148ae41233ab930f0 Mon Sep 17 00:00:00 2001 From: Amanda Lim-Cabuloy Date: Mon, 3 Feb 2025 15:37:20 +0800 Subject: [PATCH] Add a subheading field to the featured services block --- tbx/core/blocks.py | 1 + .../streamfield/blocks/featured_services_block.html | 3 +++ .../streamfield/blocks/featured_services_block.yaml | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/tbx/core/blocks.py b/tbx/core/blocks.py index 42f467b3e..a7b81fb2e 100644 --- a/tbx/core/blocks.py +++ b/tbx/core/blocks.py @@ -287,6 +287,7 @@ class Meta: class FeaturedPageCardBlock(blocks.StructBlock): heading = blocks.CharBlock(required=False) + subheading = blocks.CharBlock(required=False) description = blocks.RichTextBlock(features=settings.NO_HEADING_RICH_TEXT_FEATURES) image = ImageChooserBlock() link_text = blocks.CharBlock() diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.html b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.html index d843ae11e..7c96bcca9 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.html +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.html @@ -12,6 +12,9 @@ {% srcset_image card.image format-webp fill-{750x420,650x420} sizes="(max-width: 750px) 100vw, (min-width: 751px) 650px" alt="" %} {# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #} diff --git a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.yaml b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.yaml index 1924ba7f0..34f7a144d 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.yaml +++ b/tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_services_block.yaml @@ -4,17 +4,25 @@ context: intro: 'Discover how we can help you achieve your goals through our range of services.' cards: - heading: Advocacy, Engagement & Income + subheading: '' description: '

Grow your audience, mobilise and increase your income through design, communication and strategy

' link_text: Our services accessible_link_text: Our Advocacy, Engagement & Income services - heading: Measure, Analyse & Optimise + subheading: '' description: '

Organise your data to gain the insights and confidence needed to boost your charity's performance.

' link_text: Our services accessible_link_text: Our Measure, Analyse & Optimise services - heading: Scale impact through Technology + subheading: '' description: '

We design technology that's built for humans. Scale your impact and better deliver your services by leveraging our expertise.

' link_text: Our services accessible_link_text: Our services on scaling impact through Technology + - heading: Explore + subheading: Discover the whole problem. + description: '

Use data-led insights to understand, evaluate and amplify the impact of your services. Grow awareness and ensure your services are reaching the people you serve.

' + link_text: Our services + accessible_link_text: Our services on scaling impact through Technology tags: srcset_image: