Add SotM ads
authorJohn Firebaugh <john.firebaugh@gmail.com>
Fri, 10 May 2013 00:29:20 +0000 (17:29 -0700)
committerTom Hughes <tom@compton.nu>
Mon, 13 May 2013 19:17:10 +0000 (20:17 +0100)
app/assets/images/sotm-birmingham-ad.png [new file with mode: 0644]
app/assets/images/sotm-us-ad.png [new file with mode: 0644]
app/assets/stylesheets/common.css.scss
app/views/layouts/site.html.erb

diff --git a/app/assets/images/sotm-birmingham-ad.png b/app/assets/images/sotm-birmingham-ad.png
new file mode 100644 (file)
index 0000000..05bb146
Binary files /dev/null and b/app/assets/images/sotm-birmingham-ad.png differ
diff --git a/app/assets/images/sotm-us-ad.png b/app/assets/images/sotm-us-ad.png
new file mode 100644 (file)
index 0000000..c1ab6f2
Binary files /dev/null and b/app/assets/images/sotm-us-ad.png differ
index 22b4a4ac0e452d85894ba007031e80b06fa5d941..86a3bb6e4c84e803dee6c7a44003c4b3929d5fd8 100644 (file)
@@ -1785,3 +1785,26 @@ a.button.submit {
   width: 100%;
   height: 100%;
 }
+
+/* Rules for rotating sidebar ads */
+.ad-container {
+  display: block;
+  height: 120px;
+  overflow: hidden;
+  position: relative;
+  border-bottom: 1px solid #cccccc;
+}
+
+.ads {
+  width: 370px;
+  position: absolute;
+  left: 0%;
+}
+
+.ad {
+  float: left;
+  height: 100px;
+  padding: 10px;
+  border: 0px;
+  background: #fff;
+}
index 813fd50fe1a3499ad31ad1b9020aaffa7e5a9c06..be19d01cc2ed83f9ba469b2d1def749174954840 100644 (file)
         </li>
         <%= yield :left_menu %>
       </ul>
+      <div class='ad-container'>
+        <div class='ads'>
+          <%= ad = [{:image => 'sotm-birmingham-ad.png',
+                     :title => 'State of the Map Birmingham',
+                     :href =>'http://stateofthemap.org/'},
+                    {:image => 'sotm-us-ad.png',
+                     :title => 'State of the Map USA',
+                     :href =>'http://stateofthemap.us/'}].sample
+
+              link_to ad[:href], :title => ad[:title] do
+                image_tag ad[:image], :class => :ad
+              end
+          %>
+        </div>
+      </div>
       <a title="<%= h(t('layouts.make_a_donation.title')) %>" href="http://donate.openstreetmap.org/" class="donate">
         <span><%= h(t('layouts.make_a_donation.text')) %></span>
       </a>