Integrate ElastiCSS framework with the rails assets pipeline
ElastiCSS is a simple css framework to layout web-based interfaces, based on the printed layout techniques of 4 columns but with capabilities to unlimited column combinations. and capacity to make elastic, fixed and liquid layout easily
elasticss-rails project integrates ElastiCSS framework for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
Include ElastiCSS in Gemfile;
gem "elasticss-rails"
or you can install from latest build;
gem 'elasticss-rails', :git => '[email protected]:kurenn/elasticss-rails.git'
Install the gem using the bundle command:
bundle install
You can run the generator command
rails g elasticss:install
Or you can add them manually:
Add to your app/assets/stylesheets/application.css
*= require elastic
If you need to add the print support you can add it as well
*= require elastic.print
Add to your app/assets/javascripts/application.js
//= require elastic
Layout (generates ElastiCSS layout) - (ERB and HAML supported):
You need to first add the haml-rails to the gemfile:
gem 'haml-rails'
And last but not least if you want HAML to be your default template engine you need to change your config/application.rb file as shown:
config.generators do |generator|
generator.template_engine :haml
end
Usage:
rails g elasticss:layout [LAYOUT_NAME] [LAYOUT_TYPE]
Example:
rails g elasticss:layout application 3_columns
But wait there is more:
rails g elasticss:layout application right_sidebar
rails g elasticss:layout application left_sidebar
Abraham Kuri - [email protected]
You can +K my influence in Ruby on Rails on @klout
Copyright (c) 2011 Abraham Kuri Vargas
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl.html.