]> git.openstreetmap.org Git - rails.git/commitdiff
Add advert for donation drive
authorTom Hughes <tom@compton.nu>
Tue, 16 Jun 2015 09:18:01 +0000 (10:18 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 16 Jun 2015 09:38:29 +0000 (10:38 +0100)
app/assets/images/donate-sprite@2x.png [new file with mode: 0644]
app/assets/javascripts/index.js
app/assets/stylesheets/common.scss
app/views/layouts/map.html.erb
config/locales/en.yml

diff --git a/app/assets/images/donate-sprite@2x.png b/app/assets/images/donate-sprite@2x.png
new file mode 100644 (file)
index 0000000..20ef911
Binary files /dev/null and b/app/assets/images/donate-sprite@2x.png differ
index 085b615c7244f66214f2cddee69f89400c28d3d0..5e437c6ec47a8a05a299a4b474a1812daab55503 100644 (file)
@@ -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();
   }
index df2f40774bbfa9e552639e1262092456a15a85a8..c5d0254b58789d4d94ff93c2eb936b7e81591d52 100644 (file)
@@ -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) {
index cb2fd0e07a33007e082d437710ee88b75effba5d..6ae087b06d755640ee759b69e55812c61c52fd7a 100644 (file)
       <p class="error"><%= t 'layouts.osm_read_only' %></p>
     <% end %>
 
+    <div id="donate">
+      <a href="http://donate.openstreetmap.org/server2015/"><div class="sprite logo"></div></a>
+      <h2>
+        <a><span class="icon close"></span></a>
+        <a href="http://donate.openstreetmap.org/server2015/"><%= t 'layouts.donate_header' %></a>
+      </h2>
+      <p><a href="http://donate.openstreetmap.org/server2015/">
+        <%= t 'layouts.donate_line_1' %>
+      <br />
+        <%= t 'layouts.donate_line_2' %>
+      </a></p>
+      <p><a href="http://donate.openstreetmap.org/server2015/">
+        <%= t 'layouts.donate_line_3' %>
+      </a></p>
+    </div>
+
     <div id="flash">
       <%= render :partial => "layouts/flash" %>
     </div>
index 531c70f46de0867751d9f54de45018ce7bce89b8..a19a75763a11df6653a3ddcbb1e02463d468f004 100644 (file)
@@ -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