faw_icon 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +22 -0
- data/README.md +42 -1
- data/lib/faw_icon/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c685c990088f34003403197d138cf3367dcc64f83445902093f1db993bcc664a
|
4
|
+
data.tar.gz: ef87805daa53c20ecbd399890124420ea987e44f815c51ea867bcd877d17f40c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25ff92e635f0723d61e8bf43322d2258c603e7212ea3dab96fc13ce30f537897fbcd17fa680b3833938b37a657104d83754d49cd9a73c60052001c349883cd63
|
7
|
+
data.tar.gz: bb123d73d28fed2c6f04e0afff80f478004294bdc4d1c01f796ef4355a0e76e2603a5e46c1ea5e62aed97dc4ada0f7b7dfc9d7d02946acbf045bcacde1e1c6c3
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
faw_icon (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
minitest (5.11.3)
|
10
|
+
rake (10.5.0)
|
11
|
+
|
12
|
+
PLATFORMS
|
13
|
+
ruby
|
14
|
+
|
15
|
+
DEPENDENCIES
|
16
|
+
bundler (~> 1.16)
|
17
|
+
faw_icon!
|
18
|
+
minitest (~> 5.0)
|
19
|
+
rake (~> 10.0)
|
20
|
+
|
21
|
+
BUNDLED WITH
|
22
|
+
1.16.2
|
data/README.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# FawIcon
|
2
2
|
|
3
|
+
### Minimalistic ruby gem that exposes a tag helper for Font Awesome icon sets.
|
4
|
+
|
5
|
+
By design only the svg-with-js version is supported following the recommendations from the font-awesome docs
|
6
|
+
https://fontawesome.com/get-started/svg-with-js.
|
7
|
+
|
8
|
+
Another great feature is that is does not bundle any icons making it super fast to download and install
|
9
|
+
as well as providing the ability to use new icons as they become available or opting for the
|
10
|
+
PRO collection.
|
11
|
+
|
3
12
|
## Installation
|
4
13
|
|
5
14
|
Add this line to your application's Gemfile:
|
@@ -15,11 +24,43 @@ And then execute:
|
|
15
24
|
Or install it yourself as:
|
16
25
|
|
17
26
|
$ gem install faw_icon
|
27
|
+
|
28
|
+
You will need to download and include in your application.js the desired .js files from [Font Awesome](https://fontawesome.com/get-started/svg-with-js)
|
29
|
+
where you can choose to include all or only a subset of them either the free ones or the PRO collections
|
18
30
|
|
31
|
+
application.js
|
32
|
+
|
33
|
+
//= require fontawesome-all.min
|
34
|
+
|
19
35
|
## Usage
|
36
|
+
All options from [additional-styling](https://fontawesome.com/how-to-use/svg-with-js#additional-styling) are supported with the exception of
|
37
|
+
CSS Pseudo-elements as being informed by the documentation.
|
38
|
+
|
39
|
+
A mapping for the properties has been introduced in an attempt to make them more readable and easier to remember
|
40
|
+
|
41
|
+
| Original property | Mapped property | Required | Original value | Mapped value | Type |
|
42
|
+
|-------------------|-----------------|----------|--------------------|------------------------------|---------|
|
43
|
+
| class | style | yes | fas, far, fal, fab | solid, regular, light, brand | string |
|
44
|
+
| class | name | yes | fa-user | user | string |
|
45
|
+
| class | fixed_width | no | fa-fw | true | boolean |
|
46
|
+
| class | spin | no | fa-spin | true | boolean |
|
47
|
+
| data-fa-transform | transform | no | grow-6 | grow-6 | string |
|
48
|
+
| data-fa-mask | mask | no | fas fa-comment | fas fa-comment | string |
|
49
|
+
|
20
50
|
|
21
|
-
|
51
|
+
The `style` and `name` are required params and the rest optional ones go into a Hash in any order they might occur
|
52
|
+
Then just use them like this
|
22
53
|
|
54
|
+
<%= faw_icon 'solid', 'magic' %>
|
55
|
+
<%= faw_icon 'solid', 'user', {size: '10x'} %>
|
56
|
+
<%= faw_icon 'light', 'info', {fixed_width: true} %>
|
57
|
+
<%= faw_icon 'regular', 'sync', {spin: true} %>
|
58
|
+
<%= faw_icon 'brand', 'android', {transform: 'grow-5'} %>
|
59
|
+
|
60
|
+
Bear in mind that the `brand` icons only come in one style called `brand` (!)
|
61
|
+
and the rest come in three variations but not all are available in the free collection.
|
62
|
+
Find them all in the [gallery](https://fontawesome.com/icons?d=gallery)
|
63
|
+
|
23
64
|
## Contributing
|
24
65
|
|
25
66
|
Bug reports and pull requests are welcome on GitHub at https://github.com/alexwebgr/faw_icon. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/lib/faw_icon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faw_icon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alexwebgr
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- ".travis.yml"
|
64
64
|
- CODE_OF_CONDUCT.md
|
65
65
|
- Gemfile
|
66
|
+
- Gemfile.lock
|
66
67
|
- LICENSE.txt
|
67
68
|
- README.md
|
68
69
|
- Rakefile
|