From f4efecf268153e6bf4880d579c6be5214e9ef772 Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:17:22 +0000 Subject: [PATCH 01/10] Create new content footer component for CDT --- app/assets/stylesheets/application.scss | 21 +++++++++++++++++++ app/views/pages/default.html.slim | 2 ++ app/views/pages/side_nav.slim | 2 ++ .../shared/_cdt_content_footer.html.slim | 10 +++++++++ 4 files changed, 35 insertions(+) create mode 100644 app/views/shared/_cdt_content_footer.html.slim diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c7890cb2..3af50f88 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -115,6 +115,27 @@ main img { } +.light-blue-box { + margin-right: 0; + padding-left: govuk-spacing(4); + margin-bottom: govuk-spacing(5); + background: $light-blue; + + @include govuk-media-query($until: tablet) { + margin-top: govuk-spacing(6); + margin-bottom: govuk-spacing(6); + } + + &.enrol-box { + border-radius: 6px; + + .govuk-button { + margin: 0; + } + } + +} + .float-right { float: right; display: block; diff --git a/app/views/pages/default.html.slim b/app/views/pages/default.html.slim index fd54f21b..bd55b94e 100644 --- a/app/views/pages/default.html.slim +++ b/app/views/pages/default.html.slim @@ -31,3 +31,5 @@ dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{"event_name":"navigation","type":"content history","section":"Top","action":"opened"}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)} = render 'shared/ctas' + += render 'shared/cdt_content_footer' diff --git a/app/views/pages/side_nav.slim b/app/views/pages/side_nav.slim index 285deb81..ebb71ba4 100644 --- a/app/views/pages/side_nav.slim +++ b/app/views/pages/side_nav.slim @@ -32,3 +32,5 @@ = m(page.body) = render 'shared/ctas' + += render 'shared/cdt_content_footer' diff --git a/app/views/shared/_cdt_content_footer.html.slim b/app/views/shared/_cdt_content_footer.html.slim new file mode 100644 index 00000000..1f1f109b --- /dev/null +++ b/app/views/shared/_cdt_content_footer.html.slim @@ -0,0 +1,10 @@ +.light-blue-box.govuk-grid-row class='govuk-!-margin-top-9' + .govuk-width-container + .govuk-grid-column-two-thirds class='govuk-!-text-align-left govuk-!-padding-top-2' + + div.govuk-body-m + p= m(child_development_training.body) + p= govuk_link_to child_development_training.link_to_text, child_development_training.link_to, class: 'govuk-!-margin-bottom-4 govuk-link--no-visited-state govuk-!-font-weight-bold govuk-body' + + .govuk-grid-column-one-third class='govuk-!-padding-0' + = image_tag(page.thumbnail.url, width: '100%', alt: page.thumbnail.description, title: page.thumbnail.title) From 42e3c4e736c48b5f7a8938739808f702d095f225 Mon Sep 17 00:00:00 2001 From: Rick Jones Date: Wed, 27 Mar 2024 15:18:56 +0000 Subject: [PATCH 02/10] Update content footer - Rename component - Update component to pull data correctly from Contentful --- app/assets/stylesheets/application.scss | 21 ------------------- app/helpers/content_helper.rb | 4 ++-- app/views/pages/default.html.slim | 2 +- app/views/pages/side_nav.slim | 2 +- .../shared/_cdt_content_footer.html.slim | 10 --------- app/views/shared/_content_footer.html.slim | 15 +++++++++++++ 6 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 app/views/shared/_cdt_content_footer.html.slim create mode 100644 app/views/shared/_content_footer.html.slim diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 3af50f88..c7890cb2 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -115,27 +115,6 @@ main img { } -.light-blue-box { - margin-right: 0; - padding-left: govuk-spacing(4); - margin-bottom: govuk-spacing(5); - background: $light-blue; - - @include govuk-media-query($until: tablet) { - margin-top: govuk-spacing(6); - margin-bottom: govuk-spacing(6); - } - - &.enrol-box { - border-radius: 6px; - - .govuk-button { - margin: 0; - } - } - -} - .float-right { float: right; display: block; diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 639fb35f..6c70b5d3 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -63,8 +63,8 @@ def feedback Resource.by_name('ctas.feedback') || null_resource('ctas.feedback') end - def child_development_training - Resource.by_name('ctas.child_development_training') || null_resource('ctas.child_development_training') + def content_footer + Resource.by_name('ctas.content_footer') || null_resource('ctas.content_footer') end def other_useful_resources diff --git a/app/views/pages/default.html.slim b/app/views/pages/default.html.slim index bd55b94e..63d2018e 100644 --- a/app/views/pages/default.html.slim +++ b/app/views/pages/default.html.slim @@ -32,4 +32,4 @@ = render 'shared/ctas' -= render 'shared/cdt_content_footer' += render 'shared/content_footer' diff --git a/app/views/pages/side_nav.slim b/app/views/pages/side_nav.slim index ebb71ba4..e8253558 100644 --- a/app/views/pages/side_nav.slim +++ b/app/views/pages/side_nav.slim @@ -33,4 +33,4 @@ = render 'shared/ctas' -= render 'shared/cdt_content_footer' += render 'shared/content_footer' diff --git a/app/views/shared/_cdt_content_footer.html.slim b/app/views/shared/_cdt_content_footer.html.slim deleted file mode 100644 index 1f1f109b..00000000 --- a/app/views/shared/_cdt_content_footer.html.slim +++ /dev/null @@ -1,10 +0,0 @@ -.light-blue-box.govuk-grid-row class='govuk-!-margin-top-9' - .govuk-width-container - .govuk-grid-column-two-thirds class='govuk-!-text-align-left govuk-!-padding-top-2' - - div.govuk-body-m - p= m(child_development_training.body) - p= govuk_link_to child_development_training.link_to_text, child_development_training.link_to, class: 'govuk-!-margin-bottom-4 govuk-link--no-visited-state govuk-!-font-weight-bold govuk-body' - - .govuk-grid-column-one-third class='govuk-!-padding-0' - = image_tag(page.thumbnail.url, width: '100%', alt: page.thumbnail.description, title: page.thumbnail.title) diff --git a/app/views/shared/_content_footer.html.slim b/app/views/shared/_content_footer.html.slim new file mode 100644 index 00000000..e3a2ed7c --- /dev/null +++ b/app/views/shared/_content_footer.html.slim @@ -0,0 +1,15 @@ +section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" + div class="govuk-grid-row" + div class="govuk-grid-column-full" + div class="cta-banner" + div class="cta-banner-text" + span class="govuk-caption-m" Other early years resources from the Department for Education + h2 class="govuk-heading-l" + = content_footer.title + p + = content_footer.body + p + = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: "govuk-!-font-weight-bold" + div class="cta-banner-img" + img + = image_tag content_footer.image.url, class: "full-width-image", alt: content_footer.image.description, title: content_footer.image.title From b226fa223f8ab5941231c2905a683517b11577d1 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Tue, 2 Apr 2024 13:58:00 +0100 Subject: [PATCH 03/10] Govspeak and CDT style quotes concurrently (#760) --- app/views/markup/_blockquote.html.slim | 4 ++++ app/views/markup/_quote.html.slim | 7 ++++--- config/initializers/markdown.rb | 24 ++++++++++++++++++++++-- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 app/views/markup/_blockquote.html.slim diff --git a/app/views/markup/_blockquote.html.slim b/app/views/markup/_blockquote.html.slim new file mode 100644 index 00000000..3813600f --- /dev/null +++ b/app/views/markup/_blockquote.html.slim @@ -0,0 +1,4 @@ +.application-notice.info-notice role='note' aria-label='Information' + == quote + +p= citation diff --git a/app/views/markup/_quote.html.slim b/app/views/markup/_quote.html.slim index 3813600f..01959044 100644 --- a/app/views/markup/_quote.html.slim +++ b/app/views/markup/_quote.html.slim @@ -1,4 +1,5 @@ -.application-notice.info-notice role='note' aria-label='Information' - == quote +.blockquote-container + blockquote.quote + == quote -p= citation + cite= citation diff --git a/config/initializers/markdown.rb b/config/initializers/markdown.rb index 399be5e7..d236e0ac 100644 --- a/config/initializers/markdown.rb +++ b/config/initializers/markdown.rb @@ -3,7 +3,7 @@ class CustomPreprocessor < GovukMarkdown::Preprocessor # @return [CustomPreprocessor] def apply_all - inject_inset_text.inject_details.two_thirds.button.external.quote.video + inject_inset_text.inject_details.two_thirds.button.external.quote.blockquote.video end # @example @@ -69,7 +69,7 @@ def external # This is the citation # {/quote} # - # @return [CustomPreprocessor] + # @return [CustomPreprocessor] CDT style def quote pattern = build_regexp('quote') @output = output.gsub(pattern) do @@ -79,6 +79,21 @@ def quote self end + # @example + # {blockquote} + # This is the quote and the citation + # {/blockquote} + # + # @return [CustomPreprocessor] Govspeak style + def blockquote + pattern = build_regexp('blockquote') + @output = output.gsub(pattern) do + quote, citation = split_content Regexp.last_match(1) + blockquote_template.render(nil, quote: nested_markdown(quote), citation: citation) + end + self + end + # @example # {video}872080640{/video} # @@ -117,6 +132,11 @@ def quote_template @quote_template ||= Slim::Template.new('app/views/markup/_quote.html.slim') end + # @return [Slim::Template] + def blockquote_template + @blockquote_template ||= Slim::Template.new('app/views/markup/_blockquote.html.slim') + end + # @return [Slim::Template] def video_template @video_template ||= Slim::Template.new('app/views/markup/_video.html.slim') From 6e0f2e683b947bf2a06859e55b34c7f44bc0742f Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Wed, 3 Apr 2024 09:24:08 +0100 Subject: [PATCH 04/10] Fix two_thirds tag and introduce image_card mimicking CDTs about page (#761) --- app/views/markup/_image_card.html.slim | 5 +++++ config/initializers/markdown.rb | 30 +++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 app/views/markup/_image_card.html.slim diff --git a/app/views/markup/_image_card.html.slim b/app/views/markup/_image_card.html.slim new file mode 100644 index 00000000..76686145 --- /dev/null +++ b/app/views/markup/_image_card.html.slim @@ -0,0 +1,5 @@ +.about-module-box + .about-module-box-panel + p.govuk-body-l + = text + .about-module-box-panel style="min-height: 150px; background-image: url(#{image})" diff --git a/config/initializers/markdown.rb b/config/initializers/markdown.rb index d236e0ac..8a4104f1 100644 --- a/config/initializers/markdown.rb +++ b/config/initializers/markdown.rb @@ -3,7 +3,7 @@ class CustomPreprocessor < GovukMarkdown::Preprocessor # @return [CustomPreprocessor] def apply_all - inject_inset_text.inject_details.two_thirds.button.external.quote.blockquote.video + inject_inset_text.inject_details.two_thirds.image_card.button.external.quote.blockquote.video end # @example @@ -26,6 +26,24 @@ def two_thirds self end + # @example + # {image_card} + # This is the body copy + # + # //path/to/image + # {/image_card} + # + # @return [CustomPreprocessor] + def image_card + pattern = build_regexp('image_card') + @output = output.gsub(pattern) do + text, image = split_content Regexp.last_match(1) + + image_card_template.render(nil, text: text, image: image) + end + self + end + # @example # {button}[Continue](/path/to/page){/button} # @@ -127,6 +145,16 @@ def hyperlink(content) [Regexp.last_match(1), Regexp.last_match(2)] end + # @return [Slim::Template] + def image_card_template + @image_card_template ||= Slim::Template.new('app/views/markup/_image_card.html.slim') + end + + # @return [Slim::Template] + def two_thirds_template + @two_thirds_template ||= Slim::Template.new('app/views/markup/_two_thirds.html.slim') + end + # @return [Slim::Template] def quote_template @quote_template ||= Slim::Template.new('app/views/markup/_quote.html.slim') From 31720cb0cb36df2dbdb7213166b031be2e883ec7 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 5 Apr 2024 10:40:28 +0100 Subject: [PATCH 05/10] ER-957 Downloadable media (#762) Custom tag using manual variables as MVP. Dynamic variables require model association with media. --- .../markup/_downloadable_media.html.slim | 26 ++++++++++++++++ config/application.rb | 5 ---- config/initializers/markdown.rb | 30 ++++++++++++++++++- 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 app/views/markup/_downloadable_media.html.slim diff --git a/app/views/markup/_downloadable_media.html.slim b/app/views/markup/_downloadable_media.html.slim new file mode 100644 index 00000000..6f558d87 --- /dev/null +++ b/app/views/markup/_downloadable_media.html.slim @@ -0,0 +1,26 @@ +section.gem-c-attachment class='govuk-!-display-none-print govuk-!-margin-bottom-6 govuk-!-margin-top-' + .gem-c-attachment__thumbnail + + a.govuk-link target='_self' tabindex='-1' aria-hidden='true' href=pdf_url + img.gem-c-attachment__thumbnail-image.gem-c-attachment__thumbnail-image--custom alt='' src=thumb_url + + .gem-c-attachment__details + h2.gem-c-attachment__title + span.govuk-caption-m + | PDF download + + a.govuk-link.gem-c-attachment__link target='_self' href=pdf_url + = file_title + + p.gem-c-attachment__metadata + span.gem-c-attachment__attribute + abbr.gem-c-attachment__abbr title='Portable Document Format' + | PDF + + = ', ' + span.gem-c-attachment__attribute + = file_size + + = ', ' + span.gem-c-attachment__attribute + | 1 page diff --git a/config/application.rb b/config/application.rb index 12cf20fd..1f24ecf8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,18 +1,13 @@ require_relative 'boot' require 'rails' -# Pick the frameworks you want: require 'active_model/railtie' require 'active_job/railtie' require 'active_record/railtie' -# require "active_storage/engine" require 'action_controller/railtie' require 'action_mailer/railtie' -# require "action_mailbox/engine" -# require "action_text/engine" require 'action_view/railtie' require 'action_cable/engine' -# require "rails/test_unit/railtie" require 'govuk/components' require_relative '../lib/rack/reject_trace' diff --git a/config/initializers/markdown.rb b/config/initializers/markdown.rb index 8a4104f1..4b09ffe0 100644 --- a/config/initializers/markdown.rb +++ b/config/initializers/markdown.rb @@ -3,7 +3,30 @@ class CustomPreprocessor < GovukMarkdown::Preprocessor # @return [CustomPreprocessor] def apply_all - inject_inset_text.inject_details.two_thirds.image_card.button.external.quote.blockquote.video + inject_inset_text.inject_details.download.two_thirds.image_card.button.external.quote.blockquote.video + end + + # @example + # {download} + # A healthy balanced diet for children + # 605 KB + # //assets.ctfassets.net/xxx.pdf + # //images.ctfassets.net/xxx.png + # {/download} + # + # @return [CustomPreprocessor] + def download + pattern = build_regexp('download') + @output = output.gsub(pattern) do + file_title, file_size, pdf_url, thumb_url = *Regexp.last_match(1).strip.split("\n") + + download_template.render(nil, + file_title: file_title, + file_size: file_size, + pdf_url: pdf_url, + thumb_url: thumb_url) + end + self end # @example @@ -145,6 +168,11 @@ def hyperlink(content) [Regexp.last_match(1), Regexp.last_match(2)] end + # @return [Slim::Template] + def download_template + @download_template ||= Slim::Template.new('app/views/markup/_downloadable_media.html.slim') + end + # @return [Slim::Template] def image_card_template @image_card_template ||= Slim::Template.new('app/views/markup/_image_card.html.slim') From fa769f07807c86ef6180e051c8aef6cacc2eae67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:41:48 +0100 Subject: [PATCH 06/10] Bump azure/login from 1 to 2 (#732) Bumps [azure/login](https://github.com/azure/login) from 1 to 2. - [Release notes](https://github.com/azure/login/releases) - [Commits](https://github.com/azure/login/compare/v1...v2) --- updated-dependencies: - dependency-name: azure/login dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/azure-deploy-dev.yml | 2 +- .github/workflows/azure-deploy-prod.yml | 2 +- .github/workflows/azure-deploy-stage.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-deploy-dev.yml b/.github/workflows/azure-deploy-dev.yml index 1bc7dded..4eb98c88 100644 --- a/.github/workflows/azure-deploy-dev.yml +++ b/.github/workflows/azure-deploy-dev.yml @@ -72,7 +72,7 @@ jobs: # Login to Azure using OIDC - name: Login to Azure CLI - uses: azure/login@v1 + uses: azure/login@v2 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} diff --git a/.github/workflows/azure-deploy-prod.yml b/.github/workflows/azure-deploy-prod.yml index 86b4f056..8734959b 100644 --- a/.github/workflows/azure-deploy-prod.yml +++ b/.github/workflows/azure-deploy-prod.yml @@ -82,7 +82,7 @@ jobs: # Login to Azure using OIDC - name: Login to Azure CLI - uses: azure/login@v1 + uses: azure/login@v2 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} diff --git a/.github/workflows/azure-deploy-stage.yml b/.github/workflows/azure-deploy-stage.yml index 41dfd9eb..789ae7b0 100644 --- a/.github/workflows/azure-deploy-stage.yml +++ b/.github/workflows/azure-deploy-stage.yml @@ -82,7 +82,7 @@ jobs: # Login to Azure using OIDC - name: Login to Azure CLI - uses: azure/login@v1 + uses: azure/login@v2 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} From fd67858b6ced1314311fe4a06a6aad86e2ae0fa7 Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Tue, 9 Apr 2024 11:09:02 +0100 Subject: [PATCH 07/10] Update styling for content footer --- app/assets/stylesheets/hfeyp-v2.scss | 8 +++++--- app/views/pages/default.html.slim | 2 ++ app/views/pages/side_nav.slim | 2 ++ app/views/shared/_content_footer.html.slim | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/hfeyp-v2.scss b/app/assets/stylesheets/hfeyp-v2.scss index e8f6cac6..0f084a20 100644 --- a/app/assets/stylesheets/hfeyp-v2.scss +++ b/app/assets/stylesheets/hfeyp-v2.scss @@ -35,8 +35,8 @@ a:hover .hf-card-container .hf-card-details h3 { } .hf-ctas { - padding-top: govuk-spacing(9); - padding-bottom: govuk-spacing(4); + padding-top: govuk-spacing(7); + padding-bottom: govuk-spacing(7); } .hf-second-color { @@ -73,8 +73,10 @@ a:hover .hf-card-container .hf-card-details h3 { } .cta-banner-img { - width: 40%; + width: 35%; display: flex; + padding-left: 0; + padding-right: 0; } .chevron-card-list { diff --git a/app/views/pages/default.html.slim b/app/views/pages/default.html.slim index 63d2018e..284bbe82 100644 --- a/app/views/pages/default.html.slim +++ b/app/views/pages/default.html.slim @@ -30,6 +30,8 @@ dt.gem-c-metadata__term Updated: dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{"event_name":"navigation","type":"content history","section":"Top","action":"opened"}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)} +hr.govuk-section-break.govuk-section-break--visible.govuk-section-break--l class='govuk-!-margin-top-7 govuk-!-margin-bottom-0' + = render 'shared/ctas' = render 'shared/content_footer' diff --git a/app/views/pages/side_nav.slim b/app/views/pages/side_nav.slim index e8253558..d03e9acd 100644 --- a/app/views/pages/side_nav.slim +++ b/app/views/pages/side_nav.slim @@ -31,6 +31,8 @@ = m(page.body) +hr.govuk-section-break.govuk-section-break--visible.govuk-section-break--l class='govuk-!-margin-top-7 govuk-!-margin-bottom-0' + = render 'shared/ctas' = render 'shared/content_footer' diff --git a/app/views/shared/_content_footer.html.slim b/app/views/shared/_content_footer.html.slim index e3a2ed7c..e519e4c0 100644 --- a/app/views/shared/_content_footer.html.slim +++ b/app/views/shared/_content_footer.html.slim @@ -2,7 +2,7 @@ section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" div class="govuk-grid-row" div class="govuk-grid-column-full" div class="cta-banner" - div class="cta-banner-text" + .govuk-grid-column-two-thirds.div class="cta-banner-text" span class="govuk-caption-m" Other early years resources from the Department for Education h2 class="govuk-heading-l" = content_footer.title @@ -10,6 +10,6 @@ section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" = content_footer.body p = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: "govuk-!-font-weight-bold" - div class="cta-banner-img" + .govuk-grid-column-one-third.div class="cta-banner-img" img = image_tag content_footer.image.url, class: "full-width-image", alt: content_footer.image.description, title: content_footer.image.title From 8f94cd9442f8481bbb18e96b7f7a2a940ed643bb Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:40:22 +0100 Subject: [PATCH 08/10] Update styling --- app/assets/stylesheets/hfeyp-v2.scss | 8 +++----- app/views/pages/default.html.slim | 3 ++- app/views/pages/side_nav.slim | 3 ++- app/views/shared/_content_footer.html.slim | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/hfeyp-v2.scss b/app/assets/stylesheets/hfeyp-v2.scss index 0f084a20..e8f6cac6 100644 --- a/app/assets/stylesheets/hfeyp-v2.scss +++ b/app/assets/stylesheets/hfeyp-v2.scss @@ -35,8 +35,8 @@ a:hover .hf-card-container .hf-card-details h3 { } .hf-ctas { - padding-top: govuk-spacing(7); - padding-bottom: govuk-spacing(7); + padding-top: govuk-spacing(9); + padding-bottom: govuk-spacing(4); } .hf-second-color { @@ -73,10 +73,8 @@ a:hover .hf-card-container .hf-card-details h3 { } .cta-banner-img { - width: 35%; + width: 40%; display: flex; - padding-left: 0; - padding-right: 0; } .chevron-card-list { diff --git a/app/views/pages/default.html.slim b/app/views/pages/default.html.slim index 284bbe82..c54c13dd 100644 --- a/app/views/pages/default.html.slim +++ b/app/views/pages/default.html.slim @@ -30,7 +30,8 @@ dt.gem-c-metadata__term Updated: dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{"event_name":"navigation","type":"content history","section":"Top","action":"opened"}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)} -hr.govuk-section-break.govuk-section-break--visible.govuk-section-break--l class='govuk-!-margin-top-7 govuk-!-margin-bottom-0' +div class='govuk-grid-column-full' + hr class='govuk-section-break govuk-section-break--xl govuk-section-break--visible' = render 'shared/ctas' diff --git a/app/views/pages/side_nav.slim b/app/views/pages/side_nav.slim index d03e9acd..855bd6f8 100644 --- a/app/views/pages/side_nav.slim +++ b/app/views/pages/side_nav.slim @@ -31,7 +31,8 @@ = m(page.body) -hr.govuk-section-break.govuk-section-break--visible.govuk-section-break--l class='govuk-!-margin-top-7 govuk-!-margin-bottom-0' +div class='govuk-grid-column-full' + hr class='govuk-section-break govuk-section-break--xl govuk-section-break--visible' = render 'shared/ctas' diff --git a/app/views/shared/_content_footer.html.slim b/app/views/shared/_content_footer.html.slim index e519e4c0..62a136e5 100644 --- a/app/views/shared/_content_footer.html.slim +++ b/app/views/shared/_content_footer.html.slim @@ -2,7 +2,7 @@ section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" div class="govuk-grid-row" div class="govuk-grid-column-full" div class="cta-banner" - .govuk-grid-column-two-thirds.div class="cta-banner-text" + .div class="cta-banner-text" span class="govuk-caption-m" Other early years resources from the Department for Education h2 class="govuk-heading-l" = content_footer.title @@ -10,6 +10,6 @@ section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" = content_footer.body p = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: "govuk-!-font-weight-bold" - .govuk-grid-column-one-third.div class="cta-banner-img" + .div class="cta-banner-img" img = image_tag content_footer.image.url, class: "full-width-image", alt: content_footer.image.description, title: content_footer.image.title From 87d364fb92eb755d8180dceac6066b2c9023a041 Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:40:36 +0100 Subject: [PATCH 09/10] Update content footer based on PR comments --- app/views/shared/_content_footer.html.slim | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/views/shared/_content_footer.html.slim b/app/views/shared/_content_footer.html.slim index 62a136e5..d1872c99 100644 --- a/app/views/shared/_content_footer.html.slim +++ b/app/views/shared/_content_footer.html.slim @@ -1,15 +1,14 @@ -section class=".govuk-!-margin-top-7 govuk-!-margin-bottom-7" - div class="govuk-grid-row" - div class="govuk-grid-column-full" - div class="cta-banner" - .div class="cta-banner-text" - span class="govuk-caption-m" Other early years resources from the Department for Education - h2 class="govuk-heading-l" +section class='govuk-!-margin-top-7 govuk-!-margin-bottom-7' + .govuk-grid-row + .govuk-grid-column-full + .cta-banner + .cta-banner-text + span.govuk-caption-m Other early years resources from the Department for Education + h2.govuk-heading-l = content_footer.title p = content_footer.body p - = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: "govuk-!-font-weight-bold" - .div class="cta-banner-img" - img - = image_tag content_footer.image.url, class: "full-width-image", alt: content_footer.image.description, title: content_footer.image.title + = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: 'govuk-!-font-weight-bold' + .cta-banner-img + = image_tag content_footer.image.url, class: 'full-width-image', alt: content_footer.image.description, title: content_footer.image.title From f713e2261c0a45942919d377b89977d77a43bbba Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:44:54 +0100 Subject: [PATCH 10/10] Update content footer and hr logic --- app/views/pages/default.html.slim | 6 +++--- app/views/pages/side_nav.slim | 4 ++-- app/views/shared/_content_footer.html.slim | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/views/pages/default.html.slim b/app/views/pages/default.html.slim index c54c13dd..6ff8f0ad 100644 --- a/app/views/pages/default.html.slim +++ b/app/views/pages/default.html.slim @@ -26,12 +26,12 @@ dd.gem-c-metadata__definition a.govuk-link href="https://www.gov.uk/government/organisations/department-for-education" Department for Education dt.gem-c-metadata__term Published: - dd.gem-c-metadata__definition #{page.created_at.to_s(:long)} + dd.gem-c-metadata__definition = page.created_at.to_s(:long) dt.gem-c-metadata__term Updated: dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{"event_name":"navigation","type":"content history","section":"Top","action":"opened"}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)} -div class='govuk-grid-column-full' - hr class='govuk-section-break govuk-section-break--xl govuk-section-break--visible' +.govuk-grid-column-full + hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible = render 'shared/ctas' diff --git a/app/views/pages/side_nav.slim b/app/views/pages/side_nav.slim index 855bd6f8..f934de8e 100644 --- a/app/views/pages/side_nav.slim +++ b/app/views/pages/side_nav.slim @@ -31,8 +31,8 @@ = m(page.body) -div class='govuk-grid-column-full' - hr class='govuk-section-break govuk-section-break--xl govuk-section-break--visible' +.govuk-grid-column-full + hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible = render 'shared/ctas' diff --git a/app/views/shared/_content_footer.html.slim b/app/views/shared/_content_footer.html.slim index d1872c99..d21ef810 100644 --- a/app/views/shared/_content_footer.html.slim +++ b/app/views/shared/_content_footer.html.slim @@ -6,8 +6,7 @@ section class='govuk-!-margin-top-7 govuk-!-margin-bottom-7' span.govuk-caption-m Other early years resources from the Department for Education h2.govuk-heading-l = content_footer.title - p - = content_footer.body + = m(content_footer.body) p = govuk_link_to content_footer.link_to_text, content_footer.link_to, class: 'govuk-!-font-weight-bold' .cta-banner-img