Skip to content

Commit

Permalink
Add emergency banner support in layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
KludgeKML committed Feb 4, 2025
1 parent 8e4ec26 commit de8e0f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/layouts/account.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<%= render "govuk_publishing_components/components/layout_for_public", {
title: yield(:title),
blue_bar: false,
emergency_banner: render("govuk_web_banners/emergency_banner"),
omit_feedback_form: true,
omit_footer_border: true,
omit_global_banner: true,
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<%= render "govuk_publishing_components/components/layout_for_public", {
title: yield(:title),
show_explore_header: true,
emergency_banner: render("govuk_web_banners/emergency_banner"),
} do %>
<%= yield :body %>
<%= javascript_include_tag 'application', type: "module" %>
Expand Down
4 changes: 4 additions & 0 deletions config/initializers/govuk_web_banners.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Rails.application.config.emergency_banner_redis_client = Redis.new(
url: ENV["EMERGENCY_BANNER_REDIS_URL"],
reconnect_attempts: [15, 30, 45, 60],
)

0 comments on commit de8e0f4

Please sign in to comment.