1
0
mirror of synced 2026-08-05 18:46:56 +00:00
This commit is contained in:
Joffrey JAFFEUX
2025-01-03 17:43:09 +01:00
2 changed files with 6 additions and 6 deletions
@@ -61,9 +61,9 @@ export default class Rewind extends Component {
@action
handleScroll({ target }) {
let children = this.rewindContainer.getElementsByClassName("parallax-bg");
for (let i = 1; i < children.length; i++) {
for (let i = 0; i < children.length; i++) {
children[i].style.transform = `translateY(-${
(target.scrollTop * i) / children.length
(target.scrollTop * (i + 1)) / 5
}px)`;
}
}
+4 -4
View File
@@ -39,19 +39,19 @@
.background-1 {
background: url(/plugins/discourse-rewind/images/bg-1.png);
background-size: cover;
background-size: contain;
position: absolute;
transform: translateY(0px);
width: 100%;
height: 100%;
height: 1000%;
}
.background-2 {
position: absolute;
width: 100%;
height: 100%;
height: 1000%;
background: url(/plugins/discourse-rewind/images/bg-2.png);
background-size: cover;
background-size: contain;
transform: translateY(0px);
}