From f3e987356a7d9da779e1cbdc2eee1803e5ecd7a6 Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 7 Mar 2026 03:18:40 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 90 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 7 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 8b794f2..d687811 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,11 +8,86 @@ import FeatureHoverPattern from '@/components/sections/feature/featureHoverPatte import ProductCardFour from '@/components/sections/product/ProductCardFour'; import MetricCardTwo from '@/components/sections/metrics/MetricCardTwo'; import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen'; -import ContactCenter from '@/components/sections/contact/ContactCenter'; +import ContactCTA from '@/components/sections/contact/ContactCTA'; import FooterCard from '@/components/sections/footer/FooterCard'; -import { Sparkles, Award, Palette, Zap, Target, TrendingUp, MessageSquare, Dribbble, Linkedin, Twitter, Instagram } from 'lucide-react'; +import { Sparkles, Award, Palette, Zap, Target, TrendingUp, MessageSquare, Dribbble, Linkedin, Twitter, Instagram, Mail } from 'lucide-react'; +import gsap from 'gsap'; +import { useEffect, useRef } from 'react'; export default function LandingPage() { + const contactRef = useRef(null); + + useEffect(() => { + // Register ScrollTrigger plugin + const { ScrollTrigger } = require('gsap/ScrollTrigger'); + gsap.registerPlugin(ScrollTrigger); + + // Animate contact section on scroll + if (contactRef.current) { + const ctx = gsap.context(() => { + // Title animation + gsap.from('[data-contact-title]', { + scrollTrigger: { + trigger: contactRef.current, + start: 'top 60%', + end: 'top 30%', + scrub: 1, + markers: false, + }, + opacity: 0, + y: 50, + duration: 1, + }); + + // Description animation with stagger + gsap.from('[data-contact-description]', { + scrollTrigger: { + trigger: contactRef.current, + start: 'top 55%', + end: 'top 25%', + scrub: 1, + markers: false, + }, + opacity: 0, + y: 40, + duration: 1, + delay: 0.2, + }); + + // Button animation + gsap.from('[data-contact-button]', { + scrollTrigger: { + trigger: contactRef.current, + start: 'top 50%', + end: 'top 20%', + scrub: 1, + markers: false, + }, + opacity: 0, + scale: 0.8, + duration: 1, + delay: 0.4, + }); + + // Background animated elements + gsap.to('[data-contact-bg-element]', { + scrollTrigger: { + trigger: contactRef.current, + start: 'top center', + end: 'bottom center', + scrub: 2, + markers: false, + }, + rotation: 360, + duration: 20, + repeat: -1, + }); + }, contactRef); + + return () => ctx.revert(); + } + }, []); + return ( -
- +