"use client"; import Link from "next/link"; import gsap from "gsap"; import { useGsapAnimation } from "./useGsapAnimation"; export default function HeroSection() { const ref = useGsapAnimation((scope, isReduced) => { if (isReduced) return; const tl = gsap.timeline({ delay: 0.2 }); tl.from(".hero-subtitle", { y: 20, opacity: 0, duration: 0.6, ease: "power3.out" }); const heading = scope.querySelector("[data-heading]"); if (heading) { const spans = heading.querySelectorAll(".hero-char"); tl.from( spans, { y: 40, opacity: 0, filter: "blur(6px)", duration: 0.6, stagger: 0.035, ease: "power3.out", }, "-=0.3" ); } tl.from(".hero-desc", { y: 20, opacity: 0, duration: 0.6, ease: "power3.out" }, "-=0.3"); tl.from(".hero-btn", { y: 15, opacity: 0, duration: 0.5, stagger: 0.1, ease: "power3.out" }, "-=0.3"); tl.from(".hero-divider", { scaleX: 0, opacity: 0, duration: 0.8, ease: "power2.inOut" }); }, []); // 逐字拆分标题 const headingChars = (text: string) => [...text].map((char, i) => ( {char} )); return (
} className="px-page max-w-5xl mx-auto pt-20 pb-16 md:pt-28 md:pb-24">

一个来自于Sui的个人Blog

{headingChars("写字,")}
{/* 仅高亮关键词「思考」,避免整句赭红造成视觉重量过重 */} {headingChars("是一种 ")} {headingChars("思考")} {headingChars(" 的方式")}

这里记录着技术探索中的发现、旅途中的风景、阅读时的感悟,以及一个小镇青年创业路上的点点滴滴。

开始阅读 了解更多
{/* 装饰分隔线 */}
精选文章
); }