Skip to content

Commit

Permalink
Add a subheading field to the featured services block
Browse files Browse the repository at this point in the history
  • Loading branch information
SharmaineLim committed Feb 3, 2025
1 parent 4297f3d commit 48e5320
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions tbx/core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{% srcset_image card.image format-webp fill-{750x420,650x420} sizes="(max-width: 750px) 100vw, (min-width: 751px) 650px" alt="" %}
<div class="featured-services__text">
<h3 class="featured-services__heading heading heading--two-b">{% firstof card.heading card.page.title %}</h3>
{% if card.subheading %}
<p class="featured-services__subheading">{{ card.subheading }}</p>
{% endif %}
<div class="featured-services__description rich-text">{{ card.description|richtext }}</div>
</div>
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<p>Grow your audience, mobilise and increase your income through design, communication and strategy</p>'
link_text: Our services
accessible_link_text: Our Advocacy, Engagement & Income services
- heading: Measure, Analyse & Optimise
subheading: ''
description: '<p>Organise your data to gain the insights and confidence needed to boost your charity&apos;s performance.</p>'
link_text: Our services
accessible_link_text: Our Measure, Analyse & Optimise services
- heading: Scale impact through Technology
subheading: ''
description: '<p>We design technology that&apos;s built for humans. Scale your impact and better deliver your services by leveraging our expertise.</p>'
link_text: Our services
accessible_link_text: Our services on scaling impact through Technology
- heading: Explore
subheading: Discover the whole problem.
description: '<p>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.</p>'
link_text: Our services
accessible_link_text: Our services on scaling impact through Technology

tags:
srcset_image:
Expand Down

0 comments on commit 48e5320

Please sign in to comment.