uriji-icons-rails 2.3.0 → 2.5.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 +4 -4
- data/app/assets/fonts/uriji-icons.eot +0 -0
- data/app/assets/fonts/uriji-icons.svg +162 -132
- data/app/assets/fonts/uriji-icons.ttf +0 -0
- data/app/assets/fonts/uriji-icons.woff +0 -0
- data/app/assets/stylesheets/uriji-icons.css.erb +298 -208
- data/app/helpers/uriji_icons/rails/icon_helper.rb +18 -4
- data/lib/uriji-icons-rails/version.rb +2 -2
- metadata +3 -4
@@ -1,9 +1,13 @@
|
|
1
1
|
module UrijiIcons
|
2
2
|
module Rails
|
3
|
-
# IconHelper methods for Uriji Icons
|
4
3
|
module IconHelper
|
5
|
-
|
6
|
-
|
4
|
+
COLOR_ICONS = {
|
5
|
+
'bell': 10,
|
6
|
+
'comments-dots': 8,
|
7
|
+
'credit-card': 6,
|
8
|
+
'rocket': 9
|
9
|
+
}.freeze
|
10
|
+
|
7
11
|
def uj_icon(names = 'flag', original_options = {})
|
8
12
|
options = original_options.deep_dup
|
9
13
|
classes = []
|
@@ -15,7 +19,17 @@ module UrijiIcons
|
|
15
19
|
Private.icon_join(icon, text, right_icon)
|
16
20
|
end
|
17
21
|
|
18
|
-
|
22
|
+
def uj_color_icon(key, options = {})
|
23
|
+
icon_name = "uj-#{key}-color"
|
24
|
+
options = options.merge(class: "#{icon_name} #{options[:class]}")
|
25
|
+
content_tag(:i, options) do
|
26
|
+
paths = COLOR_ICONS[key.to_sym]
|
27
|
+
paths.times.reduce(ActiveSupport::SafeBuffer.new) do |tags, i|
|
28
|
+
tags + content_tag(:span, nil, class: "path#{i + 1}")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
19
33
|
module Private
|
20
34
|
extend ActionView::Helpers::OutputSafetyHelper
|
21
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uriji-icons-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Serrada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -123,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
|
127
|
-
rubygems_version: 2.7.8
|
126
|
+
rubygems_version: 3.0.6
|
128
127
|
signing_key:
|
129
128
|
specification_version: 4
|
130
129
|
summary: An asset gemification of the uriji-icons font library
|