v1.4.1-beta/Final website UI, add copyright
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
/************************************************************************
|
||||
Copyright (C) Ayushya Amitabh - All Rights Reserved
|
||||
Unauthorized copying of this file, via any medium is strictly prohibited
|
||||
Proprietary and confidential
|
||||
Written by Ayushya Amitabh <admin@chromewatchparty.com>, 2020
|
||||
************************************************************************/
|
||||
|
||||
var LOGO_INIT = 0;
|
||||
var GET_INIT = 0;
|
||||
function handleSticky() {
|
||||
@@ -8,14 +15,18 @@ function handleSticky() {
|
||||
} else {
|
||||
logo.classList.remove('stickied');
|
||||
}
|
||||
if (window.scrollY >= GET_INIT + get.offsetHeight * 1.5) {
|
||||
get.classList.add('stickied');
|
||||
} else {
|
||||
get.classList.remove('stickied');
|
||||
if (get) {
|
||||
if (window.scrollY >= GET_INIT + get.offsetHeight * 1.5) {
|
||||
get.classList.add('stickied');
|
||||
} else {
|
||||
get.classList.remove('stickied');
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload = function () {
|
||||
LOGO_INIT = document.querySelector('.logo').offsetTop;
|
||||
GET_INIT = document.querySelector('.landing .link-button').offsetTop;
|
||||
GET_INIT = document.querySelector('.landing .link-button')
|
||||
? document.querySelector('.landing .link-button').offsetTop
|
||||
: 0;
|
||||
window.addEventListener('scroll', this.handleSticky);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user