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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbc8041f9847dc9f6c9544928145fd7f82e60203
4
- data.tar.gz: 1a76bbd0a7aad0f01117468553ba354d8a049e54
3
+ metadata.gz: 6c494780bae50fdc579bc65496ddcf29fd096044
4
+ data.tar.gz: 73628f1780fb98da9f43dc74f1ad3444fb8409d2
5
5
  SHA512:
6
- metadata.gz: 5def996c369c3a237602ad245bdf256b3486e4baaf138c4c4b00b42738f8346c14fd6d1dd0a243099cc5ff96c67bf1c332168179259cde0e5fb769b7d2bf51f3
7
- data.tar.gz: 7db7ce22923925c5785ad6b2265ee35953a8fbb1fed8d7b458229c45bac597b9413ae652a2e9f2c20858b1d31e0f2a1dddb6e17c17d83a353bb5b2f00cd0ed8d
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.7)
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.3)
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.15.4
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
- result["data-parallax-style"] = @options[:parallax_effect] if !@options[:parallax_effect].empty? and @options[:parallax_effect] != "none"
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 do |sb|
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"
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "maglove-widgets"
6
- s.version = "1.1.7"
6
+ s.version = "1.1.8"
7
7
  s.licenses = ["BSD-3-Clause"]
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Tobias Strebitzer"]
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.7
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: 2017-10-24 00:00:00.000000000 Z
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.5.2
91
+ rubygems_version: 2.6.10
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: MagLove Widgets Repository