Skip to content

Commit

Permalink
Add handling of for_static parameter
Browse files Browse the repository at this point in the history
- original behaviour was to always include wrapper class unless show_account_layout or custom_layout was present (custom layout is as of yet not used). Alter behaviour so that default is not to have the wrapper, and it's only included if for_static is true.
  • Loading branch information
KludgeKML committed Sep 24, 2024
1 parent f8d8c29 commit d3204e3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<%
add_gem_component_stylesheet("layout-for-public")

for_static ||= false
emergency_banner ||= nil
full_width ||= false
blue_bar ||= local_assigns.include?(:blue_bar) ? local_assigns[:blue_bar] : !full_width
Expand Down Expand Up @@ -160,13 +161,15 @@
<% end %>
<% elsif custom_layout %>
<%= yield %>
<% else %>
<% elsif for_static %>
<div id="wrapper" class="<%= "govuk-width-container" unless full_width %>">
<%= yield :before_content %>
<main class="govuk-main-wrapper" id="content">
<%= yield %>
</main>
</div>
<% else %>
<%= yield %>
<% end %>
<% unless omit_feedback_form %>
Expand Down

0 comments on commit d3204e3

Please sign in to comment.