]> git.openstreetmap.org Git - rails.git/commitdiff
Show the header block on slim layout pages
authorTom Hughes <tom@compton.nu>
Wed, 30 Jan 2013 18:17:04 +0000 (18:17 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 30 Jan 2013 18:17:04 +0000 (18:17 +0000)
app/assets/stylesheets/common.css.scss
app/views/layouts/slim.html.erb

index aa2e893aa3360ae92bfcde4aebb3505a24a6f767..e57db18ce4a17890287203acd78d19dfa731fa71 100644 (file)
@@ -802,12 +802,16 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
 
 #slim_content {
   margin: 10px;
-  margin-top: 90px;
+  margin-top: 95px;
   max-width: 50em;
+
+  .content-heading {
+    margin-bottom: 15px;
+  }
 }
 
 #slim_header {
-  margin: 10px;
+  margin: 30px 10px;
   position: absolute;
   top: 0px;
   margin-right: 5px;
index ba02104f4056fc113e53850942f842df9f6068aa..72cfcec317be9448ae96fb9068de83f5833bd0a3 100644 (file)
@@ -1,17 +1,23 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>" dir="<%= dir %>">
   <%= render :partial => "layouts/head" %>
   <body class="slim">
     <div id="slim_container">
       <div id="slim_container_content">
+        <div id="slim_header">
+          <h1><%= image_tag("osm_logo.png", :size => "60x60", :border => 0, :alt => t('layouts.logo.alt_text')) %><%= t 'layouts.project_name.h1' %></h1>
+        </div>
+
         <div id="slim_content">
           <%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
 
-          <%= yield %>
-        </div>
+          <% if content_for? :heading %>
+          <div class="content-heading">
+            <%= yield :heading %>
+          </div>
+          <% end %>
 
-        <div id="slim_header">
-          <h1><%= image_tag("osm_logo.png", :size => "60x60", :border => 0, :alt => t('layouts.logo.alt_text')) %><%= t 'layouts.project_name.h1' %></h1>
+          <%= yield %>
         </div>
       </div>
     </div>