Skip to content

Commit

Permalink
Merge pull request #1898 from alphagov/update-banner-content
Browse files Browse the repository at this point in the history
Update global banner content to match campaign
  • Loading branch information
Vanita Barrett authored Oct 8, 2019
2 parents dfb089f + 0ecf433 commit 6670af4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
7 changes: 6 additions & 1 deletion app/assets/stylesheets/helpers/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,20 @@
.global-bar-message {
margin-bottom: 0;
margin-top: 0;
max-width: 70%;

@include media(tablet) {
max-width: 66.67%;
max-width: auto;
}

.global-bar-title {
display: block;
font-weight: 700;
margin-right: 10px;
}

.global-bar-link {
@include bold-19;
}
}
}
23 changes: 14 additions & 9 deletions app/views/notifications/_global_bar.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%
show_global_bar ||= true # Toggles the appearance of the global bar
title = "The United Kingdom is leaving the European Union on 31 October 2019."
title = false
link_href = "/brexit"
link_text = "Get ready for Brexit"
link_text = "Get ready for Brexit on 31 October 2019"
-%>
<% if show_global_bar %>
<% content_for :head do %>
Expand All @@ -14,13 +14,18 @@
<div id="global-bar" class="global-bar dont-print" data-module="global-bar">
<div class="global-bar-message-container">
<p class="global-bar-message">
<span class="global-bar-title"><%= title %></span>
<%= link_to(
link_text,
link_href,
rel: "external noreferrer",
class: "js-call-to-action"
) %>
<% if title %>
<span class="global-bar-title"><%= title %></span>
<% end %>

<% if link_href && link_text %>
<%= link_to(
link_text,
link_href,
rel: "external noreferrer",
class: "global-bar-link js-call-to-action"
) %>
<% end %>
</p>
<a href="#hide-message"
class="dismiss"
Expand Down

0 comments on commit 6670af4

Please sign in to comment.