Skip to content

Commit

Permalink
Merge pull request #2595 from alphagov/use-heading
Browse files Browse the repository at this point in the history
Replace title component with heading
  • Loading branch information
andysellick authored Jan 13, 2025
2 parents 76601f4 + 3034752 commit 5b4eccc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ $govuk-page-width: 1140px;
@import "govuk_publishing_components/components/summary-list";
@import "govuk_publishing_components/components/table";
@import "govuk_publishing_components/components/textarea";
@import "govuk_publishing_components/components/title";
@import "govuk_publishing_components/components/warning-text";

@import "views/manuals";
Expand Down
10 changes: 5 additions & 5 deletions app/views/layouts/design_system.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@

<main class="govuk-main-wrapper" id="main-content" role="main">
<% if content_for?(:heading) %>
<%= render "govuk_publishing_components/components/title", {
<%= render "govuk_publishing_components/components/heading", {
text: yield(:heading),
context: yield(:context),
title: yield(:heading),
margin_top: 0
font_size: "xl",
heading_level: 1,
margin_bottom: 8
} %>
<% end %>

<%= yield %>
</main>

</div>

<%= render "govuk_publishing_components/components/layout_footer", {
Expand All @@ -76,5 +77,4 @@
}
]
} %>

<% end %>
7 changes: 6 additions & 1 deletion app/views/whats_new/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<% page_name = "What's new" %>
<% content_for :title, page_name %>
<%= render "govuk_publishing_components/components/title", { title: page_name } %>
<%= render "govuk_publishing_components/components/heading", {
text: page_name,
font_size: "xl",
heading_level: 1,
margin_bottom: 8
} %>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down

0 comments on commit 5b4eccc

Please sign in to comment.