faw_icon 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -4
- data/lib/faw_icon/helper.rb +2 -4
- data/lib/faw_icon/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 383773c7210860d5527e08957d48355d15b4d0ddff7c694fae5c24be56de8174
|
4
|
+
data.tar.gz: 0d3020605c6ce388f2ab7a339841ad5c664488705aadf9e841ebd19aaf61b05f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69c7d2496c26cebc7fbe62b1205cd1b3044cd5aadf4e5c95d30ab87bfa7c8eda02d95d68fd1630c973c9468fb0fc1954f52ffe84a8ac4617833a854d164fb5ec
|
7
|
+
data.tar.gz: dbd364974be9439e7b8d644c5f93ef27d3bf74d2bf84ac458e2729b09713df578bd89f6fa04cc1ca64f1d896d4f56d18130806e534ae4288a3cc41726f2c25bb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
### Minimalistic ruby gem that exposes a tag helper for Font Awesome icon sets.
|
4
4
|
|
5
5
|
By design it does not bundle any icons making it super fast to download and install
|
6
|
-
as well as providing the ability to use new icons as they become available custom ones or the PRO collection.
|
6
|
+
as well as providing the ability to use new icons as they become available, custom ones or the PRO collection.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -22,7 +22,7 @@ Or install it yourself as:
|
|
22
22
|
$ gem install faw_icon
|
23
23
|
|
24
24
|
You will need to download the .zip folder from [Font Awesome](https://fontawesome.com/get-started/svg-with-js)
|
25
|
-
where you can choose either the free
|
25
|
+
where you can choose either the free or the PRO collection.
|
26
26
|
|
27
27
|
Include in your application.scss the `fontawesome/svg-with-js/css/fa-svg-with-js.css`
|
28
28
|
ideally placing in the `app/assets/stylesheets/fa-svg-with-js.css`
|
@@ -35,7 +35,7 @@ Then copy the `fontawesome/advanced-options/metadata/icons.json` in `app/assets/
|
|
35
35
|
|
36
36
|
## Usage
|
37
37
|
All options from [additional-styling](https://fontawesome.com/how-to-use/svg-with-js#additional-styling) are supported with the exception of
|
38
|
-
CSS Pseudo-elements
|
38
|
+
CSS Pseudo-elements.
|
39
39
|
|
40
40
|
A mapping for the properties has been introduced in an attempt to make them more readable and easier to remember
|
41
41
|
|
@@ -49,7 +49,8 @@ A mapping for the properties has been introduced in an attempt to make them more
|
|
49
49
|
| data-fa-mask | mask | no | fas fa-comment | fas fa-comment | string |
|
50
50
|
|
51
51
|
|
52
|
-
The `style` and `name` are required params and the rest optional ones go into a Hash in any order they might occur
|
52
|
+
The `style` and `name` are required params and the rest optional ones go into a Hash in any order they might occur.
|
53
|
+
|
53
54
|
Then just use them like this
|
54
55
|
|
55
56
|
<%= faw_icon 'solid', 'magic' %>
|
data/lib/faw_icon/helper.rb
CHANGED
@@ -2,9 +2,7 @@ require "faw_icon/version"
|
|
2
2
|
|
3
3
|
module FawIcon
|
4
4
|
def faw_icon(style, name, options = {})
|
5
|
-
if style == 'brand'
|
6
|
-
style = 'brands'
|
7
|
-
end
|
5
|
+
style = 'brands' if style == 'brand'
|
8
6
|
fa_prefix = 'fa'
|
9
7
|
html_props = {}
|
10
8
|
icons = JSON.parse(File.read('app/assets/javascripts/icons.json'))
|
@@ -42,7 +40,7 @@ module FawIcon
|
|
42
40
|
'far'
|
43
41
|
when 'light'
|
44
42
|
'fal'
|
45
|
-
when '
|
43
|
+
when 'brands'
|
46
44
|
'fab'
|
47
45
|
end
|
48
46
|
end
|
data/lib/faw_icon/version.rb
CHANGED