Skip to content

Commit

Permalink
Merge pull request #3534 from alphagov/inverse-header
Browse files Browse the repository at this point in the history
Reconfigure HTML publication titles
  • Loading branch information
andysellick authored Jan 28, 2025
2 parents 87e73a0 + 3939712 commit 2af4cdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ GEM
govuk_personalisation (1.1.0)
plek (>= 1.9.0)
rails (>= 6, < 9)
govuk_publishing_components (50.0.1)
govuk_publishing_components (51.0.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand Down
5 changes: 0 additions & 5 deletions app/assets/stylesheets/views/_html-publication.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
}
}

.publication-header__last-changed {
margin-top: govuk-spacing(3);
@include govuk-font(19);
}

.contents-list-container {
@include govuk-media-query($from: desktop) {
position: sticky;
Expand Down
21 changes: 12 additions & 9 deletions app/views/content_items/html_publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@
</div>
<% end %>

<%= render 'govuk_publishing_components/components/inverse_header', {} do %>
<%= render 'govuk_publishing_components/components/title',
title: @content_item.title,
context: I18n.t("content_item.schema_name.#{@content_item.format_sub_type}", count: 1),
inverse: true,
margin_bottom: 0,
margin_top: 3
%>
<p class="publication-header__last-changed"><%= @content_item.last_changed %></p>
<%= render 'govuk_publishing_components/components/inverse_header', {
padding_top: 6,
padding_bottom: 6,
subtext: @content_item.last_changed
} do %>
<%= render "govuk_publishing_components/components/heading", {
text: @content_item.title,
context: I18n.t("content_item.schema_name.#{@content_item.format_sub_type}", count: 1),
inverse: true,
margin_bottom: 0,
font_size: "xl",
} %>
<% end %>

<%= render 'shared/history_notice', content_item: @content_item %>
Expand Down

0 comments on commit 2af4cdc

Please sign in to comment.