]> git.openstreetmap.org Git - rails.git/commitdiff
Match the other sidebar better
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 9 Jul 2013 18:33:32 +0000 (11:33 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 18 Jul 2013 17:45:17 +0000 (10:45 -0700)
app/assets/javascripts/leaflet.key.js
app/assets/javascripts/leaflet.layers.js
app/assets/javascripts/leaflet.share.js
app/assets/stylesheets/common.css.scss
app/views/site/_sidebar.html.erb
config/locales/en.yml

index 5aae3d1c25c1efe53b03793ed78abc8a3d561cab..d12187bc2f80581ba5f42d9120c3f0abee31bcf3 100644 (file)
@@ -14,19 +14,20 @@ L.OSM.key = function (options) {
       .appendTo($container);
 
     var $ui = $('<div>')
-      .attr('class', 'layers-ui');
+      .attr('class', 'key-ui');
 
-    $('<section>')
+    $('<header>')
+      .attr('class', 'sidebar_heading')
       .appendTo($ui)
       .append(
-          $('<a>')
-            .html('&raquo;')
-            .attr('class', 'close-button')
-            .attr('href', '#')
-            .bind('click', toggle))
+        $('<a>')
+          .text(I18n.t('javascripts.close'))
+          .attr('class', 'sidebar_close')
+          .attr('href', '#')
+          .bind('click', toggle))
       .append(
-      $('<h2>')
-        .text(I18n.t('javascripts.key.title')));
+        $('<h4>')
+          .text(I18n.t('javascripts.key.title')));
 
     var $section = $('<section>')
       .appendTo($ui);
index 2f06ab9c577aa7105f3ff51408c183476d51f5c0..8bcbb701ce269497f500bc84f9b15ba066970876 100644 (file)
@@ -18,16 +18,17 @@ L.OSM.layers = function(options) {
     var $ui = $('<div>')
       .attr('class', 'layers-ui');
 
-    $('<section>')
-       .appendTo($ui)
-       .append(
-          $('<a>')
-            .html('&raquo;')
-            .attr('class', 'close-button')
-            .attr('href', '#')
-            .bind('click', toggle))
-       .append(
-        $('<h2>')
+    $('<header>')
+      .attr('class', 'sidebar_heading')
+      .appendTo($ui)
+      .append(
+        $('<a>')
+          .text(I18n.t('javascripts.close'))
+          .attr('class', 'sidebar_close')
+          .attr('href', '#')
+          .bind('click', toggle))
+      .append(
+        $('<h4>')
           .text(I18n.t('javascripts.map.layers.header')));
 
     var baseSection = $('<section>')
index 664aebaa5fb19ad47aa08e2bbc7f11f864246faf..a5e93a13946973622380985f82e6c58d5ca69b91 100644 (file)
@@ -16,22 +16,23 @@ L.OSM.share = function (options) {
     var $ui = $('<div>')
       .attr('class', 'share-ui');
 
-    $('<section>')
+    $('<header>')
+      .attr('class', 'sidebar_heading')
       .appendTo($ui)
       .append(
-          $('<a>')
-            .html('&raquo;')
-            .attr('class', 'close-button')
-            .attr('href', '#')
-            .bind('click', toggle))
+        $('<a>')
+          .text(I18n.t('javascripts.close'))
+          .attr('class', 'sidebar_close')
+          .attr('href', '#')
+          .bind('click', toggle))
       .append(
-      $('<h2>')
-        .text(I18n.t('javascripts.share.title')));
+        $('<h4>')
+          .text(I18n.t('javascripts.share.title')));
 
-    var $share_link = $('<section></section>')
+    var $share_link = $('<section>')
       .appendTo($ui);
 
-    var $title = $('<h3></h3>')
+    var $title = $('<h4>')
       .text(I18n.t('javascripts.share.link'))
       .appendTo($share_link);
 
index a14dec2d77d3a53cedee2517c2749820a50bf0b3..4afc71533a42304d3a3c3f6f129f82ab7dafb5c7 100644 (file)
@@ -575,28 +575,21 @@ a.donate {
   width: 250px;
   height: 100%;
   background: white;
+  border-left: 1px solid #CCC;
   overflow: auto;
 }
 
 #map-ui {
   section {
-    border-top: 1px solid #868e85;
+    border-bottom: 1px solid #DDD;
     padding: 15px;
   }
 
-  section:first-child {
-    border-top:0;
-  }
-
-  h2 {
-    margin:0;
-  }
-
   a.close-button {
     float: right;
     padding:5px;
     font-size:20px;
-    line-height:15px;
+    line-height:10px;
     color:#222;
     border:1px solid #ddd;
   }
@@ -704,16 +697,6 @@ a.donate {
   left: 0px;
   border-right: 1px solid $keyline;
   width: 33.3333%;
-  .sidebar_heading {
-    position: relative;
-    padding: $lineheight/2 $lineheight;
-    z-index: 9999;
-    background: $offwhite;
-    border-bottom: 1px solid #ccc;
-  }
-  h4 {
-    margin: 0;
-  }
   ul {
     margin-bottom: 0;
     &:last-child {
@@ -728,7 +711,18 @@ a.donate {
   }
 }
 
-#sidebar_close {
+.sidebar_heading {
+  position: relative;
+  padding: $lineheight/2 $lineheight;
+  z-index: 9999;
+  background: $offwhite;
+  border-bottom: 1px solid #ccc;
+  h4 {
+    margin: 0;
+  }
+}
+
+.sidebar_close {
   position: absolute;
   height: $lineheight;
   top: 0px;
index 60d0575127d4d3afce90b0c03278eb371640190f..db5f44356c1292d4959268d9bec54b385a995b7e 100644 (file)
@@ -1,7 +1,7 @@
 <div id="sidebar">
   <div class="sidebar_heading">
     <h4 id="sidebar_title"><% t 'site.sidebar.search_results' %></h4>
-    <div id="sidebar_close"><a class="sidebar_close" href="#"><%= t 'site.sidebar.close' %></a></div>
+    <a class="sidebar_close" href="#"><%= t 'site.sidebar.close' %></a>
   </div>
   <div id="sidebar_content">
   </div>
index ad7dc3a51edb4d1854d44050c43ce201f34d5973..3daf2504d03f0a1b8ffae7285f0c2de6b0073e00 100644 (file)
@@ -2037,6 +2037,7 @@ en:
       last_changed: "Last changed"
       ago_html: "%{when} ago"
   javascripts:
+    close: Close
     share:
       title: "Share"
       cancel: "Cancel"
@@ -2044,7 +2045,7 @@ en:
       short_url: "Short URL"
     key:
       title: "Map Key"
-      tooltip: "Key for the map"
+      tooltip: "Map Key"
     map:
       zoom:
         in: Zoom In