Skip to content

Commit

Permalink
Toogles additional banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilwoar Hussain committed May 14, 2020
1 parent 03ad467 commit 36c9095
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions app/views/notifications/_global_bar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# If true, banner is always_visible & does not disappear automatically after 3 pageviews
# Regardless of value, banner is always manually dismissable by users
always_visible = true

# Toggle additional banner
show_additional_banner = true

global_bar_classes = %w(global-bar dont-print)

Expand Down Expand Up @@ -60,25 +63,27 @@
</p>
<% end %>
</div>
<div class="global-bar-additional global-bar-additional--show">
<div class="global-bar-additional__text govuk-width-container govuk-grid-row">
<%= render "govuk_publishing_components/components/govspeak", {
} do %>
<div class="global-bar-additional__text-govspeak govuk-grid-column-two-thirds govuk-!-padding-0">
<p class="govuk-!-margin-bottom-1">Coronavirus guidance is being updated.</p>
<p class="govuk-!-margin-top-0">Read <a href="/government/publications/coronavirus-outbreak-faqs-what-you-can-and-cant-do" class="govuk-link">what you can and cannot do</a></p>
</div>
<% end %>
<%= render 'notifications/covid_logos' %>
</div>
<% if show_additional_banner %>
<div class="global-bar-additional global-bar-additional--show">
<div class="global-bar-additional__text govuk-width-container govuk-grid-row">
<%= render "govuk_publishing_components/components/govspeak", {
} do %>
<div class="global-bar-additional__text-govspeak govuk-grid-column-two-thirds govuk-!-padding-0">
<p class="govuk-!-margin-bottom-1">Coronavirus guidance is being updated.</p>
<p class="govuk-!-margin-top-0">Read <a href="/government/publications/coronavirus-outbreak-faqs-what-you-can-and-cant-do" class="govuk-link">what you can and cannot do</a></p>
</div>
<% end %>
<%= render 'notifications/covid_logos' %>
</div>

<div class="govuk-width-container global-bar-dismiss-wrapper">
<a href="#hide-message"
class="<%= dismiss_classes.join(' ') %>"
role="button"
aria-controls="global-bar">Hide message</a>
<div class="govuk-width-container global-bar-dismiss-wrapper">
<a href="#hide-message"
class="<%= dismiss_classes.join(' ') %>"
role="button"
aria-controls="global-bar">Hide message</a>
</div>
</div>
</div>
<% end %>
</div>
<!--<![endif]-->
<% end %>

0 comments on commit 36c9095

Please sign in to comment.