fix cv animations

This commit is contained in:
2026-06-18 01:41:25 +02:00
parent 3e5be46503
commit 0d79adb104
15 changed files with 606 additions and 724 deletions

View File

@@ -1,3 +1,4 @@
"use client"
import { useRef, type HTMLAttributes, type ReactNode } from "react";
import { SplitText } from "gsap/SplitText";
import gsap from 'gsap'
@@ -11,6 +12,7 @@ const AnimateTextIn = ({
speed = 1,
scrollOnly = false,
once = false,
debugId,
className
}: {
children: ReactNode,
@@ -18,6 +20,7 @@ const AnimateTextIn = ({
position?: gsap.Position,
scrollOnly?: boolean,
once?: boolean,
debugId?: string,
speed?: number,
className?: HTMLAttributes<HTMLDivElement>['className']
}) => {
@@ -26,7 +29,7 @@ const AnimateTextIn = ({
position,
scrollOnly,
once,
debugId: `text-${position}`,
debugId: debugId ?? `text-${position}`,
makeReveal: (node) => {
// The wrapper starts at opacity 0 (so there's no flash of unsplit text);
// reveal the wrapper and let the per-character tween do the animation.