From: Tom Hughes Date: Tue, 16 Jun 2015 09:18:01 +0000 (+0100) Subject: Add advert for donation drive X-Git-Tag: live~4627 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/876d5614da5ddd30097bb39bf7191ece4448cc7f Add advert for donation drive --- diff --git a/app/assets/images/donate-sprite@2x.png b/app/assets/images/donate-sprite@2x.png new file mode 100644 index 000000000..20ef9119a Binary files /dev/null and b/app/assets/images/donate-sprite@2x.png differ diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 085b615c7..5e437c6ec 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -165,6 +165,15 @@ $(document).ready(function () { $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" }); }); + if ($.cookie('_osm_donate2015') === 'hide') { + $('#donate').hide(); + } + + $('#donate .close').on('click', function() { + $('#donate').hide(); + $.cookie("_osm_donate2015", 'hide', { expires: expiry }); + }); + if ($.cookie('_osm_welcome') === 'hide') { $('.welcome').hide(); } diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index df2f40774..c5d0254b5 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -2670,6 +2670,42 @@ input.richtext_title[type="text"] { } } +#sidebar #donate { + background-color: rgb(89, 89, 89); + padding: 10px 5px; + min-height: 120px; + + .sprite { + background: transparent image-url('donate-sprite@2x.png') no-repeat scroll 0 0 / 120px 100px; + } + + .sprite.logo { + float: left; + background-position: 0 0; + height: 100px; + width: 100px; + } + + h2 { + margin-left: 100px; + padding: 7px 10px 6px 10px; + } + + p { + margin-left: 100px; + padding: 2px 10px 3px 10px; + } + + a { + color: $offwhite; + } + + :hover { + text-decoration: none; + color: #b7b7bf; + } +} + @import 'browse'; @media only screen and (max-width:960px) { diff --git a/app/views/layouts/map.html.erb b/app/views/layouts/map.html.erb index cb2fd0e07..6ae087b06 100644 --- a/app/views/layouts/map.html.erb +++ b/app/views/layouts/map.html.erb @@ -30,6 +30,22 @@

<%= t 'layouts.osm_read_only' %>

<% end %> + +
<%= render :partial => "layouts/flash" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 531c70f46..a19a75763 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -953,6 +953,10 @@ en: text: Make a Donation learn_more: "Learn More" more: More + donate_header: Support OpenStreetMap + donate_line_1: Bigger Servers for a + donate_line_2: Growing OpenStreetMap + donate_line_3: Hardware Funding Drive 2015 license_page: foreign: title: About this translation