fix: various issues to reduce effect_update_depth_exceeded

+ use `scroll` from Motion One for parallax
This commit is contained in:
2024-08-05 15:35:08 +02:00
parent 2a29a32ff4
commit 1cc143ef27
9 changed files with 50 additions and 54 deletions

View File

@@ -35,7 +35,7 @@
let scrollY = $state<number>()
let innerWidth = $state<number>()
let innerHeight = $state<number>()
let titleEl = $state<HTMLElement>()
let titleEl: HTMLElement
// Check if title is larger than viewport to translate it
const isLarger = $derived<boolean>(titleEl && titleEl.offsetWidth >= innerWidth)