Skip to content

Commit

Permalink
Add publisher_metadata partial and scss
Browse files Browse the repository at this point in the history
  • Loading branch information
georges1996 committed Dec 19, 2024
1 parent 407294f commit acdb67a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions app/assets/stylesheets/helpers/_publisher-metadata-with-logo.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
16 changes: 16 additions & 0 deletions app/views/shared/_publisher_metadata.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<%
add_stylesheet_path("helpers/_publisher-metadata-with-logo.css")
%>

<div class="govuk-grid-row govuk-!-margin-top-3">
<div class="metadata-logo-wrapper">
<div class="govuk-grid-column-two-thirds metadata-column">
<%= render 'govuk_publishing_components/components/metadata', {
from: locals[:from],
first_published: locals[:first_published],
last_updated: locals[:last_updated],
see_updates_link: locals[:see_updates_link],
} %>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions config/initializers/dartsass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit acdb67a

Please sign in to comment.