From: Dan Karran Date: Sun, 3 Apr 2011 13:50:39 +0000 (+0100) Subject: Add a smaller version of the site logo and title for small screens X-Git-Tag: live~6234^2~72 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d62da73ad704c5689668d6ad0b67aa76977c1775 Add a smaller version of the site logo and title for small screens --- diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index d04a2877f..95289376e 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -2,6 +2,10 @@ <%= render :partial => "layouts/head" %> +
+ <%= link_to(image_tag("osm_logo.png", :size => "16x16", :border => 0, :alt => t('layouts.logo.alt_text')), :controller => 'site', :action => 'index') %> +

<%= t 'layouts.project_name.h1' %>

+
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %> diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 5490b1a9b..1464c9807 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -67,6 +67,12 @@ hr { margin: 0px; } +/* Rules for the site name */ + +#small-title { + display: none; +} + /* Rules for the introductory text displayed in the left sidebar to new users */ #intro { diff --git a/public/stylesheets/small.css b/public/stylesheets/small.css index b11aebf69..59a38bba4 100644 --- a/public/stylesheets/small.css +++ b/public/stylesheets/small.css @@ -38,6 +38,28 @@ h1 { margin-right: 1px; } +/* Rules for the site name - shown when left sidebar is hidden */ + +#small-title { + font-size: 12px; + line-height: 14px; + display: block; + position: absolute; + top: 0; + margin: 3px; +} + +#small-title img { + position: absolute; +} + +#small-title h1 { + position: absolute; + left: 18px; + font-size: 12px; + margin: 2px; +} + /* Rules for greeting bar in the top right corner */ #greeting {