Skip to content

Commit

Permalink
Merge pull request #618 from alphagov/draft-watermark
Browse files Browse the repository at this point in the history
Add a watermark to all pages when in draft.
  • Loading branch information
edds committed Jul 10, 2015
2 parents 761eca7 + bb5b820 commit 8b91416
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Binary file added app/assets/images/draft-watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/stylesheets/header-footer-only.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import "styleguide/conditionals2";

// basic styles for HTML5 and other elements
@import "helpers/draft";
@import "helpers/footer";
@import "helpers/header";
@import "helpers/report-a-problem";
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/helpers/_draft.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.draft main {
background-image: image-url("draft-watermark.png");
background-repeat: repeat-y;
background-position: 50% 0;
}
5 changes: 4 additions & 1 deletion app/views/root/_base.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<% content_for :homepage_url, Plek.new.website_root %>
<% content_for :global_header_text, ENV["GLOBAL_HEADER_TEXT"] %>
<% content_for :page_title, content_for?(:title) ? yield(:title) : "GOV.UK - The best place to find government services and information" %>

<% if ENV["DRAFT_ENVIRONMENT"] == 'true' %>
<% content_for :body_classes, "draft" %>
<% end %>

<% content_for :head do %>
<%= render :partial => 'stylesheet', :locals => { :css_file => local_assigns[:css_file] || 'static' } %>
<% end %>
Expand Down

0 comments on commit 8b91416

Please sign in to comment.