diff --git a/assets/javascripts/discourse/components/rewind.gjs b/assets/javascripts/discourse/components/rewind.gjs index 5a332ad..3e41429 100644 --- a/assets/javascripts/discourse/components/rewind.gjs +++ b/assets/javascripts/discourse/components/rewind.gjs @@ -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)`; } } diff --git a/assets/stylesheets/common/rewind.scss b/assets/stylesheets/common/rewind.scss index 67957c6..9548f6d 100644 --- a/assets/stylesheets/common/rewind.scss +++ b/assets/stylesheets/common/rewind.scss @@ -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); }