v1.2.0-beta/website redesign done
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user