texte und scroll fix

This commit is contained in:
T-A-H-prog
2026-08-12 22:48:16 +02:00
parent 0216885738
commit 2830b4173a
4 changed files with 79 additions and 64 deletions

View File

@@ -2,21 +2,31 @@
import Main from "../components/slim/Main.vue";
import AboutMe from "../components/slim/AboutMe.vue";
import { onMounted, nextTick } from "vue";
import { onMounted, onUnmounted, nextTick } from "vue";
import gsap from "gsap";
import ScrollTrigger from "gsap/ScrollTrigger";
import ScrollSmoother from "gsap/ScrollSmoother";
gsap.registerPlugin(ScrollSmoother);
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
let smoother: ScrollSmoother | null = null;
onMounted(async () => {
await nextTick();
ScrollSmoother.create({
smoother = ScrollSmoother.create({
wrapper: "#smooth-wrapper",
content: "#smooth-content",
smooth: 1.5,
effects: true,
});
ScrollTrigger.refresh();
});
onUnmounted(() => {
smoother?.kill();
smoother = null;
});
</script>