Skip to content

Commit

Permalink
Merge pull request #4591 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 27, 2025
2 parents 6a75080 + af7e813 commit 015a516
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
8 changes: 7 additions & 1 deletion app/views/govuk_publishing_components/audit/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
%>

<% content_for :title, "Component audit" %>
<%= render 'govuk_publishing_components/components/title', title: "Components audit", margin_top: 0; %>
<%= render 'govuk_publishing_components/components/heading', {
text: "Components audit",
heading_level: 1,
font_size: "xl",
margin_bottom: 8
}
%>

<% applications = capture do %>
<%= render "applications" %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
<% end %>
<% end %>

<%= render 'govuk_publishing_components/components/title', title: @component_example.name, context: "#{@component_doc.name} example", margin_top: 0 %>
<%= render 'govuk_publishing_components/components/heading', {
text: @component_example.name,
context: "#{@component_doc.name} example",
heading_level: 1,
font_size: "xl",
margin_bottom: 8
}
%>

<% code_example = capture do %>
<%= render partial: "govuk_publishing_components/component_guide/component_doc/call", locals: { component_doc: @component_doc, example: @component_example } %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<%= render 'govuk_publishing_components/components/title', title: GovukPublishingComponents::Config.component_guide_title, margin_top: 0 %>
<%= render 'govuk_publishing_components/components/heading', {
text: GovukPublishingComponents::Config.component_guide_title,
heading_level: 1,
font_size: "xl",
margin_bottom: 8
}
%>

<div class="component-markdown">
<p>Components are packages of template, style, behaviour and documentation that live in your application.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
<% end %>
<% end %>

<%= render 'govuk_publishing_components/components/title', title: @component_doc.name, context: "Component", margin_top: 0; %>
<%= render 'govuk_publishing_components/components/heading', {
text: @component_doc.name,
context: "Component",
heading_level: 1,
font_size: "xl",
margin_bottom: 8
}
%>

<div class="component-show">
<div class="govuk-grid-row">
Expand Down

0 comments on commit 015a516

Please sign in to comment.