diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 15aa041..590b13d 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/Caddyfile b/Caddyfile index 4f77dbe..16d578b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -306,12 +306,12 @@ mcassets.matdoes.dev { www.www.matdoes.dev { header { - Content-Type text/html - Server "meow" - } + Content-Type text/html + Server "meow" + } respond "nyaaaaaaaaaaaaaaaaaaa" 200 } www.matdoes.dev { redir https://matdoes.dev{uri} -} \ No newline at end of file +} diff --git a/src/routes/(main)/projects/+page.svelte b/src/routes/(main)/projects/+page.svelte index 900cd40..a0e54c4 100644 --- a/src/routes/(main)/projects/+page.svelte +++ b/src/routes/(main)/projects/+page.svelte @@ -8,8 +8,25 @@ onMount(() => { document.documentElement.style.setProperty('--project-height', `${window.innerHeight}px`) }) + + // the timestamp for when we were last at scroll == 0 + let timestampAtLastTop = 0 + + function onScroll() { + const isAtTop = window.scrollY === 0 + const isAtBottom = window.innerHeight + window.scrollY >= document.body.offsetHeight + + if (isAtTop) { + timestampAtLastTop = Date.now() + } else if (isAtBottom && Date.now() - timestampAtLastTop > 1000) { + // this means we scrolled to the bottom in less than a second, do shake effect + document.body.classList.add('shake1') + } + } + +