]> git.openstreetmap.org Git - rails.git/commitdiff
Add SOTM advert
authorTom Hughes <tom@compton.nu>
Thu, 4 Sep 2014 14:25:56 +0000 (15:25 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 4 Sep 2014 14:25:56 +0000 (15:25 +0100)
app/assets/images/sotm.png [new file with mode: 0644]
app/assets/javascripts/index.js
app/assets/stylesheets/common.css.scss
app/views/layouts/map.html.erb
config/locales/en.yml

diff --git a/app/assets/images/sotm.png b/app/assets/images/sotm.png
new file mode 100644 (file)
index 0000000..3df0287
Binary files /dev/null and b/app/assets/images/sotm.png differ
index cfee031fd47086d2c530da7a0e12bd6245a2e8cb..c066f8961f3fd2bc6388a0a2829949c68dd28e62 100644 (file)
@@ -154,6 +154,15 @@ $(document).ready(function () {
     $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
   });
 
+  if ($.cookie('_osm_sotm') == 'hide') {
+    $('#sotm').hide();
+  }
+
+  $('#sotm .close').on('click', function() {
+    $('#sotm').hide();
+    $.cookie("_osm_sotm", 'hide', { expires: expiry });
+  });
+
   if ($.cookie('_osm_welcome') == 'hide') {
     $('.welcome').hide();
   }
index 9b9537f86fe36899612015a6f87de68d80d79d22..607055577b59ae35c98b27436d4a9f071339fe23 100644 (file)
@@ -2545,6 +2545,36 @@ input.richtext_title[type="text"] {
   }
 }
 
+#sidebar #sotm {
+  padding: 10px;
+  min-height: 120px;
+
+  img {
+    float: left;
+    width: 100px;
+    height: 100px;
+  }
+
+  h2 {
+    margin-left: 100px;
+    padding: 7px 10px 6px 15px;
+  }
+
+  p {
+    margin-left: 100px;
+    padding: 6px 10px 7px 15px;
+  }
+
+  a {
+    color: $darkgrey;
+  }
+
+  :hover {
+    text-decoration: none;
+    color: darken($darkgrey, 25%);
+  }
+}
+
 @import 'browse';
 
 @media only screen and (max-width:960px) {
index e72214cbefe86fae1d9e6c816bd99766fec39c3c..4715570536f53cb3dcb6f002b30fd9635ffe70b0 100644 (file)
       <p class="error"><%= t 'layouts.osm_read_only' %></p>
     <% end %>
 
+    <div id="sotm">
+      <a href="http://www.stateofthemap.org/?l=en"><%= image_tag "sotm.png" %></a>
+      <h2>
+        <a><span class="icon close"></span></a>
+        <a href="http://www.stateofthemap.org/?l=en"><%= t 'layouts.sotm_header' %></a>
+      </h2>
+      <p><a href="http://www.stateofthemap.org/?l=en">
+        <%= t 'layouts.sotm_line_1' %>
+      <br />
+        <%= t 'layouts.sotm_line_2' %>
+      <br />
+        <%= t 'layouts.sotm_line_3' %>
+      </a></p>
+    </div>
+
     <div id="flash">
       <%= render :partial => "layouts/flash" %>
     </div>
index c40db82e2b33b8438ff3da9d9582d28452132ccd..1e8cf19385570c19f0c50a52b108bf969d89ace1 100644 (file)
@@ -925,6 +925,10 @@ en:
       text: Make a Donation
     learn_more: "Learn More"
     more: More
+    sotm_header: State of the Map 2014
+    sotm_line_1: 8th Annual Conference
+    sotm_line_2: November 7th-9th 2014
+    sotm_line_3: Buenos Aires, Argentina
   license_page:
     foreign:
       title: About this translation