README.md in fontawesome5-rails-5.0.8.0 vs README.md in fontawesome5-rails-5.0.8.1

- old
+ new

@@ -3,10 +3,12 @@ Font Awesome 5 was completely rewritten and released offically. In this version, Pro icons, light type, are prepared separately. This gem was built with Font Awesome 5 Free version to use easily as asset pipeline in Rails. +[![Gem Version](https://badge.fury.io/rb/fontawesome5-rails.svg)](https://badge.fury.io/rb/fontawesome5-rails) + ## Installation Add this line to your application's Gemfile: ```ruby @@ -21,11 +23,11 @@ $ gem install fontawesome5-rails ## Usage -In Font Awesome 5 Free version, there are 3 types of font: +In Font Awesome 5 Free version, there are 3 icon styles: - Regular : `<i class="far fa-address-book"></i>` - Solid : `<i class="fas fa-address-book"></i>` - Brands : `<i class="fab fa-apple"></i>` @@ -41,27 +43,56 @@ ยทยทยท ``` And, out of box, you can use some useful helper methods as follows: - - far_icon(shape, options = { text: '', size: '1x' }) + - fa_icon(shape, options = {}) or far_icon(shape, options = {}) ```erb + <%= fa_icon 'address-book' %> + <%= fa_icon 'address-book', text: 'Address Book' %> + <%= fa_icon 'address-book', text: 'Address Bookconfirm', size: '2x' %> <%= far_icon 'address-book' %> <%= far_icon 'address-book', text: 'Address Book' %> <%= far_icon 'address-book', text: 'Address Bookconfirm', size: '2x' %> ``` - - fas_icon(shape, options = { text: '', size: '1x' }) + - fas_icon(shape, options = {}) ```erb <%= fas_icon 'address-book' %> <%= fas_icon 'address-book', text: 'Address Book' %> <%= fas_icon 'address-book', text: 'Address Book', size: '2x' %> ``` - - fab_icon(shape, options = { text: '', size: '1x' }) + - fab_icon(shape, options = {}) ```erb <%= fab_icon 'apple' %> <%= fab_icon 'apple', text: 'Apple' %> <%= fab_icon 'apple', text: 'Apple', size: '2x' %> ``` + - fa_icon_text(shape, text = '', options = {}) or far_icon_text(shape, text = '', options = {}) + ```erb + <%= fa_icon_text 'address-book', 'Address Book' %> + <%= fa_icon_text 'address-book', 'Address Bookconfirm', size: '2x' %> + <%= far_icon_text 'address-book', 'Address Book' %> + <%= far_icon_text 'address-book', 'Address Bookconfirm', size: '2x' %> + ``` + - fas_icon_text(shape, text = '', options = {}) + ```erb + <%= fas_icon 'address-book', 'Address Book' %> + <%= fas_icon 'address-book', 'Address Book', size: '2x' %> + ``` + - fab_icon_text(shape, text = '', options = {}) + ```erb + <%= fab_icon 'apple', 'Apple' %> + <%= fab_icon 'apple', 'Apple', size: '2x' %> + ``` + +## Changelog + + - v5.0.8.1 + - added generic fa_icon() helper with 'regular' icon style by defult. + - added generic fa_icon_text() helper with `text` argument which is extracted from `opt` hash argument. + + - v5.0.8.0 + - released the first version on March 10, 2018. ## Development After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.