font-awesome-helper 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aba6036acc266fd5589c72d8bc17944a298daaf3
|
4
|
+
data.tar.gz: 199f6e4f477e42a4789a5324b5e99dba1447d31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8586eb3bf5069207821b3efd090c6ef3a292ae477641266f5854710c1ae04e05aab7f08e0f95af9905ddfc4d814539aa0cf282a6b87d489d3e43f15c1ca40d84
|
7
|
+
data.tar.gz: 32b112b06a2510b3aca8cf3ca54d6b5580c89d4357d53505501c1328c0a5ce11ab77a6c09a89d730ebc78523f61c52ef8443e4d60232331c35bf8bd6759d076f
|
data/lib/font-awesome-helper.rb
CHANGED
File without changes
|
@@ -2,18 +2,20 @@ module FontAwesomeHelper
|
|
2
2
|
module Helpers
|
3
3
|
FA_CLASS_PREFIX = 'fa'
|
4
4
|
|
5
|
-
# TODO: fw (e.g. `fa_icon 'github', fixed: true`)
|
6
|
-
# TODO: border (e.g. `fa_icon 'github', border: true`)
|
7
|
-
# TODO: spin (e.g. `fa_icon 'github', spin: true`)
|
8
|
-
# TODO: size (e.g. `fa_icon 'github', size: '2x'`)
|
9
|
-
# TODO: rotate (e.g. `fa_icon 'github', rotate: 90`)
|
10
|
-
# TODO: flip (e.g. `fa_icon 'github', flip: :vertical`)
|
11
5
|
def fa_icon(names, options = {})
|
12
6
|
icon = FaIcon.new(names, options)
|
13
7
|
(block_given? ? yield(icon.to_tag) : icon.to_tag).html_safe
|
14
8
|
end
|
15
9
|
|
16
|
-
|
17
|
-
|
10
|
+
def fa_ul(options = {}, &block)
|
11
|
+
classes = %W(#{FA_CLASS_PREFIX}-ul)
|
12
|
+
classes += options.delete(:class).split(' ') if options.key? :class
|
13
|
+
content_tag :ul, class: classes.join(' '), &block
|
14
|
+
end
|
15
|
+
|
16
|
+
def fa_li(names, options = {})
|
17
|
+
content = fa_icon(names + ' li') { |i| "#{i}#{yield}" }
|
18
|
+
content_tag :li, content, options
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: font-awesome-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masayuki IZUMI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -62,7 +62,7 @@ files:
|
|
62
62
|
- MIT-LICENSE
|
63
63
|
- Rakefile
|
64
64
|
- lib/font-awesome-helper.rb
|
65
|
-
- lib/font-awesome-helper/
|
65
|
+
- lib/font-awesome-helper/fa_icon.rb
|
66
66
|
- lib/font-awesome-helper/helpers.rb
|
67
67
|
- lib/font-awesome-helper/railtie.rb
|
68
68
|
- lib/font-awesome-helper/version.rb
|