diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f8e65be..9b4bb27 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -18,13 +18,16 @@ { title: 'FAQ', url: '#faq', hidden: true } ]; + const homepageAnimation = () => { + const collection = document.getElementsByClassName('animation-crypt') + for (const el of collection) { + animateText({ target: el }) + } + } + onMount(async () => { - setTimeout(() => { - const collection = document.getElementsByClassName('animation-crypt') - for (const el of collection) { - animateText({ target: el }) - } - }, 0) + setTimeout(homepageAnimation, 0) + //setInterval(homepageAnimation, 5000) let lastScrollTop = null @@ -83,7 +86,7 @@ {#if navbar}