hero page background

This commit is contained in:
T-A-H-prog
2026-03-05 22:42:13 +01:00
parent c94d608141
commit 17975124d4
9 changed files with 100 additions and 80 deletions

View File

@@ -1,40 +1,5 @@
<script setup>
import { ref, onMounted, onUnmounted } from "vue"
import gsap from "gsap"
import ScrollTrigger from "gsap/ScrollTrigger"
gsap.registerPlugin(ScrollTrigger)
const section = ref(null)
let ctx
onMounted(() => {
ctx = gsap.context(() => {
gsap.from(".fade-text", {
opacity: 0,
y: 50,
duration: 1,
scrollTrigger: {
trigger: section.value,
start: "top 70%"
}
})
gsap.to(".highlight", {
backgroundSize: "100% 100%",
scrollTrigger: {
trigger: ".highlight",
start: "top 80%",
end: "top 50%",
scrub: true
}
})
}, section)
})
onUnmounted(() => ctx.revert())
</script>
<template>