scrivito_section_widgets 0.90.1 → 1.0.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: d46484f39c62b92a76ee5b668bc93c00332488f7
4
- data.tar.gz: 3294a38f68c7ff0703be0b880ba008a93903f14a
3
+ metadata.gz: d0e13d0e9977737010218304b0a7f6d4d1765efe
4
+ data.tar.gz: 7ba966fe96c47a9d8f4b07414dbac69bf54f6dc3
5
5
  SHA512:
6
- metadata.gz: 0872a97a092b1abe246249460d25f7784ee43eb254417efca507b5c117894a881f47a8ee199a3e08dd5fb3eb21fa9c96c287737743803edd9373fb140ba5e683
7
- data.tar.gz: 4d182e33f030cc234c92943b1787140eaaf1c74107dde5b16f625339ebb5256b59fb81d8e4072845ba5a3bf8561d5d8961544bb0f3fdfd337c9875789fceafb0
6
+ metadata.gz: 0adb761d0deac2d73a3bf87589d5665097a59e73dff9392e028504a75669ff427b987d5380bb873aeebf43d0164c042ebacb277bbb569dc6e241b2771c86fca5
7
+ data.tar.gz: 30da3ed6883da24cb2ea939cda4da1bae6259faeb19beabf032270c47ca0d33fe3e4f298d37bc057537dfb4eede9a561d0a017faf413fae85a6361433c9da97d
@@ -9,7 +9,7 @@ $(function(){
9
9
  scrivito.on('content', function() {
10
10
  var images = $(".parallax-image-fast, .parallax-image-medium, .parallax-image-slow");
11
11
 
12
- if($('body').width() > 1024) {
12
+ if($('body').width() > 1024 && images.length > 0) {
13
13
  set_background_positions(images);
14
14
 
15
15
  $(window).on('scroll', function(event) {
@@ -63,7 +63,7 @@ function set_background_position(image) {
63
63
  function calulate_position(image, value) {
64
64
  var speed = data_to_speed(value);
65
65
  var value = (caluclate_offset(image) * speed) + "px";
66
- return 'translate3d(0px, '+ value +', 0px)'
66
+ return 'translate3d(-50%, '+ value +', 0px)'
67
67
  }
68
68
 
69
69
  function caluclate_offset(image) {
@@ -1,14 +1,29 @@
1
1
  .scrivito_section_parallax_widget {
2
2
  position: relative;
3
3
  overflow: hidden;
4
+ min-height: 100px;
4
5
  z-index: 0;
5
6
  }
6
7
 
8
+ .scrivito_section_parallax_widget .parallax-container {
9
+ position: absolute;
10
+ top: 0;
11
+ left: 0;
12
+ right: 0;
13
+ bottom: 0;
14
+ z-index: -1;
15
+ }
16
+
7
17
  .scrivito_section_parallax_widget .parallax-image {
8
18
  position: absolute;
19
+ left: 50%;
9
20
  top: 0;
10
- width: 100%;
11
- height: auto;
21
+ min-width: 100%;
22
+ min-height: 100%;
23
+ -webkit-transform: translate3d(0, 0, 0);
24
+ transform: translate3d(0, 0, 0);
25
+ -webkit-transform: translateX(-50%);
26
+ transform: translateX(-50%);
12
27
  }
13
28
 
14
29
  .scrivito_section_video_widget video {
@@ -1,6 +1,8 @@
1
1
  <section class="<%= widget.section_class %>" style="<%= widget.section_style %>">
2
- <% if widget.with_parallax? %>
3
- <%= scrivito_image_tag(widget, :background_image, class: "parallax-image parallax-image-#{widget.parallax_speed}", data: { parallax_speed: widget.speed }) %>
4
- <% end %>
5
- <%= scrivito_tag(:div, widget, :section_content, class: 'container') %>
2
+ <div class="parallax-container">
3
+ <% if widget.with_parallax? %>
4
+ <%= scrivito_image_tag(widget, :background_image, class: "parallax-image parallax-image-#{widget.parallax_speed}", data: { parallax_speed: widget.speed }) %>
5
+ <% end %>
6
+ <%= scrivito_tag(:div, widget, :section_content, class: 'container') %>
7
+ </div>
6
8
  </section>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoSectionWidgets
2
- VERSION = "0.90.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_section_widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.90.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler