No release in over 3 years
Low commit activity in last 3 years
The best Ionicons gem made for Ruby on Rails and with helpers for better use.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.2, < 7.0
 Project Readme

font-ionicons-rails Gem Version Build Status

The font-ionicons-rails is the best gem made for ionicons and provides the ionicons web fonts and stylesheets as a Rails engine for use with the asset pipeline.

Installation

Add this to your Gemfile:

gem "font-ionicons-rails"

or

gem "font-ionicons-rails", git: 'https://github.com/ricardoemerson/font-ionicons-rails.git'

and run bundle install.

Usage

In your application.css, include the css file:

/*
 *= require ionicons
 */

Then restart your webserver if it was previously running.

Sass Support

If you prefer SCSS, add this to yourapplication.css.scss file:

@import "ionicons";

If you use the Sass indented syntax, add this to your application.css.sass file:

@import ionicons

Helpers

There are also some helpers (ion_icon) for improve use.

ion_icon "camera"
# => <i class="ion-camera"></i>

ion_icon "camera", text: "Take a photo"
# => <i class="ion-camera"></i> Take a photo

ion_icon "chevron-right", text: "Get started", right: true
# => Get started <i class="ion-chevron-right"></i>

content_tag(:li, ion_icon("checkmark-round", text: "Bulleted list item"))
# => <li><i class="ion-checkmark-round"></i> Bulleted list item</li>

License

Special Thanks

The font-ionicons-rails was inspired by font-awesome-rails made by David Bock.