faw_icon 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbb270a30847c1cc5001af3805ad92d6f35bcc33910fadeda19b4a11bd1c9b54
4
- data.tar.gz: 97ab96158d5ef2c3bea316324417316f500f85f2580947b2b10dd7a5f0da237f
3
+ metadata.gz: c685c990088f34003403197d138cf3367dcc64f83445902093f1db993bcc664a
4
+ data.tar.gz: ef87805daa53c20ecbd399890124420ea987e44f815c51ea867bcd877d17f40c
5
5
  SHA512:
6
- metadata.gz: 40abd8c2d5db071ddb63534ec308e05dbeefb6056b09f4e4555235dad29b597cf199d51d4eadf31904e6ea110e281375d7b7f131c73024d2f4145a0897705a19
7
- data.tar.gz: 9a8a50ff6f8e71544de3dffa75186789e5dd2b86811aa0d76562e9840451a8b663dc46705ed5210fc0c920f77ff0b16a0347bbf14f23aafffe03178628ca3f2d
6
+ metadata.gz: 25ff92e635f0723d61e8bf43322d2258c603e7212ea3dab96fc13ce30f537897fbcd17fa680b3833938b37a657104d83754d49cd9a73c60052001c349883cd63
7
+ data.tar.gz: bb123d73d28fed2c6f04e0afff80f478004294bdc4d1c01f796ef4355a0e76e2603a5e46c1ea5e62aed97dc4ada0f7b7dfc9d7d02946acbf045bcacde1e1c6c3
data/.gitignore CHANGED
@@ -6,3 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea/
10
+ *.gem
data/Gemfile CHANGED
@@ -4,5 +4,3 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in faw_icon.gemspec
6
6
  gemspec
7
-
8
- gem 'rails' , '~>5.1.6'
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
- TODO: Write usage instructions here
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.
@@ -1,3 +1,3 @@
1
1
  module FawIcon
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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