]> git.openstreetmap.org Git - rails.git/commitdiff
Overlay-style minimized sidebar
authorJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 7 Nov 2013 23:27:06 +0000 (15:27 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 7 Nov 2013 23:27:40 +0000 (15:27 -0800)
app/assets/stylesheets/common.css.scss
app/views/layouts/map.html.erb
app/views/site/index.html.erb

index 21ed6930b75a42db2532897351bb951eed319d59..313c535623d9593fc33282a72d690a7b18f675fb 100644 (file)
@@ -466,7 +466,6 @@ nav.secondary {
   }
 }
 
   }
 }
 
-
 /* Utility for styling notification numbers */
 
 .count-number {
 /* Utility for styling notification numbers */
 
 .count-number {
@@ -639,6 +638,7 @@ nav.secondary {
   #sidebar {
     float: left;
     width: $sidebarWidth;
   #sidebar {
     float: left;
     width: $sidebarWidth;
+    background: #fff;
 
     h2, h3, h4 {
       padding: $lineheight $lineheight $lineheight/2;
 
     h2, h3, h4 {
       padding: $lineheight $lineheight $lineheight/2;
@@ -656,26 +656,39 @@ nav.secondary {
       cursor: pointer;
     }
 
       cursor: pointer;
     }
 
-    p.large-text {
-      font-size: 1.7em;
-      line-height: 1.4em;
-      font-weight: 300;
-    }
+    -webkit-transition: margin 300ms linear;
+       -moz-transition: margin 300ms linear;
+            transition: margin 300ms linear;
   }
 
   #sidebar.minimized {
     position: absolute;
     z-index: 1000;
     height: auto;
   }
 
   #sidebar.minimized {
     position: absolute;
     z-index: 1000;
     height: auto;
-    border-right: none;
+    border-radius: 5px;
+    overflow: hidden;
+    margin-top: $typeheight;
+    margin-left: $typeheight;
+  }
 
 
-    #sidebar_content {
-      display: none;
+  .welcome {
+    p {
+      padding: $lineheight/2 $lineheight $lineheight;
+      font-size: 110%;
+      font-weight: 300;
     }
 
     }
 
-    #search_form {
-      background: none;
-      width: 78%;
+    .button {
+      width: 50%;
+      float: left;
+      margin: 0;
+      border-radius: 0;
+      font-weight: 400;
+      padding: .6em;
+
+      &.learn-more {
+        border-right: 1px solid #fff;
+      }
     }
   }
 
     }
   }
 
@@ -875,12 +888,6 @@ nav.secondary {
 }
 
 #sidebar_content {
 }
 
 #sidebar_content {
-  position: absolute;
-  top: 50px;
-  bottom: 0;
-  width: 100%;
-  overflow-y: auto;
-
   .loader,
   .load_more {
     text-align: center;
   .loader,
   .load_more {
     text-align: center;
@@ -894,7 +901,7 @@ nav.secondary {
 
 #search_form {
   position: relative;
 
 #search_form {
   position: relative;
-  padding: $lineheight/2 $lineheight;
+  padding: $lineheight/2;
   background-color: $lightgrey;
 
   #query_wrapper {
   background-color: $lightgrey;
 
   #query_wrapper {
index 2d50b5abf6520eb85068465427ca7d384d8410ea..449e1e54879e0ca6b220fb5023f5ce5d6f31a8f8 100644 (file)
@@ -17,7 +17,7 @@
 <% end %>
 
 <% content_for :content do %>
 <% end %>
 
 <% content_for :content do %>
-  <div id="sidebar" class="<%= 'minimized' if @user %>">
+  <div id="sidebar" class="minimized">
     <%= form_tag search_path, :id => "search_form" do %>
       <%= submit_tag t('site.search.submit_text') %>
       <div id='query_wrapper'>
     <%= form_tag search_path, :id => "search_form" do %>
       <%= submit_tag t('site.search.submit_text') %>
       <div id='query_wrapper'>
       </div>
     <% end %>
 
       </div>
     <% end %>
 
-    <div id="sidebar_content">
-      <% if STATUS == :database_offline or STATUS == :api_offline %>
-        <p class="error"><%= t 'layouts.osm_offline' %></p>
-      <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
-        <p class="error"><%= t 'layouts.osm_read_only' %></p>
-      <% end %>
+    <% if STATUS == :database_offline or STATUS == :api_offline %>
+      <p class="error"><%= t 'layouts.osm_offline' %></p>
+    <% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
+      <p class="error"><%= t 'layouts.osm_read_only' %></p>
+    <% end %>
 
 
+    <div id="sidebar_content">
       <%= render :partial => "layouts/flash" %>
       <%= render :partial => "layouts/flash" %>
-
       <%= yield %>
     </div>
   </div>
       <%= yield %>
     </div>
   </div>
index 1f82a92f0d4008fcc4f006f56b68ea47c5aba9a2..5eb2a66fe1c5a318ca812be6ed2aa0e49d726f44 100644 (file)
@@ -1,16 +1,8 @@
-<h2>
-  <% if !@user %>
-    <%= t 'layouts.intro_header' %>
-  <% else %>
-    <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <% end %>
-</h2>
-
-<% if !@user %>
-  <p class="inner12 large-text"><%= t 'layouts.intro_text' %></p>
-
-  <div class="inner12">
-    <a class="button" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
-    <a class="button" href="<%= user_new_path %>"><%= t('layouts.sign_up') %></a>
+<% unless @user %>
+  <div class="welcome">
+    <h2><%= t 'layouts.intro_header' %></h2>
+    <p><%= t 'layouts.intro_text' %></p>
+    <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
+    <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.sign_up') %></a>
   </div>
 <% end %>
   </div>
 <% end %>