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
This commit is contained in:
Tom Hughes 2014-02-16 16:03:00 +00:00
parent 457ba2e5e8
commit f9ae6d252f
4 changed files with 2 additions and 82 deletions

View file

@ -104,10 +104,6 @@ body {
height: 100%; height: 100%;
} }
body.slim {
background-color: #f0f0f0;
}
h1, h2, h3 { h1, h2, h3 {
font-weight: 600; font-weight: 600;
line-height: 1.2; line-height: 1.2;
@ -1279,42 +1275,6 @@ header .search_form {
z-index: 2000; 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 */ /* Rules for small maps in content areas */
.content_map { .content_map {

View file

@ -3,7 +3,7 @@ require 'oauth/controllers/provider_controller'
class OauthController < ApplicationController class OauthController < ApplicationController
include OAuth::Controllers::ProviderController include OAuth::Controllers::ProviderController
layout 'slim' layout 'site'
def login_required def login_required
authorize_web authorize_web

View file

@ -1,5 +1,5 @@
class UserController < ApplicationController 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] 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] 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 redirect_to :controller => 'user', :action => 'view', :display_name => params[:display_name] unless @this_user
end 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 def disable_terms_redirect

View file

@ -1,25 +0,0 @@
<!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 } %>
<% if content_for? :heading %>
<div class="content-heading">
<%= yield :heading %>
</div>
<% end %>
<%= yield %>
</div>
</div>
</div>
</body>
</html>