From: Tom Hughes Date: Thu, 4 Sep 2014 14:25:56 +0000 (+0100) Subject: Add SOTM advert X-Git-Tag: live~4352 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/15a7276a9f50821a7728b4da3af16849284f251b?ds=sidebyside Add SOTM advert --- diff --git a/app/assets/images/sotm.png b/app/assets/images/sotm.png new file mode 100644 index 000000000..3df02876d Binary files /dev/null and b/app/assets/images/sotm.png differ diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index cfee031fd..c066f8961 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -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(); } diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 9b9537f86..607055577 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -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) { diff --git a/app/views/layouts/map.html.erb b/app/views/layouts/map.html.erb index e72214cbe..471557053 100644 --- a/app/views/layouts/map.html.erb +++ b/app/views/layouts/map.html.erb @@ -30,6 +30,21 @@

<%= t 'layouts.osm_read_only' %>

<% end %> +
+ <%= image_tag "sotm.png" %> +

+ + <%= t 'layouts.sotm_header' %> +

+

+ <%= t 'layouts.sotm_line_1' %> +
+ <%= t 'layouts.sotm_line_2' %> +
+ <%= t 'layouts.sotm_line_3' %> +

+
+
<%= render :partial => "layouts/flash" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index c40db82e2..1e8cf1938 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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