From 6916dc3bf42a5185bccbef97107c7bec499fed65 Mon Sep 17 00:00:00 2001 From: Catalina Ilie Date: Wed, 4 Dec 2024 14:55:16 +0000 Subject: [PATCH] Add heading level to section title --- app/views/content_items/hmrc_manual.html.erb | 2 +- app/views/content_items/hmrc_manual_section.html.erb | 2 +- app/views/content_items/manuals/_hmrc_sections.html.erb | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/content_items/hmrc_manual.html.erb b/app/views/content_items/hmrc_manual.html.erb index d5de462e5..d7ad6016a 100644 --- a/app/views/content_items/hmrc_manual.html.erb +++ b/app/views/content_items/hmrc_manual.html.erb @@ -13,7 +13,7 @@ <% @content_item.section_groups.each do |group| %> <% next unless group["child_sections"].present? %>
- <%= render "content_items/manuals/hmrc_sections", group: group %> + <%= render "content_items/manuals/hmrc_sections", group: group, heading: 3 %>
<% end %> <% end %> diff --git a/app/views/content_items/hmrc_manual_section.html.erb b/app/views/content_items/hmrc_manual_section.html.erb index b3f82e6bd..c3063364d 100644 --- a/app/views/content_items/hmrc_manual_section.html.erb +++ b/app/views/content_items/hmrc_manual_section.html.erb @@ -21,7 +21,7 @@ <% @content_item.section_groups.each do | group | %>
- <%= render "content_items/manuals/hmrc_sections", group: group %> + <%= render "content_items/manuals/hmrc_sections", group: group, heading: 2 %>
<% end %> diff --git a/app/views/content_items/manuals/_hmrc_sections.html.erb b/app/views/content_items/manuals/_hmrc_sections.html.erb index eca5cadca..3bf24b36d 100644 --- a/app/views/content_items/manuals/_hmrc_sections.html.erb +++ b/app/views/content_items/manuals/_hmrc_sections.html.erb @@ -1,5 +1,10 @@ <% if group["title"] %> - <%= group["title"] %> + <%= render "govuk_publishing_components/components/heading", { + text: group["title"], + font_size: "m", + heading_level: heading, + margin_bottom: 4, + } %> <% end %>