Skip to content

Commit

Permalink
Merge pull request #39 from tomkra/v0.7
Browse files Browse the repository at this point in the history
update to FA5.9.0, now can work simultaneously with font-awesome-rails gem
  • Loading branch information
tomkra committed Jun 9, 2019
2 parents 29d7c5d + a7340ea commit 666fb2d
Show file tree
Hide file tree
Showing 96 changed files with 634 additions and 438 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -28,7 +28,7 @@ see [#Releases](https://github.com/tomkra/font_awesome5_rails/releases) for late
- update FontAwesome version to 5.0.13
- update parser so tags like ```aria-hidden``` etc. can be used [[#16](https://github.com/tomkra/font_awesome5_rails/issues/16)]
- fix flicker problem after rendering with Turbolinks [[#17](https://github.com/tomkra/font_awesome5_rails/issues/17)]

## v 0.3.2
- update FontAwesome version to 5.0.10
- update parser to support symbol notation icon [[#12](https://github.com/tomkra/font_awesome5_rails/issues/12)]
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
font_awesome5_rails (0.6.0)
font_awesome5_rails (0.7.0)
railties (>= 4.2)

GEM
Expand Down
34 changes: 17 additions & 17 deletions README.md
@@ -1,6 +1,6 @@
# Font Awesome 5 Rails
[![Gem Version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=rb&type=6&v=0.6.0&x2=0)](https://badge.fury.io/rb/font_awesome5_rails)
[![FA5 version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=gh&type=6&v=5.8.1&x2=0)](https://github.com/tomkra/font_awesome5_rails/blob/master/lib/font_awesome5_rails/version.rb)
[![Gem Version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=rb&type=6&v=0.7.0&x2=0)](https://badge.fury.io/rb/font_awesome5_rails)
[![FA5 version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=gh&type=6&v=5.9.0&x2=0)](https://github.com/tomkra/font_awesome5_rails/blob/master/lib/font_awesome5_rails/version.rb)
[![Build Status](https://travis-ci.org/tomkra/font_awesome5_rails.svg?branch=master)](https://travis-ci.org/tomkra/font_awesome5_rails)
[![HitCount](http://hits.dwyl.io/tomkra/tomkra/font_awesome5_rails.svg)](http://hrits.dwyl.io/tomkra/tomkra/font_awesome5_rails)

Expand Down Expand Up @@ -65,14 +65,14 @@ Gem provides FontAwesome icons through helper. In your views just call `fa_icon`
```ruby
fa_icon('camera-retro')
# => <i class="fas fa-camera-retro"></i>

fa_icon('camera-retro', style: 'color: Tomato')
# => <i class="fas fa-camera-retro" style="color:Tomato"></i>

fa_icon('camera-retro', class: 'my-class', text: 'Camera', size: '3x')
# => <i class="fas fa-camera-retro my-class fa-3x"></i>
# => <span>Camera</span>

fa_icon(:camera_retro, class: 'my-class')
# => <i class="fas fa-camera-retro my-class"></i>

Expand All @@ -90,26 +90,26 @@ If you want to use different icon style you can do this through ```type``` attri
| Solid | :fas |:solid |
| Regular | :far |:regular|
| Light | :fal |:light |
| Brand | :fab |:brand |
| Brand | :fab |:brand |


```ruby
fa_icon('camera-retro', type: :solid) #Default
# => <i class="fas fa-camera-retro"></i>

fa_icon('camera-retro', type: :regular)
# => <i class="far fa-camera-retro"></i>

fa_icon('camera-retro', type: :light)
# => <i class="fal fa-camera-retro"></i>

fa_icon('camera-retro', type: :brand)
# => <i class="fab fa-camera-retro"></i>

fa_icon('camera-retro', type: :fab)
# => <i class="fab fa-camera-retro"></i>
```

```

Each icon type has its own helper method so you don't need to provide the ```type``` attribute in every call.
Which can be overridden, if it is provided.
Expand Down Expand Up @@ -139,7 +139,7 @@ FontAwesome 5 provides new animations and data attributes. Here are some example
```ruby
fa_icon('camera-retro', animation: 'spin')
# => <i class="fas fa-camera-retro fa-spin"></i>

fa_icon('camera-retro', data: {'fa-transform': 'rotate-90'})
# => <i class="fas fa-camera-retro" data-fa-transform="rotate-90"></i>

Expand All @@ -159,7 +159,7 @@ Following ```fa_layered_icon``` examples are written in ```haml```.
= fa_icon 'circle'
# => <span class="fa-layers fa-fw">
# => <i class="fas fa-circle"></i>
# => </span>
# => </span>

= fa_layered_icon style: 'background: MistyRose', size: '4x' do
= fa_icon 'circle', style: 'color: Tomato'
Expand All @@ -168,7 +168,7 @@ Following ```fa_layered_icon``` examples are written in ```haml```.
# => <span class="fa-layers fa-fw" style="background: MistyRose">
# => <i class="fas fa-circle" style="color: Tomato"></i>
# => <i class="fas fa-times fa-inverse" data-fa-transform="shrink-6"></i>
# => </span>
# => </span>
# => </div>

= fa_layered_icon aligned: :false do
Expand All @@ -178,7 +178,7 @@ Following ```fa_layered_icon``` examples are written in ```haml```.
# => <span class="fa-layers">
# => <i class="fas fa-circle"></i>
# => <span class="fa-layers-counter">1,419</span>
# => </span>
# => </span>
```

#### Stacked icon examples
Expand Down Expand Up @@ -223,7 +223,7 @@ More examples can be found in specs.
More animation and data attributes can be found on [FontAwesome documentation](https://fontawesome.com/how-to-use/svg-with-js).

## FontAwesome 5 Pro icons
Due to licence policy this gem pack only free FA5 icons. However ```fa_icon``` helper support all types of icons. If you purchased FA5 Pro icons and want to use helpers provided by this gem it's possible.
Due to licence policy this gem pack only free FA5 icons. However ```fa_icon``` helper support all types of icons. If you purchased FA5 Pro icons and want to use helpers provided by this gem it's possible.
1. Add this gem to your ```Gemfile``` without including anything to ```application.css``` and ```application.js```.
2. Create a [Kit](https://fontawesome.com/kits) on Font Awesome.
3. Add `= javascript_include_tag "//kit.fontawesome.com/[YOUR-KIT-ID].js"` in the head of your layout(s).
Expand Down
Binary file modified app/assets/fonts/fa-brands-400.eot
Binary file not shown.

0 comments on commit 666fb2d

Please sign in to comment.