]> git.openstreetmap.org Git - rails.git/commitdiff
narrower sidebar, transparent minimized state, cleaned up search results
authorEden Halperin <eden.halperin@gmail.com>
Tue, 5 Nov 2013 16:37:21 +0000 (11:37 -0500)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 5 Nov 2013 18:17:58 +0000 (10:17 -0800)
app/assets/stylesheets/common.css.scss
app/helpers/geocoder_helper.rb
app/views/geocoder/search.html.erb
app/views/site/index.html.erb

index 357372a9be76db4622c90e865e7b312754f1893d..bfbe971dd46abf433f2d8c7ff2ee9f22e3c30888 100644 (file)
@@ -11,8 +11,8 @@ $lightgrey: #EEE;
 $darkgrey: #AAA;
 $hovercolor: 20%;
 $headerHeight: 54px;
-$sidebarWidth: 350px;
-$keyline: 1px solid $grey;
+$sidebarWidth: 300px;
+$keyline: 1px solid $lightgrey;
 $border-radius: 3px;
 
 /* Styles common to large and small screens */
@@ -595,11 +595,13 @@ nav.secondary {
     border-right: $keyline;
 
     h2, h3, h4 {
-      padding: $lineheight;
+      padding: $lineheight $lineheight $lineheight/2;
     }
 
     h4 {
       font-weight: normal;
+      color: #666;
+      font-size: 12px;
     }
 
     .icon.close {
@@ -620,16 +622,28 @@ nav.secondary {
         color: #666;
       }
     }
+
+    p.large-text {
+      font-size: 1.7em;
+      line-height: 1.4em;
+      font-weight: 300;
+    }
   }
 
   #sidebar.minimized {
     position: absolute;
     z-index: 1000;
     height: auto;
+    border-right: none;
 
     #sidebar_content {
       display: none;
     }
+
+    #search_form {
+      background: none;
+      width: 78%;
+    }
   }
 
   #map {
@@ -805,7 +819,7 @@ nav.secondary {
 
 #sidebar_content {
   position: absolute;
-  top: 72px;
+  top: 50px;
   bottom: 0;
   width: 100%;
   overflow-y: auto;
@@ -823,9 +837,8 @@ nav.secondary {
 
 #search_form {
   position: relative;
-  padding: $lineheight;
+  padding: $lineheight/2 $lineheight;
   background-color: $lightgrey;
-  border-bottom: $keyline;
 
   #query_wrapper {
     position: relative;
@@ -925,7 +938,8 @@ a.donate {
 
 .search_results_entry {
   ul li {
-    border-bottom: 1px solid #ccc;
+    border-bottom: $keyline;
+    &:first-child { border-top: $keyline; }
   }
 
   .search_details {
index c74cba28e32c062d3e9d54dc1c11fae99f1bb8aa..33ef84b07c46ec066c04fc99cb1de0ef46e3e993 100644 (file)
@@ -18,11 +18,11 @@ module GeocoderHelper
     html << link_to(result[:name], url, html_options) if result[:name]
     html << result[:suffix] if result[:suffix]
 
-    if result[:type] and result[:id]
-      html << content_tag(:small, :class => ["deemphasize", "search_details"]) do
-        link_to(t("browse.#{result[:type]}_history.view_details"), :controller => :browse, :action => result[:type], :id => result[:id])
-      end
-    end
+    if result[:type] and result[:id]
+      html << content_tag(:small, :class => ["deemphasize", "search_details"]) do
+        link_to(t("browse.#{result[:type]}_history.view_details"), :controller => :browse, :action => result[:type], :id => result[:id])
+      end
+    end
 
     return raw(html)
   end
index 72afb548c7d6c5fe6a3e0c6f8960af6d815efff5..42a1a306e150fa42884a04688af72ccaa76ee97a 100644 (file)
@@ -1,6 +1,6 @@
 <h2><%= t('site.sidebar.search_results') %></h2>
 <% @sources.each do |source| %>
-  <h4><%= raw(t "geocoder.search.title.#{source}") %></h4>
+  <h4 class="inner12"><%= raw(t "geocoder.search.title.#{source}") %></h4>
   <div class="search_results_entry" data-href="<%= url_for params.merge(:action => "search_#{source}") %>">
     <%= image_tag "searching.gif", :class => "loader" %>
   </div>
index fa3f31c1ad1326b188115facca66af4329ddc7c9..985a735c36935b337bd5665e6bcb6fc9c5d1c6f3 100644 (file)
@@ -3,7 +3,7 @@
   <span class="icon close"></span>
 </h2>
 
-<p class="inner22"><%= t 'layouts.intro_text' %></p>
+<p class="inner12 large-text"><%= t 'layouts.intro_text' %></p>
 
 <div class='footer'>
   <a title="<%= t('layouts.make_a_donation.title') %>" href="http://donate.openstreetmap.org/" class="donate">
@@ -11,7 +11,7 @@
     <span><%= t('layouts.make_a_donation.text') %></span>
   </a>
 
-  <p class='credits inner22'>
+  <p class='credits inner12'>
     <%= t 'layouts.partners_html',
           :ucl => link_to(t('layouts.partners_ucl'), "http://www.vr.ucl.ac.uk"),
           :ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),