commit
275d6f22f8
2
dist/js/main.js
vendored
2
dist/js/main.js
vendored
@ -1 +1 @@
|
|||||||
const scrollLimit=150;window.onscroll=()=>{document.body.scrollTop>=150||document.documentElement.scrollTop>=150?document.querySelector("nav").classList.add("scrolled"):document.querySelector("nav").classList.remove("scrolled");let e="";document.querySelectorAll("section").forEach((t=>{const o=t.offsetTop;window.pageYOffset>=o-60&&(e=t.getAttribute("id"))})),document.querySelectorAll("nav ul li a").forEach((t=>{t.classList.remove("active"),t.href.includes(e)&&""!==e?t.classList.add("active"):""===e&&document.querySelector("nav ul li a").classList.add("active")}))},document.addEventListener("DOMContentLoaded",(()=>{var e=["full stack developer","web designer","student","gamer","drummer"];function t(e,o,n){o<e.length?(document.querySelector("header div h1").innerHTML=e.substring(0,o+1)+'<span aria-hidden="true">_</span>',setTimeout((function(){t(e,o+1,n)}),100)):"function"==typeof n&&setTimeout(n,700)}!function o(n){void 0===e[n]?setTimeout((function(){o(0)}),1e3):n<e[n].length&&t(e[n],0,(function(){o(n+1)}))}(0)}));
|
const scrollLimit=150;window.onscroll=()=>{document.body.scrollTop>=150||document.documentElement.scrollTop>=150?document.querySelector("nav").classList.add("scrolled"):document.querySelector("nav").classList.remove("scrolled");let e="";document.querySelectorAll("section").forEach((t=>{const o=t.offsetTop;window.pageYOffset>=o-60&&(e=t.getAttribute("id"))})),document.querySelectorAll("nav ul li a").forEach((t=>{t.classList.remove("active"),t.href.includes(e)&&""!==e?t.classList.add("active"):""===e&&document.querySelector("nav ul li a").classList.add("active")}))},document.addEventListener("DOMContentLoaded",(()=>{var e=["full stack developer","web designer","student","gamer","drummer"];function t(e,o,n){o<e.length?(document.querySelector("header div h1").innerHTML=e.substring(0,o+1)+'<span aria-hidden="true">_</span>',setTimeout((function(){t(e,o+1,n)}),100)):"function"==typeof n&&setTimeout(n,700)}!function o(n){void 0===e[n]?setTimeout((function(){o(0)}),1e3):n<e[n].length&&t(e[n],0,(function(){setTimeout(o,1500,n+1)}))}(0)}));
|
@ -68,14 +68,14 @@ document.addEventListener('DOMContentLoaded', () =>
|
|||||||
if (typeof dataText[i] === 'undefined'){
|
if (typeof dataText[i] === 'undefined'){
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
StartTextAnimation(0);
|
StartTextAnimation(0);
|
||||||
}, 1000);
|
}, 1500);
|
||||||
// StartTextAnimation(0);
|
// StartTextAnimation(0);
|
||||||
}
|
}
|
||||||
else if (i < dataText[i].length) {
|
else if (i < dataText[i].length) {
|
||||||
// text exists! start typewriter animation
|
// text exists! start typewriter animation
|
||||||
typeWriter(dataText[i], 0, function(){
|
typeWriter(dataText[i], 0, function(){
|
||||||
// after callback (and whole text has been animated), start next text
|
// after callback (and whole text has been animated), start next text
|
||||||
StartTextAnimation(i + 1);
|
setTimeout(StartTextAnimation, 1500, i + 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user