Skip to content

Commit

Permalink
Fix phase banner left/right spacing on some pages
Browse files Browse the repository at this point in the history
- below the tablet breakpoint (around 1020px) the phase banner at the top of some pages was being padded left and right, which indented it from the rest of the page
- caused by the govuk-frontend grid wrapping classes, which were unnecessary
- some wrapping divs moved instead to support the phase label, which is similar but does require additional wrapping elements
  • Loading branch information
andysellick committed Nov 22, 2023
1 parent dbf586c commit bcbc033
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@

<% content_for :body do %>
<div id="wrapper" class="<%= wrapper_class %>">
<% if @content_item.show_phase_banner? || @content_item.service_manual? %>
<% if @content_item.show_phase_banner? %>
<%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %>
<% end %>
<% if @content_item.service_manual? %>
<div class="govuk-width-container">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<% if @content_item.show_phase_banner? %>
<%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %>
<% end %>
<% if @content_item.service_manual? %>
<%= render_phase_label @content_item, content_for(:phase_message) %>
<% end %>
</div>
</div>
<%= render_phase_label @content_item, content_for(:phase_message) %>
</div>
<% end %>

Expand Down

0 comments on commit bcbc033

Please sign in to comment.