+ {{ text }} +
+ {% else %} +{{ text }}
+ {% endif %} +diff --git a/assets/stylesheets/components/_home_new.scss b/assets/stylesheets/components/_home_new.scss index 7df98ef43..052927df4 100644 --- a/assets/stylesheets/components/_home_new.scss +++ b/assets/stylesheets/components/_home_new.scss @@ -55,12 +55,13 @@ } // Adds spacing to the top level content when a flag banner is not present. - .dwds > .stack > :not(.govuk-phase-banner) { + .dwds > .content-stack > :not(.govuk-phase-banner) { margin-block-start: var(--space); } } .new-home { + article, section { display: inline; @@ -81,4 +82,4 @@ margin-bottom: 10px; } } -} +} \ No newline at end of file diff --git a/assets/stylesheets/components/_streamfield-content.scss b/assets/stylesheets/components/_streamfield-content.scss index a9b2ba700..a607199fc 100644 --- a/assets/stylesheets/components/_streamfield-content.scss +++ b/assets/stylesheets/components/_streamfield-content.scss @@ -10,7 +10,8 @@ @include govuk-font($size: 16, $weight: bold); } - p, li { + p, + li { @extend %govuk-body-m; } @@ -29,30 +30,19 @@ } table { - @extend .govuk-table; + @extend .govuk-table; - caption { - @extend .govuk-table__caption; - } + caption { + @extend .govuk-table__caption; + } - th { - @extend .govuk-table__header; - } + th { + @extend .govuk-table__header; + } - td { - @extend .govuk-table__cell; - } - } -} - -.ws-streamfield-content__image { - margin: 0 0 govuk-spacing(3) 0; - padding: 0; - display: table; - - img { - max-width: 100%; - height: auto; + td { + @extend .govuk-table__cell; + } } } @@ -71,8 +61,10 @@ .ws-streamfield-content__cta-link-container { padding-top: govuk-spacing(2); - a, a:visited { + + a, + a:visited { color: $govuk-text-colour; padding: govuk-spacing(4); } -} +} \ No newline at end of file diff --git a/src/content/templates/content/navigation_page.html b/src/content/templates/content/navigation_page.html index 994d2eab4..214ef6a51 100644 --- a/src/content/templates/content/navigation_page.html +++ b/src/content/templates/content/navigation_page.html @@ -4,7 +4,7 @@ {% block body_classes %}dwds-body dwds-navigation-page{% endblock %} {% block page_title %} -
+ {{ text }} +
+ {% else %} +{{ text }}
+ {% endif %} +{{ text }}
- - {% else %} -{{ text }}
- {% endif %} -{% endblock card_content_body %} - -{% block card_footer %} -{% endblock card_footer %} diff --git a/src/dw_design_system/dwds/components/banner_card.scss b/src/dw_design_system/dwds/components/banner_card.scss deleted file mode 100644 index f1aa27206..000000000 --- a/src/dw_design_system/dwds/components/banner_card.scss +++ /dev/null @@ -1,13 +0,0 @@ -.dwds-card-wrapper { - .dwds-card.dwds-banner-card { - h3 { - font-size: var(--text-xlarge); - font-weight: var(--font-weight-normal); - line-height: var(--font-lineheight-headings); - } - - p { - margin: 0; - } - } -} \ No newline at end of file diff --git a/src/dw_design_system/dwds/components/box.html b/src/dw_design_system/dwds/components/box.html new file mode 100644 index 000000000..244d7d2dc --- /dev/null +++ b/src/dw_design_system/dwds/components/box.html @@ -0,0 +1 @@ +{{ description }}
{% endif %} +{{ description }}
{% endif %} -{% endblock card_content_body %} - -{% block card_footer %} -{% endblock card_footer %} +{{ excerpt|truncatewords:16 }}
{% endif %} +{{ excerpt|truncatewords:16 }}
{% endif %} -{% endblock card_content_body %} - -{% block card_footer_body %} - {% if updated_date > created_date %} - - {% elif created_date %} - - {% endif %} - - {% if comment_count > 0 %} - - - {{ comment_count }} Comment{{ comment_count|pluralize }} - - {% endif %} -{% endblock card_footer_body %} diff --git a/src/dw_design_system/dwds/components/engagement_card.scss b/src/dw_design_system/dwds/components/engagement_card.scss deleted file mode 100644 index b12c935f1..000000000 --- a/src/dw_design_system/dwds/components/engagement_card.scss +++ /dev/null @@ -1,3 +0,0 @@ -.dwds-card.dwds-engagement-card { - --card-body-heading-color: var(--color-link); -} \ No newline at end of file diff --git a/src/dw_design_system/dwds/components/link_action.html b/src/dw_design_system/dwds/components/link_action.html new file mode 100644 index 000000000..3b561f76d --- /dev/null +++ b/src/dw_design_system/dwds/components/link_action.html @@ -0,0 +1,10 @@ + + {% if left %} + {% include "dwds/icons/arrow-left.html" %} + {% endif %} +{{ description }}
{% endif %} -{{ description }}
{% endif %} +{{ summary }}
{% endif %} -{% endblock card_content_body %} - -{% block card_footer %} -{% endblock card_footer %} diff --git a/src/dw_design_system/dwds/components/navigation_card.py b/src/dw_design_system/dwds/components/navigation_card.py deleted file mode 100644 index 0f17bc651..000000000 --- a/src/dw_design_system/dwds/components/navigation_card.py +++ /dev/null @@ -1,35 +0,0 @@ -from wagtail import blocks - -from content import blocks as content_blocks - - -class NavigationCardBlock(blocks.StructBlock): - """A nav card to direct users""" - - page = blocks.PageChooserBlock() - title = content_blocks.HeadingBlock( - required=False, - max_length=30, - help_text="By default, the name of the page will be the title. Override it using the below field.", - ) - summary = blocks.CharBlock(required=False, max_length=70) - - class Meta: - label = "Navigation Card" - icon = "link" - template = "dwds/components/navigation_card.html" - - def get_context(self, value, parent_context=None): - context = parent_context or {} - page = value["page"] - context.update( - title=value.get("title") or page.title, - url=page.get_url(), - summary=value["summary"], - ) - return context - - def get_searchable_heading(self, value): - title = value["title"] - page = value["page"] - return title or page.title diff --git a/src/dw_design_system/dwds/components/navigation_card.scss b/src/dw_design_system/dwds/components/navigation_card.scss deleted file mode 100644 index 9c07d33b1..000000000 --- a/src/dw_design_system/dwds/components/navigation_card.scss +++ /dev/null @@ -1 +0,0 @@ -.dwds-navigation-card {} \ No newline at end of file diff --git a/src/dw_design_system/dwds/components/one_up.html b/src/dw_design_system/dwds/components/one_up.html new file mode 100644 index 000000000..7e5518afa --- /dev/null +++ b/src/dw_design_system/dwds/components/one_up.html @@ -0,0 +1,43 @@ +{% load wagtailimages_tags static humanize %} + +{{ excerpt|truncatewords:16 }}
{% endif %} +{{ excerpt|truncatewords:16 }}
{% endif %} - {% endblock card_content_body %} -{{ description }}
{% endif %} - {% if link_url and link_text %} - {% include "dwds/elements/navigational_link.html" with url=link_url text=link_text %} - {% endif %} -{% endblock card_content_body %} - -{% block card_footer %} -{% endblock card_footer %} +{% load wagtailimages_tags static humanize %} +{{ description }}
{% endif %} + {% if link_url and link_text %} + {% include "dwds/components/link_action.html" with link_url=link_url link_text=link_text right=True %} + {% endif %} +26 June
+Join John Smith, former SpAd for Jane Doe, at the next DBT Connect event on Wednesday 26 June, 1-2pm.
+ See event +26 June
-Join John Smith, former SpAd for Jane Doe, at the next DBT Connect event on Wednesday 26 June, 1-2pm.
- See event - {% endblock card_content_body %} -Location
-Room
-Capacity
-Audience
-Event type
- {% if is_online or is_in_person %} -
@@ -106,8 +106,8 @@
Leave a comment
return false; } - {% endif %} -