Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed hardcoded references to formatting and theme and home CSS fil…

…es and moved formatting and theme to asset pipeline and home to home.html.erb using content_for.

Fixes #1456
  • Loading branch information...
commit 6017ce40706e5fa3f6fc757ee125fd0b9e9dcf5a 1 parent 152f94c
@parndt parndt authored
View
3  core/app/views/refinery/_head.html.erb
@@ -8,8 +8,7 @@
<%= csrf_meta_tags if Refinery::Core.authenticity_token_on_frontend -%>
<%= yield :meta %>
- <%= stylesheet_link_tag "application", "formatting", "theme" %>
- <%= stylesheet_link_tag "home" if home_page? %>
+ <%= stylesheet_link_tag "application" %>
<%= yield :stylesheets %>
<%= render '/refinery/google_analytics' %>
View
11 core/lib/generators/refinery/cms/cms_generator.rb
@@ -28,6 +28,8 @@ def generate
append_gitignore!
+ append_asset_pipeline!
+
forced_overwriting?
copy_files!
@@ -47,6 +49,15 @@ def generate
protected
+ def append_asset_pipeline!
+ application_css = 'app/assets/stylesheets/application.css'
+ if destination_path.join(application_css).file?
+ insert_into_file application_css, %q{*= require formatting
+ *= require theme
+ }, :before => "*= require_self"
+ end
+ end
+
def append_gemfile!
gsub_file 'Gemfile', %q{gem 'sqlite3'}, %q{group :development, :test do
gem 'sqlite3'
View
1  pages/app/views/refinery/pages/home.html.erb
@@ -1 +1,2 @@
+<% content_for :stylesheets, stylesheet_link_tag('home') %>
@simi Collaborator
simi added a note

This is killing me. You can style your home by some id or class. We need to get rid of all content_for :assets.

@parndt Owner
parndt added a note

@simi I know, but this is the first step. You're welcome to patch it the rest of the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
<%= render '/refinery/content_page' %>
@simi

This is killing me. You can style your home by some id or class. We need to get rid of all content_for :assets.

@parndt

@simi I know, but this is the first step. You're welcome to patch it the rest of the way!

Please sign in to comment.
Something went wrong with that request. Please try again.