Commit 582443e
Changed files (7)
app
assets
stylesheets
helpers
views
application
layouts
config
locales
app/assets/stylesheets/application.scss
@@ -15,21 +15,6 @@
*= require_self
*/
-//@import "**/*";
-header {
- padding: 0.5em 0;
- h1 {
- background: asset-url('logos.svg');
- height: 150px;
- background-position: 0 -676px;
- background-repeat: no-repeat;
- margin: 5px auto 0 auto;
- width: 150px;
- span {
- display: block;
- overflow: hidden;
- text-indent: 100%;
- white-space: nowrap;
- }
- }
+@import "**/*";
+.application {
}
app/assets/stylesheets/public.scss
@@ -0,0 +1,19 @@
+.public {
+ header {
+ padding: 0.5em 0;
+ h1 {
+ background: asset-url('logos.svg');
+ height: 150px;
+ background-position: 0 -676px;
+ background-repeat: no-repeat;
+ margin: 5px auto 0 auto;
+ width: 150px;
+ span {
+ display: block;
+ overflow: hidden;
+ text-indent: 100%;
+ white-space: nowrap;
+ }
+ }
+ }
+}
app/helpers/application_helper.rb
@@ -28,6 +28,10 @@ module ApplicationHelper
content_tag(:div, iframe, class: "flex-video")
end
+ def current_layout
+ controller.send(:_layout, []) || :application
+ end
+
def class_for_flash(type)
case type.to_sym
when :notice
app/views/layouts/application.html.erb
@@ -12,7 +12,7 @@
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_MAPS_API_KEY']}" %>
<%= yield(:head) %>
</head>
- <body class="<%= controller_name %> <%= action_name %>">
+ <body class="<%= current_layout %> <%= controller_name %> <%= action_name %>">
<%= render partial: "navigation" %>
<%= render partial: 'flash' %>
<%= render partial: 'loading' %>
app/views/layouts/public.html.erb
@@ -9,7 +9,7 @@
<%= stylesheet_link_tag :application %>
<%= javascript_include_tag :application %>
</head>
- <body class="<%= controller_name %> <%= action_name %>">
+ <body class="<%= current_layout %> <%= controller_name %> <%= action_name %>">
<header>
<div class="columns">
<div class="column is-4 is-offset-4">
@@ -17,7 +17,7 @@
</div>
</div>
</header>
- <%= render partial: 'layouts/flash' %>
+ <%= render partial: 'flash' %>
<%= yield %>
<script type="text/javascript" charset="utf-8">
<%= content_for :javascript %>
config/locales/en.yml
@@ -41,6 +41,7 @@ en:
social_tolerance: Social Tolerance
user:
import_address: Send-to-Stronglifters
+ app: 'Stronglifters'
application:
navigation:
home: Home