Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Remove banner promo slot from homepage #953

Merged
merged 1 commit into from May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 0 additions & 38 deletions app/assets/stylesheets/views/_homepage.scss
Expand Up @@ -69,44 +69,6 @@ body.homepage {
}
}

#homepage-promo-banner {
background: $light-blue-25;

.banner-message {
@extend %site-width-container;

p {
margin: 0;
padding: $gutter-two-thirds 0;

@include core-19;

@include media(tablet) {
padding: $gutter 0;
}

@include media(desktop) {
max-width: 66%;
}

strong {
display: block;
@include bold-24;
margin-bottom: $gutter-half;
}

a[rel~="external"] {
@include external-link-default;
@include external-link-16;

@include media(tablet) {
@include external-link-19;
}
}
}
}
}

.root-index {
// Generic objects for the homepage
.inner-block {
Expand Down
9 changes: 0 additions & 9 deletions app/views/root/index.html.erb
Expand Up @@ -42,15 +42,6 @@
</div>
</div>
</header>
<% if Time.current <= Time.zone.parse('May 26 2016 15:45:00 BST') %>
<div id="homepage-promo-banner">
<div class="banner-message">
<p><strong>EU referendum</strong> On Thursday 23 June there will be a vote on the UK’s membership of the European Union.
<a href="https://www.eureferendum.gov.uk" rel="external nofollow">More&nbsp;information<span class="visuallyhidden"> about the EU referendum</span></a></p>
</div>
</div>
<% end %>

<div id="homepage" class="homepage-content">
<div class="homepage-content-inner">

Expand Down
14 changes: 0 additions & 14 deletions test/integration/homepage_test.rb
Expand Up @@ -6,18 +6,4 @@ class HomepageTest < ActionDispatch::IntegrationTest
assert_equal 200, page.status_code
assert_equal "Welcome to GOV.UK", page.title
end

should "render an EU referendum banner before 3:45pm May 26" do
travel_to Time.zone.parse('May 26 2016 15:44:00 BST') do
visit "/"
assert page.has_selector?('#homepage-promo-banner', text: 'EU referendum')
end
end

should "not render an EU referendum banner after 3:45pm May 26" do
travel_to Time.zone.parse('May 26 2016 15:46:00 BST') do
visit "/"
refute page.has_selector?('#homepage-promo-banner')
end
end
end