Initial ttvfx.com site: Next.js static export

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
twotalesanimation
2026-10-05 18:17:41 +02:00
commit 1f3af8f7f5
33 changed files with 8003 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
"use client";
import { useEffect, useRef, type ReactNode } from "react";
export default function Reveal({
children,
delay = 0,
className = "",
}: {
children: ReactNode;
delay?: number;
className?: string;
}) {
const ref = useRef<HTMLDivElement>(null);
useEffect(() => {
const el = ref.current;
if (!el) return;
const io = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
el.classList.add("is-visible");
io.disconnect();
}
},
{ rootMargin: "0px 0px -10% 0px" },
);
io.observe(el);
return () => io.disconnect();
}, []);
return (
<div ref={ref} className={`reveal ${className}`} style={{ transitionDelay: `${delay}ms` }}>
{children}
</div>
);
}