main: Updated site
All checks were successful
OnPush / CheckFiles (push) Successful in 8s

This commit is contained in:
2023-07-27 21:44:36 +10:00
parent f026612db2
commit 10e3699981
11 changed files with 1940 additions and 18 deletions

View File

@@ -35,9 +35,9 @@
}
};
// Collapse now if page is not at top
collapseNavbar();
// collapseNavbar();
// Collapse the navbar when page is scrolled
document.addEventListener("scroll", collapseNavbar);
// document.addEventListener("scroll", collapseNavbar);
// Hide navbar when modals trigger
var modals = document.querySelectorAll('.portfolio-modal');

19
assets/js/bs-init.js Normal file
View File

@@ -0,0 +1,19 @@
if (window.innerWidth < 768) {
[].slice.call(document.querySelectorAll('[data-bss-disabled-mobile]')).forEach(function (elem) {
elem.classList.remove('animated');
elem.removeAttribute('data-bss-hover-animate');
elem.removeAttribute('data-aos');
elem.removeAttribute('data-bss-parallax-bg');
elem.removeAttribute('data-bss-scroll-zoom');
});
}
document.addEventListener('DOMContentLoaded', function() {
var hoverAnimationTriggerList = [].slice.call(document.querySelectorAll('[data-bss-hover-animate]'));
var hoverAnimationList = hoverAnimationTriggerList.forEach(function (hoverAnimationEl) {
hoverAnimationEl.addEventListener('mouseenter', function(e){ e.target.classList.add('animated', e.target.dataset.bssHoverAnimate) });
hoverAnimationEl.addEventListener('mouseleave', function(e){ e.target.classList.remove('animated', e.target.dataset.bssHoverAnimate) });
});
}, false);

84
assets/js/hacker.js Normal file
View File

@@ -0,0 +1,84 @@
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ/.?!@#$%^&*()_+";
let interval = null;
let interval2 = null;
let interval3 = null;
window.onload = (event) => {
target = document.querySelector(".nathanwoodburn");
let iteration = 0;
let final = "NATHAN.WOODBURN/";
clearInterval(interval);
interval = setInterval(() => {
target.innerText = target.innerText
.split("")
.map((letter, index) => {
if(index < iteration) {
return final[index];
}
return letters[Math.floor(Math.random() * 41)]
})
.join("");
if(iteration >= final.length){
clearInterval(interval);
}
iteration += 1 / 3;
}, 30);
};
document.querySelector(".copyright").onmouseover = event => {
let iteration2 = 0;
let old2 = "Copyright © Nathan Woodburn 2023";
console.log(old2);
clearInterval(interval2);
interval2 = setInterval(() => {
event.target.innerText = event.target.innerText
.split("")
.map((letter, index2) => {
if(index2 < iteration2) {
return old2[index2];
}
return letters[Math.floor(Math.random() * 41)]
})
.join("");
if(iteration2 >= old2.length){
clearInterval(interval2);
}
iteration2 += 1/3;
}, 10);
}
// document.querySelector(".hacker3").onmouseover = event => {
// let iteration3 = 0;
// let old3 = event.target.innerText;
// console.log(old3);
// clearInterval(interval3);
// interval3 = setInterval(() => {
// event.target.innerText = event.target.innerText
// .split("")
// .map((letter, index3) => {
// if(index3 < iteration3) {
// return old3[index3];
// }
// return letters[Math.floor(Math.random() * 41)]
// })
// .join("");
// if(iteration3 >= old3.length){
// clearInterval(interval3);
// }
// iteration3 += 1 / 3;
// }, 10);
// }