v1.2.0-beta/website redesign done

This commit is contained in:
2020-05-22 20:32:27 -04:00
parent 32fb08d61e
commit 09afedd265
9 changed files with 330 additions and 208 deletions
+8 -1
View File
@@ -4,8 +4,15 @@ function handleSticky() {
} else {
document.querySelector('header').setAttribute('data-header-visible', false);
}
if (document.querySelector('.intro')) {
const intro = document.querySelector('.intro');
intro.style = `--percentIntroScroll : ${window.scrollY / intro.offsetTop - 0.2}`;
}
if (document.querySelector('.features')) {
const features = document.querySelector('.features');
features.style = `--percentFeatureScroll : ${window.scrollY / features.offsetTop - 0.4}`;
}
}
window.onload = function () {
this.handleSticky();
window.addEventListener('scroll', this.handleSticky);
};