From bfb5c7d40d6e3b955ef8c29501c579efc2c29759 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Mon, 2 Dec 2024 14:14:48 +0000 Subject: [PATCH 1/5] WIP --- .../views/_landing_page/columns_layout.scss | 1 + .../views/_landing_page/govspeak.scss | 9 +++++ .../views/_landing_page/main-navigation.scss | 4 -- .../blocks/_document_list.html.erb | 22 ++++++----- .../landing_page/blocks/_featured.html.erb | 3 +- .../landing_page/blocks/_govspeak.html.erb | 15 +++++--- app/views/landing_page/blocks/_hero.html.erb | 2 +- .../landing_page/blocks/_statistics.html.erb | 38 ++++++++++--------- app/views/landing_page/show.html.erb | 2 +- config/initializers/dartsass.rb | 1 + 10 files changed, 55 insertions(+), 42 deletions(-) create mode 100644 app/assets/stylesheets/views/_landing_page/govspeak.scss diff --git a/app/assets/stylesheets/views/_landing_page/columns_layout.scss b/app/assets/stylesheets/views/_landing_page/columns_layout.scss index e38167b504..1db487fd8a 100644 --- a/app/assets/stylesheets/views/_landing_page/columns_layout.scss +++ b/app/assets/stylesheets/views/_landing_page/columns_layout.scss @@ -3,6 +3,7 @@ .app-b-columns-layout { display: grid; grid-gap: govuk-spacing(6); + margin-bottom: govuk-spacing(8); @include govuk-media-query($from: desktop) { @for $i from 2 through 3 { diff --git a/app/assets/stylesheets/views/_landing_page/govspeak.scss b/app/assets/stylesheets/views/_landing_page/govspeak.scss new file mode 100644 index 0000000000..63b08e3563 --- /dev/null +++ b/app/assets/stylesheets/views/_landing_page/govspeak.scss @@ -0,0 +1,9 @@ +@import "govuk_publishing_components/individual_component_support"; + +.govuk-block__govspeak { + margin-bottom: govuk-spacing(9); + + &:has(+ .govuk-block__govspeak) { + margin-bottom: 0; + } +} diff --git a/app/assets/stylesheets/views/_landing_page/main-navigation.scss b/app/assets/stylesheets/views/_landing_page/main-navigation.scss index e84dbe878b..95f85db218 100644 --- a/app/assets/stylesheets/views/_landing_page/main-navigation.scss +++ b/app/assets/stylesheets/views/_landing_page/main-navigation.scss @@ -1,9 +1,5 @@ @import "govuk_publishing_components/individual_component_support"; -.govuk-block__main_navigation { - margin-bottom: 0; -} - .app-b-main-nav { border-bottom: 1px solid $govuk-border-colour; @include govuk-font(19); diff --git a/app/views/landing_page/blocks/_document_list.html.erb b/app/views/landing_page/blocks/_document_list.html.erb index bc414195ac..ded47bf34d 100644 --- a/app/views/landing_page/blocks/_document_list.html.erb +++ b/app/views/landing_page/blocks/_document_list.html.erb @@ -1,15 +1,17 @@ <% heading = block.heading || "Latest Updates" %> <% if block.items.any? %> - <%= render "govuk_publishing_components/components/heading", { - text: heading, - padding: true, - border_top: 5, - margin_bottom: 3 - } %> +
+ <%= render "govuk_publishing_components/components/heading", { + text: heading, + padding: true, + border_top: 5, + margin_bottom: 3 + } %> - <%= render "govuk_publishing_components/components/document_list", { - margin_bottom: 0, - items: block.items, - } %> + <%= render "govuk_publishing_components/components/document_list", { + margin_bottom: 0, + items: block.items, + } %> +
<% end %> diff --git a/app/views/landing_page/blocks/_featured.html.erb b/app/views/landing_page/blocks/_featured.html.erb index b0f2604d7f..97a49cd4cb 100644 --- a/app/views/landing_page/blocks/_featured.html.erb +++ b/app/views/landing_page/blocks/_featured.html.erb @@ -3,8 +3,7 @@ featured_child_content_classes = "featured_child" block.image ? featured_child_content_classes << " featured__child--content-with-image" : featured_child_content_classes << " featured__child--content" %> - -