maglove-widgets 1.1.7 → 1.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 +3 -3
- data/lib/maglove/widgets/container.rb +6 -6
- data/lib/maglove/widgets/scrollable_image.rb +2 -1
- 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: 6c494780bae50fdc579bc65496ddcf29fd096044
|
4
|
+
data.tar.gz: 73628f1780fb98da9f43dc74f1ad3444fb8409d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33025d623fbb2a6b0491506a9c8d7076563d12f965b13cbbae702dc2649aa0bc51587f4fc33d10920fac2a8dff15a43db029305320bb06fecb882ddf0ed9fa05
|
7
|
+
data.tar.gz: e19f4cf722cb5621dcf386da5bab438a9bbabf86453cbe9b64dc931134e92a2914888732f1dad574658ff88e48a7cf37c8e007c8f85418fb3f7e97bbdc43a411
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maglove-widgets (1.1.
|
4
|
+
maglove-widgets (1.1.8)
|
5
5
|
bundler (~> 1.14)
|
6
6
|
hamloft (~> 0.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
haml (5.0.
|
11
|
+
haml (5.0.4)
|
12
12
|
temple (>= 0.8.0)
|
13
13
|
tilt
|
14
14
|
hamloft (0.2.6)
|
@@ -27,4 +27,4 @@ DEPENDENCIES
|
|
27
27
|
maglove-widgets!
|
28
28
|
|
29
29
|
BUNDLED WITH
|
30
|
-
1.
|
30
|
+
1.16.1
|
@@ -12,6 +12,7 @@ module Maglove
|
|
12
12
|
image_position: "center_center",
|
13
13
|
image_size: "cover",
|
14
14
|
parallax_effect: "none",
|
15
|
+
parallax_speed: 0.6,
|
15
16
|
background_color: "",
|
16
17
|
bg_color: "",
|
17
18
|
opacity: "",
|
@@ -38,7 +39,10 @@ module Maglove
|
|
38
39
|
|
39
40
|
def container_options
|
40
41
|
result = { class: container_classes, style: container_styles }
|
41
|
-
|
42
|
+
if !@options[:parallax_effect].empty? and @options[:parallax_effect] != "none"
|
43
|
+
result["data-parallax-style"] = @options[:parallax_effect]
|
44
|
+
result["data-parallax-speed"] = @options[:parallax_speed]
|
45
|
+
end
|
42
46
|
result
|
43
47
|
end
|
44
48
|
|
@@ -79,11 +83,7 @@ module Maglove
|
|
79
83
|
@options[:margin_right] = "auto"
|
80
84
|
end
|
81
85
|
|
82
|
-
style_string @options, :min_height, :max_height, :max_width, :padding, :overflow_y, :margin_left, :margin_right
|
83
|
-
if @options[:parallax_effect] != "none"
|
84
|
-
sb.add(:background_image, @options[:image_source], "url(<%= value %>)")
|
85
|
-
end
|
86
|
-
end
|
86
|
+
style_string @options, :min_height, :max_height, :max_width, :padding, :overflow_y, :margin_left, :margin_right
|
87
87
|
end
|
88
88
|
|
89
89
|
module Helpers
|
@@ -15,11 +15,12 @@ module Maglove
|
|
15
15
|
end
|
16
16
|
|
17
17
|
module Helpers
|
18
|
-
def scrollable_image_widget(options = {})
|
18
|
+
def scrollable_image_widget(options = {}, &block)
|
19
19
|
widget_block(Widgets::ScrollableImage.new(options)) do |widget|
|
20
20
|
haml_tag :div, class: "scrollable-image-container #{widget.options[:show_navigation] ? 'show-navigation' : ''}", style: style_string(widget.options, :margin, :padding, :height) do
|
21
21
|
haml_tag :div, class: "scrollable-image-inner" do
|
22
22
|
haml_tag :img, class: "scrollable-image", src: widget.options[:source]
|
23
|
+
yield if block
|
23
24
|
end
|
24
25
|
if widget.options[:show_navigation]
|
25
26
|
haml_tag :div, class: "scrollable-image-navigator scrollable-image-navigator-left"
|
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.1.
|
4
|
+
version: 1.1.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:
|
11
|
+
date: 2018-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.6.10
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: MagLove Widgets Repository
|