Skip to content

Instantly share code, notes, and snippets.

@JediFreeman
Created February 16, 2012 20:16
Show Gist options
  • Save JediFreeman/1847536 to your computer and use it in GitHub Desktop.
Save JediFreeman/1847536 to your computer and use it in GitHub Desktop.
my app info
==================================
My Initializer - themes.rb:
----------------------------------
ThemesForRails.config do |config|
config.themes_dir = "assets"
config.assets_dir = "app/assets/themes"
config.views_dir = "app/views/themes"
end
==================================
My routes.rb
----------------------------------
Testapp::Application.routes.draw do
#...
themes_for_rails
#...
end
==================================
My Directory Structure
----------------------------------
testapp/
app/
assets/
images/
javascripts/
stylesheets/
reset.css.sass
themes/
default/
images/
javascripts/
stylesheets/
application.css
controllers/
helpers/
models/
views/
home/
layouts/
themes/
default/
home/
layouts/
...
==================================
In /app/assets/themes/default/stylesheets/application.css:
reset.sass is stored in /app/assets/stylesheets/
----------------------------------
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require reset
*= require default/stylesheets/theme
*/
==================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment