Skip to content

Jungllle/FruitWarehouse

Repository files navigation

FruitWarehouse

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.

Installation

Please see the appropriate guide for your environment of choice:

a. Ruby 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";

Rails Helper usage

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

b. Compass without Rails

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";

Contributing

  1. Fork it ( https://github.com/jungllle/fruit_warehouse/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Releases

No releases published

Packages

No packages published