Skip to content

Commit

Permalink
Reconfigure HTML publication titles
Browse files Browse the repository at this point in the history
- adjust options on inverse header following change, setting padding and use subtext in place of hard coded para and application level styles
- replace title component with heading component
  • Loading branch information
andysellick committed Jan 24, 2025
1 parent 1503b29 commit 42ce846
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
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 42ce846

Please sign in to comment.