fa_rails 0.1.8 → 0.1.9
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/fa_rails.gemspec +1 -1
- data/lib/fa/base.rb +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7472a6957c0b16253da64467dd0678beda165eb6
|
4
|
+
data.tar.gz: f731108b740ad48d56cc8044126505da30569148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8996b4b9c69cbfa7391f848aaa8f4c166702c7a9baccb4c097bc8c0d18b694af33692c9663f065aece16765c7866d80352e033420c6ea80dced5ff3d13bb0b6
|
7
|
+
data.tar.gz: 4ecefd2bee7b8251ca00d393570e8b2e60b27e3c5e436ebb39fd0853c5650e298812538140f1daac2ce96725a0b67e2949dcece92f0c7f53f074ca3fd51ed6c5
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
data/lib/fa/base.rb
CHANGED
@@ -19,9 +19,7 @@ module FA
|
|
19
19
|
def parse_all(icons)
|
20
20
|
icons.map do |icon|
|
21
21
|
name = icon[:name]
|
22
|
-
options = icon[:options]
|
23
|
-
options[:size] ||= 1
|
24
|
-
options[:fa] = options[:fa].to_s
|
22
|
+
options = fa_options(icon[:options])
|
25
23
|
options[:fa] += " stack-#{options[:size]}x"
|
26
24
|
|
27
25
|
if %i[counter text].include?(name.to_sym)
|
@@ -61,7 +59,7 @@ module FA
|
|
61
59
|
end
|
62
60
|
|
63
61
|
def fa_options(options)
|
64
|
-
default = { style: :solid, css: '', fa: '' }
|
62
|
+
default = { style: :solid, css: '', fa: '', size: 1 }
|
65
63
|
|
66
64
|
default.merge(options.to_h)
|
67
65
|
end
|
@@ -95,7 +93,7 @@ module FA
|
|
95
93
|
end
|
96
94
|
|
97
95
|
def parse_classes(options)
|
98
|
-
@classes = []
|
96
|
+
@classes = ['fa']
|
99
97
|
@classes << parse_style(options[:style])
|
100
98
|
@classes << options[:fa].to_s.split(' ').map { |c| "fa-#{c}" }
|
101
99
|
@classes << options[:css].to_s.split(' ')
|