2023-01-26 14:43:08 +00:00
|
|
|
let navToggle = true;
|
|
|
|
|
|
|
|
document.onscroll = function() {
|
2023-02-01 00:57:36 +00:00
|
|
|
try {
|
|
|
|
document.querySelector('.background-decoration').style.opacity = `${1 - window.scrollY / 621}`;
|
|
|
|
document.querySelector('.background-decoration').style.top = `-${window.scrollY / 5}px`;
|
|
|
|
} catch (e) {
|
2023-03-05 18:16:28 +00:00
|
|
|
// Do nothing if banner not found
|
2023-02-01 00:57:36 +00:00
|
|
|
}
|
2023-01-26 14:43:08 +00:00
|
|
|
|
2023-03-01 23:29:34 +00:00
|
|
|
try {
|
|
|
|
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
|
|
|
document.querySelector('.banner').classList = 'banner banner-scrolled';
|
|
|
|
} else {
|
|
|
|
document.querySelector('.banner').classList = 'banner';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (e) {
|
2023-03-05 18:16:28 +00:00
|
|
|
// Do nothing if banner not found
|
2023-03-01 23:29:34 +00:00
|
|
|
}
|
|
|
|
|
2023-01-26 14:43:08 +00:00
|
|
|
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
2023-02-01 00:57:36 +00:00
|
|
|
document.querySelector('.jumpUp').classList = 'jumpUp jumpUp--show';
|
2023-01-26 14:43:08 +00:00
|
|
|
} else {
|
2023-02-01 00:57:36 +00:00
|
|
|
document.querySelector('.jumpUp').classList = 'jumpUp';
|
2023-01-26 14:43:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
document.querySelector('.jumpUp').onclick = function() {
|
|
|
|
document.body.scrollTop = 0;
|
|
|
|
document.documentElement.scrollTop = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
function imgFade(obj) {
|
2023-03-01 23:29:34 +00:00
|
|
|
$(obj).animate({opacity: 1}, 250);
|
2023-01-26 14:43:08 +00:00
|
|
|
}
|
|
|
|
|
2023-01-26 16:55:42 +00:00
|
|
|
var times = document.getElementsByClassName('time');
|
|
|
|
for (var i = 0; i < times.length; i++) {
|
|
|
|
var time = times[i].innerHTML;
|
|
|
|
var date = new Date(time);
|
2023-01-31 17:32:22 +00:00
|
|
|
times[i].innerHTML = date.toLocaleString('en-GB');
|
2023-01-26 16:55:42 +00:00
|
|
|
}
|