From acdb67a270d7181219a0c8cc37764e9afa5e950e Mon Sep 17 00:00:00 2001 From: George Schena Date: Wed, 6 Nov 2024 08:33:56 +0000 Subject: [PATCH] Add publisher_metadata partial and scss Commit audit trail: - https://github.com/alphagov/government-frontend/blob/0aee348d51cebacd5344115f2ca02bdb17095249/app/views/shared/_publisher_metadata_with_logo.html.erb - https://github.com/alphagov/government-frontend/blob/0aee348d51cebacd5344115f2ca02bdb17095249/app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss As we dont need the logo part of the partial for case studies, I have removed it and renamed the partial --- .../_publisher-metadata-with-logo.scss | 24 +++++++++++++++++++ app/views/shared/_publisher_metadata.html.erb | 16 +++++++++++++ config/initializers/dartsass.rb | 1 + 3 files changed, 41 insertions(+) create mode 100644 app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss create mode 100644 app/views/shared/_publisher_metadata.html.erb diff --git a/app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss b/app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss new file mode 100644 index 0000000000..046a79efa6 --- /dev/null +++ b/app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss @@ -0,0 +1,24 @@ +@import "govuk_publishing_components/individual_component_support"; + +.metadata-logo-wrapper { + border-top: 1px solid $govuk-border-colour; + margin-left: govuk-spacing(3); + margin-right: govuk-spacing(3); + @include govuk-clearfix; + + .metadata-column { + padding-left: 0; + padding-top: govuk-spacing(3); + } + + .metadata-logo { + max-height: 90px; + max-width: 100%; + padding-bottom: govuk-spacing(3); + padding-top: govuk-spacing(3); + + @include govuk-media-query($from: tablet) { + float: right; + } + } +} diff --git a/app/views/shared/_publisher_metadata.html.erb b/app/views/shared/_publisher_metadata.html.erb new file mode 100644 index 0000000000..061244c9b0 --- /dev/null +++ b/app/views/shared/_publisher_metadata.html.erb @@ -0,0 +1,16 @@ +<% + add_stylesheet_path("helpers/_publisher-metadata-with-logo.css") +%> + +
+ +
diff --git a/config/initializers/dartsass.rb b/config/initializers/dartsass.rb index 12d77df4de..0d98a0da05 100644 --- a/config/initializers/dartsass.rb +++ b/config/initializers/dartsass.rb @@ -28,6 +28,7 @@ "views/_landing_page/quote.scss" => "views/_landing_page/quote.css", "views/_landing_page/side-navigation.scss" => "views/_landing_page/side-navigation.css", "views/_landing_page/themes/prime-ministers-office-10-downing-street.scss" => "views/_landing_page/themes/prime-ministers-office-10-downing-street.css", + "helpers/_publisher-metadata-with-logo.scss" => "helpers/_publisher-metadata-with-logo.css", }.freeze all_stylesheets = APP_STYLESHEETS.merge(GovukPublishingComponents::Config.all_stylesheets)