maglove-widgets 1.0.7 → 1.0.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 +2 -2
- data/lib/maglove/widgets/container.rb +42 -27
- data/maglove-widgets.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7db710a45299148112796c1a5b59df8edd93c4d
|
4
|
+
data.tar.gz: c33fb44c51b38f26856ebdb2d0f937aaa79afaff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee5ae5b3a8a7a7a8a5df4f7946d53e0e9a44e95951732493c44237bf500730293fe5e41e57e52ea5d70d00be9c8a433c8430e3aba5801c3e21dd264ca6f4b49b
|
7
|
+
data.tar.gz: acceb03e2e14401ec78d42b9979b84bcfc53796c39503056da18ba307b1a8540bfef4fffcef3f0bd4e9b1c1d6b3c7393e32cf4e9f5d878ba57bbb32b26405355
|
data/Gemfile.lock
CHANGED
@@ -7,29 +7,31 @@ module Maglove
|
|
7
7
|
|
8
8
|
def defaults
|
9
9
|
{
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
10
|
+
animate: "none",
|
11
|
+
image_source: false,
|
12
|
+
image_position: "center_center",
|
13
|
+
image_size: "cover",
|
14
|
+
parallax_effect: "none",
|
15
|
+
background_color: "",
|
16
|
+
bg_color: "",
|
17
|
+
opacity: "",
|
18
|
+
border_radius: "",
|
19
|
+
border_width: "",
|
20
|
+
border_style: "",
|
21
|
+
style: "default",
|
22
|
+
padding_top: "",
|
23
|
+
padding_right: "",
|
24
|
+
padding_bottom: "",
|
25
|
+
padding_left: "",
|
26
|
+
alignment: "center",
|
27
|
+
min_height: "",
|
28
|
+
max_height: "",
|
29
|
+
max_width: "",
|
30
|
+
margin_top: "",
|
31
|
+
margin_right: "",
|
32
|
+
margin_bottom: "",
|
33
|
+
margin_left: "",
|
34
|
+
overflow_y: ""
|
33
35
|
}
|
34
36
|
end
|
35
37
|
|
@@ -57,15 +59,28 @@ module Maglove
|
|
57
59
|
sb.add(:background_color, @options[:background_color] == "custom" ? @options[:bg_color] : nil)
|
58
60
|
if @options[:background_color] == "overlay"
|
59
61
|
sb.add(:background_image, @options[:image_source], "linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(<%= value %>)")
|
60
|
-
else
|
61
|
-
sb.add(:background_image, @options[:image_source], "url(<%= value %>)")
|
62
62
|
end
|
63
63
|
sb.add(:background_position, @options[:image_position], "<%= value.split('_').join(' ') %>")
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
67
|
def image_styles
|
68
|
-
|
68
|
+
if @options[:alignment] == "left"
|
69
|
+
@options[:margin_left] = "0"
|
70
|
+
@options[:margin_right] = "auto"
|
71
|
+
elsif @options[:alignment] == "right"
|
72
|
+
@options[:margin_left] = "auto"
|
73
|
+
@options[:margin_right] = "0"
|
74
|
+
else
|
75
|
+
@options[:margin_left] = "auto"
|
76
|
+
@options[:margin_right] = "auto"
|
77
|
+
end
|
78
|
+
|
79
|
+
style_string @options, :min_height, :max_height, :max_width, :padding, :overflow_y, :margin_left, :margin_right do |sb|
|
80
|
+
if @options[:background_color] != "overlay"
|
81
|
+
sb.add(:background_image, @options[:image_source], "url(<%= value %>)")
|
82
|
+
end
|
83
|
+
end
|
69
84
|
end
|
70
85
|
|
71
86
|
module Helpers
|
@@ -82,4 +97,4 @@ module Maglove
|
|
82
97
|
end
|
83
98
|
end
|
84
99
|
end
|
85
|
-
end
|
100
|
+
end
|
data/maglove-widgets.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maglove-widgets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Strebitzer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
89
|
+
rubygems_version: 2.5.2
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: MagLove Widgets Repository
|