From a3a2f585e5bdabfdc748ae623ae12afd1fccae47 Mon Sep 17 00:00:00 2001 From: Alex J Date: Thu, 10 Jun 2021 12:16:45 +0100 Subject: [PATCH] Fix brexit links partial alignment This partial is already rendered in a `govuk-grid-row` so adding an extra one here is causing a container misalignment. --- .../detailed_guide/_brexit_links.html.erb | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/app/views/content_items/detailed_guide/_brexit_links.html.erb b/app/views/content_items/detailed_guide/_brexit_links.html.erb index bf1082c61..9157d92a7 100644 --- a/app/views/content_items/detailed_guide/_brexit_links.html.erb +++ b/app/views/content_items/detailed_guide/_brexit_links.html.erb @@ -1,28 +1,26 @@ -
- <% @content_item.title_and_link_sections.each do |section| %> - <% if section[:title].present? %> - <%= render "govuk_publishing_components/components/heading", { - text: section[:title], - heading_level: 2, - font_size: "m", - margin_bottom: 6, +<% @content_item.title_and_link_sections.each do |section| %> + <% if section[:title].present? %> + <%= render "govuk_publishing_components/components/heading", { + text: section[:title], + heading_level: 2, + font_size: "m", + margin_bottom: 6, + } %> + <% end %> + <% if section[:links].present? %> + <% track_category = brexit_link[:track_category] %> + <% links = section[:links].map do |link| + link_to(link[:text], link[:path], class: "govuk-link", data: { + track_action: link[:path], + track_category: track_category, + track_label: section[:title] || "", + module: 'gem-track-click', + }) + end + %> + <%= render "govuk_publishing_components/components/list", { + items: links, + visible_counters: true, } %> - <% end %> - <% if section[:links].present? %> - <% track_category = brexit_link[:track_category] %> - <% links = section[:links].map do |link| - link_to(link[:text], link[:path], class: "govuk-link", data: { - track_action: link[:path], - track_category: track_category, - track_label: section[:title] || "", - module: 'gem-track-click', - }) - end - %> - <%= render "govuk_publishing_components/components/list", { - items: links, - visible_counters: true, - } %> - <% end %> <% end %> -
+<% end %>