fa_rails 0.1.7 → 0.1.8
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 +4 -6
- 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: a71da27d5e41f547a0ea3bb927e2502298953c5b
|
4
|
+
data.tar.gz: d31c7c2826192d37fb2a7b8d2ba584cbe7e8b233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 960520ac8dd74e2d81a4038aa367f6920f77924e0e9048c068177aaf22baff8e63fbb13d60f1b78e20a801ce1d93347a6e0fc5429aa2749941f6d1478d5a1be2
|
7
|
+
data.tar.gz: e702d5a2781d539d61a10fed7d64e06158e78eefb1c79f754dd35f523da99d415aa7cab5f78173f413abc2b07876b7c3f011289d552844fda75c6b6413fcabcc
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
data/lib/fa/base.rb
CHANGED
@@ -20,6 +20,9 @@ module FA
|
|
20
20
|
icons.map do |icon|
|
21
21
|
name = icon[:name]
|
22
22
|
options = icon[:options] || {}
|
23
|
+
options[:size] ||= 1
|
24
|
+
options[:fa] = options[:fa].to_s
|
25
|
+
options[:fa] += " stack-#{options[:size]}x"
|
23
26
|
|
24
27
|
if %i[counter text].include?(name.to_sym)
|
25
28
|
parse_span(name, icon[:text], options)
|
@@ -35,7 +38,7 @@ module FA
|
|
35
38
|
title = options[:title]
|
36
39
|
|
37
40
|
@classes << "fa-#{name}"
|
38
|
-
@classes << "fa-#{
|
41
|
+
@classes << "fa-#{options[:size]}x"
|
39
42
|
css = @classes.flatten.join(' ')
|
40
43
|
transforms = @transforms.join(' ')
|
41
44
|
|
@@ -79,11 +82,6 @@ module FA
|
|
79
82
|
end
|
80
83
|
end
|
81
84
|
|
82
|
-
def size_x(size)
|
83
|
-
return '' unless !!size || size == 1
|
84
|
-
"#{size}x"
|
85
|
-
end
|
86
|
-
|
87
85
|
def long_position(position)
|
88
86
|
return 'top-right' if position == :tr
|
89
87
|
return 'top-left' if position == :tl
|