coloring
All checks were successful
deploy to production / deploy (push) Successful in 42s

This commit is contained in:
2023-12-07 20:24:09 +00:00
parent f85efb3c38
commit fd5af432db
52 changed files with 638 additions and 328 deletions

View File

@@ -10,30 +10,40 @@
}
const jumpDown = () => {
// Jump down by 100vh
window.scrollTo({ top: window.innerHeight, behavior: "smooth" })
if (typeof window !== "undefined") {
// Jump down by 100vh
window.scrollTo({ top: window.innerHeight, behavior: "smooth" })
}
}
onMount(() => {
// Attach scroll event listener when component is mounted
window.addEventListener("scroll", checkScroll)
if (typeof window !== "undefined") {
// Attach scroll event listener when component is mounted
window.addEventListener("scroll", checkScroll)
}
})
onDestroy(() => {
// Remove scroll event listener when component is destroyed
window.removeEventListener("scroll", checkScroll)
if (typeof window !== "undefined") {
// Remove scroll event listener when component is destroyed
window.removeEventListener("scroll", checkScroll)
}
})
let force = true
setInterval(() => {
if (location.pathname != "/") {
force = false
} else force = true
}, 1000)
$: {
if ($rerender) {
if (typeof window !== "undefined") {
setInterval(() => {
if (location.pathname != "/") {
force = false
} else force = true
}, 1000)
}
$: {
if (typeof window !== "undefined") {
if ($rerender) {
if (location.pathname != "/") {
force = false
} else force = true
}
}
}
</script>