theme_park is a flexible multiple theme plugin for rails3, sinatra, and more...it's rack based
Getting started (Rails.version > 3.1)
Add it to your Gemfile.
Install it use bundler command.
You can create a initializer file.
rails generate theme_park:install
Now, let's create our first theme.
rails generate theme_park:create dark
It will create the theme dir under the theme_park root path.
Use this theme in controller.
class MyController < ApplicationController theme "dark", :only => :index end
class MyController < ApplicationController def index theme 'dark' end end
Like rails3.1 need precompile asset files in the production environment, we also need precompile theme asset files.
rake theme_park:precompile theme=dark
or precompile all themes
See theme_park initializer file for more details.
Contributing to theme_park
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright (c) 2012 Thierry Zires. See LICENSE.txt for further details.