From 249da503355b763ff1a564e1b341f6c47ff34fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Fri, 13 Feb 2026 14:03:07 +0800 Subject: [PATCH] feat: integrate enhanced seal animation in hero section --- src/components/sections/hero-section.tsx | 265 ++++++++++++++++------- 1 file changed, 183 insertions(+), 82 deletions(-) diff --git a/src/components/sections/hero-section.tsx b/src/components/sections/hero-section.tsx index 516d725..c7b1555 100644 --- a/src/components/sections/hero-section.tsx +++ b/src/components/sections/hero-section.tsx @@ -1,11 +1,53 @@ 'use client'; -import { motion } from 'framer-motion'; -import { Button } from '@/components/ui/button'; +import { useEffect, useRef, useState } from 'react'; +import { CTAButton } from '@/components/ui/cta-button'; +import { AnimatedNumber } from '@/components/ui/animated-number'; +import { SealParticle } from '@/components/effects/seal-particle'; +import { SealAnimationEnhanced } from '@/components/effects/seal-animation-enhanced'; +import { StampAnimation } from '@/components/effects/stamp-animation'; import { COMPANY_INFO, STATS } from '@/lib/constants'; -import { ArrowRight } from 'lucide-react'; +import { ArrowRight, Sparkles } from 'lucide-react'; export function HeroSection() { + const [isVisible, setIsVisible] = useState(false); + const sectionRef = useRef(null); + const statsRef = useRef(null); + const [statsVisible, setStatsVisible] = useState(false); + + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setIsVisible(true); + } + }, + { threshold: 0.1 } + ); + + if (sectionRef.current) { + observer.observe(sectionRef.current); + } + + return () => observer.disconnect(); + }, []); + + useEffect(() => { + if (!statsRef.current) return; + + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setStatsVisible(true); + } + }, + { threshold: 0.5 } + ); + + observer.observe(statsRef.current); + return () => observer.disconnect(); + }, []); + const handleScrollTo = (id: string) => { const element = document.getElementById(id); if (element) { @@ -14,110 +56,169 @@ export function HeroSection() { }; return ( -
- {/* Background Gradient */} -
- - {/* Decorative Elements */} -
-
+
+ - {/* Content */} -
-
- {/* Badge */} - + console.log('Animation stage:', stage)} + className="opacity-80" + /> +
+ +
+
+
+
+ +
+
+
-
- - - - - - 专业科技服务提供商 +
+ +
+
+
+
+ + + 印章文化 × 现代科技
- +
- {/* Main Title */} - - {COMPANY_INFO.name} - + + {COMPANY_INFO.name} + + - {/* Slogan */} - - {COMPANY_INFO.slogan} - + {COMPANY_INFO.slogan.split(',')[0]} + ,{COMPANY_INFO.slogan.split(',')[1]} +

- {/* Description */} - {COMPANY_INFO.description} - +

- {/* CTA Buttons */} - - - - + +
- {/* Stats */} - - {STATS.map((stat, index) => ( - -
{stat.value}
-
{stat.label}
-
- ))} -
+
+ {STATS.map((stat, index) => ( + + ))} +
+
+ +
+
); } + +function StatItem({ stat, index, shouldAnimate }: { + stat: { value: string; label: string }; + index: number; + shouldAnimate: boolean; +}) { + const numericValue = parseInt(stat.value.replace(/\D/g, '')); + const suffix = stat.value.replace(/[\d]/g, ''); + + return ( +
+
+ +
+
+ {stat.label} +
+
+ ); +}