scrivito_section_widgets 0.90.1 → 1.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0e13d0e9977737010218304b0a7f6d4d1765efe
|
4
|
+
data.tar.gz: 7ba966fe96c47a9d8f4b07414dbac69bf54f6dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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:
|
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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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>
|
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.
|
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:
|
11
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|