From: John Firebaugh Date: Wed, 31 Jul 2013 18:46:32 +0000 (-0700) Subject: Use full page width when editing with iD X-Git-Tag: live~5337 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/452eabc941b9500d737956f698a88624fa86dc86 Use full page width when editing with iD --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 93179f78d..a73c8e86d 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -250,6 +250,10 @@ table { #small-title { display: none; + + img { + vertical-align: text-bottom; + } } /* Rules for the introductory text displayed in the left sidebar to new users */ @@ -444,6 +448,7 @@ a.donate { .site-index #top-bar, .site-export #top-bar { position: fixed; + top: 0; left: 0; right: 0; } @@ -1013,10 +1018,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; } text-align: left; } -.site-edit #content { - top: 30px; -} - #content.maximised { top: 0; left: 0; @@ -2147,6 +2148,30 @@ a.button { /* * Rules for the iD editor */ + +.site-edit-id { + #left, + #large-title { + display: none; + } + + #small-title { + display: inline-block; + width: 185px; + height: 30px; + font-size: 14px; + margin: 0; + background-color: #eee; + border-bottom: 1px solid #ccc; + text-align: center; + padding-top: 7px; + } + + #content { + left: 0; + } +} + .id-embed { width: 100%; height: 100%; diff --git a/app/assets/stylesheets/small.css.scss b/app/assets/stylesheets/small.css.scss index a6bf475c3..5e21ce186 100644 --- a/app/assets/stylesheets/small.css.scss +++ b/app/assets/stylesheets/small.css.scss @@ -74,29 +74,12 @@ h2, h3, h4 { /* Rules for the site name - shown when left sidebar is hidden */ #small-title { - font-size: 12px; - line-height: 14px; - height: 16px; + font-size: 10px; display: block; position: absolute; left: 5px; top: 5px; - padding: 2px; - width: 110px; - background-color: #fff; - z-index: 100; -} - -#small-title img { - position: absolute; -} - -#small-title h1 { - position: absolute; - font-size: 10px; - line-height: 18px; margin: 0; - left: 22px; } /* Rules for greeting bar in the top right corner */ diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 3b0a19cf9..b2212645c 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -59,6 +59,8 @@ class SiteController < ApplicationController return end + @extra_body_class = "site-edit-#{editor}" + if params[:node] bbox = Node.find(params[:node]).bbox.to_unscaled @lat = bbox.centre_lat diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3a0ad084b..160e25e35 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -102,4 +102,8 @@ module ApplicationHelper def friendly_date(date) content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly)) end + + def body_class + [params[:controller], "#{params[:controller]}-#{params[:action]}", @extra_body_class].compact.join(" ") + end end diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index 548dc35fb..a0e894e46 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -1,12 +1,12 @@ <%= render :partial => "layouts/head" %> - -
- <%= link_to(image_tag("osm_logo.png", :size => "16x16", :alt => t('layouts.logo.alt_text')), root_path) %> -

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

-
-
+ +

+ <%= image_tag "osm_logo.png", :size => "16x16", :alt => t('layouts.logo.alt_text') %> + <%= t 'layouts.project_name.h1' %> +

+