This idea is from FontAwesome!
Fruit Warehouse is a set of fruit icons. This gem support Ruby projects and Ruby on Rails projects with Compass, Sprocket, etc.
Please see the appropriate guide for your environment of choice:
- Ruby on Rails.
- Compass not on Rails.
In your Gemfile include:
gem 'fruit_warehouse'
And then execute:
bundle install
Import the FruitWarehouse styles in your app/assets/stylesheets/application.css.scss
. The fruit_warehouse-sprockets
file
includes the sprockets assets helper Sass functions used for finding the proper path to the font file.
@import "fruit_warehouse-sprockets";
@import "fruit_warehouse";
In your view:
fruit('flag')
# => <i class="fa fa-flag"></i>
fruit('flag', '', class: 'strong')
# => <i class="fa fa-flag strong"></i>
fruit('flag', 'Font Awesome', id: 'my-icon', class: 'strong')
# => <i id="my-icon" class="fa fa-flag strong"></i> Font Awesome
Note: the icon helper can take a hash of options that will be passed to the content_tag helper
Install the gem
gem install fruit_warehouse
If you have an existing Compass project:
# config.rb:
require 'fruit_warehouse'
Import the FruitWarehouse styles
@import "fruit_warehouse-compass";
@import "fruit_warehouse";
- Fork it ( https://github.com/jungllle/fruit_warehouse/fork )
- 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