MaterializeCSS
Use MaterializeCSS in your Rails asset pipeline.
Installation
Add this line to your application's Gemfile:
gem 'materializecss'
And then execute:
$ bundle
Or install it yourself as:
$ gem install materializecss
Usage
Require jquery.js and materialize.js in app/assets/application.js:
...
// require jquery before loading any other javascripts
//= require jquery
...
...
// require materialize after loading all the javascripts
//= require materialize
...
Example app/assets/application.js:
...
//= require jquery
//= require rails-ujs
//= require turbolinks
//= require_tree .
//= require materialize
...
Require materialize.css in app/assets/application.css:
...
*= require materialize
...
Include this line in the
portion of your HTML code<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
or import this line in your application.scss
@import "https://fonts.googleapis.com/icon?family=Material+Icons";
or install this gem for offline icons
gem 'material_icons'
see docs
Contributing
- Fork it ( https://github.com/sagarmrey/materializecss )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
License
The gem is available as open source under the terms of the MIT License.