diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index fceeeb99b..e5f5d094d 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -47,7 +47,7 @@ jobs: - name: Build site (_site directory name is used for Jekyll compatiblity) run: mkdocs build --config-file ./mkdocs.yml --site-dir ./_site - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 deploy: needs: build diff --git a/tbx/core/blocks.py b/tbx/core/blocks.py index 8d2ff43ee..42f467b3e 100644 --- a/tbx/core/blocks.py +++ b/tbx/core/blocks.py @@ -235,6 +235,9 @@ def get_button_file_size(self): class CallToActionBlock(blocks.StructBlock): text = blocks.CharBlock(required=True, max_length=255) + description = blocks.RichTextBlock( + features=settings.PARAGRAPH_RICH_TEXT_FEATURES, required=False + ) button_text = blocks.CharBlock(max_length=55) button_link = blocks.StreamBlock( [ @@ -344,6 +347,46 @@ class Meta: template = "patterns/molecules/streamfield/blocks/four_photo_collage_block.html" +class KeyPointIconChoice(models.TextChoices): + CALENDAR = "key-calendar", "calendar icon" + CONVERSATION = "key-conversation", "chat bubbles icon" + LIGHTBULB = "key-lightbulb", "lightbulb icon" + MAIL = "key-mail", "mail icon" + MEGAPHONE = "key-megaphone", "megaphone icon" + PEOPLE = "key-people", "people icon" + BULLSEYE = "key-bullseye", "target icon" + UP_ARROW = "key-up-arrow", "up arrow icon" + + +class IconKeyPointBlock(blocks.StructBlock): + icon = blocks.ChoiceBlock( + choices=KeyPointIconChoice.choices, + default=KeyPointIconChoice.LIGHTBULB, + max_length=32, + ) + icon_label = blocks.CharBlock() + heading = blocks.CharBlock() + description = blocks.RichTextBlock(features=settings.NO_HEADING_RICH_TEXT_FEATURES) + + class Meta: + icon = "breadcrumb-expand" + + +class IconKeyPointsBlock(blocks.StructBlock): + """Used on the service area page.""" + + title = blocks.CharBlock(max_length=255, required=False) + intro = blocks.RichTextBlock( + features=settings.NO_HEADING_RICH_TEXT_FEATURES, required=False + ) + key_points = blocks.ListBlock(IconKeyPointBlock(label="Key point"), min_num=1) + + class Meta: + group = "Custom" + icon = "list-ul" + template = "patterns/molecules/streamfield/blocks/icon_keypoints_block.html" + + class IntroductionWithImagesBlock(blocks.StructBlock): """Used on the division page.""" @@ -614,11 +657,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) @@ -640,11 +688,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/_pattern_library_only/streamfield/service_area_story_container.html b/tbx/project_styleguide/templates/patterns/_pattern_library_only/streamfield/service_area_story_container.html index 41b269845..6ca2540b6 100644 --- a/tbx/project_styleguide/templates/patterns/_pattern_library_only/streamfield/service_area_story_container.html +++ b/tbx/project_styleguide/templates/patterns/_pattern_library_only/streamfield/service_area_story_container.html @@ -1,5 +1,6 @@ {% include "patterns/molecules/streamfield/blocks/four_photo_collage_block.html" %} +{% include "patterns/molecules/streamfield/blocks/icon_keypoints_block.html" %} {% include "patterns/molecules/streamfield/blocks/contact_call_to_action.html" %} {% include "patterns/molecules/streamfield/blocks/work_chooser_block.html" %} {% include "patterns/molecules/streamfield/blocks/pullquote_block.html" %} diff --git a/tbx/project_styleguide/templates/patterns/atoms/sprites/sprites.html b/tbx/project_styleguide/templates/patterns/atoms/sprites/sprites.html index 3268ce73c..1035d1179 100644 --- a/tbx/project_styleguide/templates/patterns/atoms/sprites/sprites.html +++ b/tbx/project_styleguide/templates/patterns/atoms/sprites/sprites.html @@ -171,4 +171,57 @@ + + {# for KeyPointIconChoice - bullseye / target #} + + + + + + + {# for KeyPointIconChoice - calendar #} + + + + + + + {# for KeyPointIconChoice - conversation #} + + + + + + {# for KeyPointIconChoice - lightbulb #} + + + + + + + {# for KeyPointIconChoice - mail #} + + + + + + {# for KeyPointIconChoice - megaphone #} + + + + + + + {# for KeyPointIconChoice - people #} + + + + + + + {# for KeyPointIconChoice - up arrow #} + + + + diff --git a/tbx/project_styleguide/templates/patterns/molecules/footer-cta/footer-cta.html b/tbx/project_styleguide/templates/patterns/molecules/footer-cta/footer-cta.html index 5c6e8a107..46a6f6a83 100644 --- a/tbx/project_styleguide/templates/patterns/molecules/footer-cta/footer-cta.html +++ b/tbx/project_styleguide/templates/patterns/molecules/footer-cta/footer-cta.html @@ -3,7 +3,7 @@

{{ contact_heading }}