From: Tom Hughes Date: Sun, 16 Feb 2014 16:03:00 +0000 (+0000) Subject: Drop the slim layout X-Git-Tag: live~5060 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/f9ae6d252f0126266ff557d003bfa7ea58bf5dff?hp=457ba2e5e8184ff75e15e2ad3ae02c7955e9f15b Drop the slim layout The slim layout is not really needed since the redesign as the pages it was used for in the OAuth flow now have less chrome and work fine on small screens with the normal layout. Fixes #689 --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 088d4e07a..533e91c69 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -104,10 +104,6 @@ body { height: 100%; } -body.slim { - background-color: #f0f0f0; -} - h1, h2, h3 { font-weight: 600; line-height: 1.2; @@ -1279,42 +1275,6 @@ header .search_form { z-index: 2000; } -#slim_container { - width: 100%; -} - -#slim_container_content { - max-width: 50em; - background-color: #FFFFFF; - margin: $lineheight/2 auto; - padding: 3px; - border-radius: 25px; - -moz-border-radius: 25px; - border: 1px solid #e6e6e6; -} - -#slim_content { - margin: $lineheight/2; - margin-top: 95px; - max-width: 50em; - - .content-heading { - margin-bottom: 15px; - } -} - -#slim_header { - margin: 30px $lineheight/2; - position: absolute; - top: 0px; - margin-right: $lineheight/4; - img { - vertical-align: middle; - margin-bottom: $lineheight/4; - margin-right: $lineheight/4; - } -} - /* Rules for small maps in content areas */ .content_map { diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 7ae7938c3..c7251f0a7 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -3,7 +3,7 @@ require 'oauth/controllers/provider_controller' class OauthController < ApplicationController include OAuth::Controllers::ProviderController - layout 'slim' + layout 'site' def login_required authorize_web diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 99777ca2d..dbfc44a37 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -1,5 +1,5 @@ class UserController < ApplicationController - layout :choose_layout + layout 'site', :except => [:api_details] skip_before_filter :verify_authenticity_token, :only => [:api_read, :api_details, :api_gpx_files] before_filter :disable_terms_redirect, :only => [:terms, :save, :logout, :api_details] @@ -786,21 +786,6 @@ private redirect_to :controller => 'user', :action => 'view', :display_name => params[:display_name] unless @this_user end - ## - # Choose the layout to use. See - # https://rails.lighthouseapp.com/projects/8994/tickets/5371-layout-with-onlyexcept-options-makes-other-actions-render-without-layouts - def choose_layout - oauth_url = url_for(:controller => :oauth, :action => :authorize, :only_path => true) - - if [ 'api_details' ].include? action_name - nil - elsif params[:referer] and URI.parse(params[:referer]).path == oauth_url - 'slim' - else - 'site' - end - end - ## # def disable_terms_redirect diff --git a/app/views/layouts/slim.html.erb b/app/views/layouts/slim.html.erb deleted file mode 100644 index 72cfcec31..000000000 --- a/app/views/layouts/slim.html.erb +++ /dev/null @@ -1,25 +0,0 @@ - - - <%= render :partial => "layouts/head" %> - -
-
-
-

<%= image_tag("osm_logo.png", :size => "60x60", :border => 0, :alt => t('layouts.logo.alt_text')) %><%= t 'layouts.project_name.h1' %>

-
- -
- <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> - - <% if content_for? :heading %> -
- <%= yield :heading %> -
- <% end %> - - <%= yield %> -
-
-
- -