|
| 1 | +'use client'; |
| 2 | +import gsap from 'gsap'; |
| 3 | +import { useGSAP } from '@gsap/react'; |
| 4 | +import { useRef } from 'react'; |
| 5 | +import { BoundlessButton } from '@/components/buttons'; |
| 6 | +import { DottedUnderline } from '@/components/ui/dotted-underline'; |
| 7 | + |
| 8 | +export default function AboutUsHero() { |
| 9 | + const heroRef = useRef<HTMLDivElement>(null); |
| 10 | + const gridRef = useRef<HTMLDivElement>(null); |
| 11 | + const contentRef = useRef<HTMLDivElement>(null); |
| 12 | + |
| 13 | + useGSAP( |
| 14 | + () => { |
| 15 | + if (gridRef.current) { |
| 16 | + gsap.to(gridRef.current, { |
| 17 | + rotation: 5, |
| 18 | + duration: 15, |
| 19 | + ease: 'power2.inOut', |
| 20 | + yoyo: true, |
| 21 | + repeat: -1, |
| 22 | + }); |
| 23 | + |
| 24 | + gsap.to(gridRef.current, { |
| 25 | + scale: 1.02, |
| 26 | + duration: 8, |
| 27 | + ease: 'power2.inOut', |
| 28 | + yoyo: true, |
| 29 | + repeat: -1, |
| 30 | + }); |
| 31 | + |
| 32 | + gsap.to(gridRef.current, { |
| 33 | + opacity: 0.6, |
| 34 | + duration: 4, |
| 35 | + ease: 'power2.inOut', |
| 36 | + yoyo: true, |
| 37 | + repeat: -1, |
| 38 | + }); |
| 39 | + } |
| 40 | + |
| 41 | + if (contentRef.current) { |
| 42 | + const tl = gsap.timeline(); |
| 43 | + |
| 44 | + tl.fromTo( |
| 45 | + contentRef.current.querySelector('h1'), |
| 46 | + { y: 50, opacity: 0 }, |
| 47 | + { y: 0, opacity: 1, duration: 1, ease: 'power2.out' } |
| 48 | + ) |
| 49 | + .fromTo( |
| 50 | + contentRef.current.querySelector('p'), |
| 51 | + { y: 30, opacity: 0 }, |
| 52 | + { y: 0, opacity: 1, duration: 0.8, ease: 'power2.out' }, |
| 53 | + '-=0.5' |
| 54 | + ) |
| 55 | + .fromTo( |
| 56 | + contentRef.current.querySelector('.buttons'), |
| 57 | + { y: 30, opacity: 0 }, |
| 58 | + { y: 0, opacity: 1, duration: 0.8, ease: 'power2.out' }, |
| 59 | + '-=0.3' |
| 60 | + ); |
| 61 | + } |
| 62 | + }, |
| 63 | + { scope: heroRef } |
| 64 | + ); |
| 65 | + |
| 66 | + return ( |
| 67 | + <div |
| 68 | + ref={heroRef} |
| 69 | + className='relative min-h-screen flex items-center justify-center overflow-hidden bg-[#030303]' |
| 70 | + > |
| 71 | + <div |
| 72 | + ref={gridRef} |
| 73 | + className='absolute inset-0 w-full h-full' |
| 74 | + style={{ |
| 75 | + backgroundImage: 'url(/about-us-hero-bg.svg)', |
| 76 | + backgroundSize: 'cover', |
| 77 | + backgroundPosition: 'center', |
| 78 | + backgroundRepeat: 'no-repeat', |
| 79 | + opacity: 0.8, |
| 80 | + }} |
| 81 | + /> |
| 82 | + |
| 83 | + <div |
| 84 | + ref={contentRef} |
| 85 | + className='relative z-10 text-center max-w-[579px] mx-auto px-5' |
| 86 | + > |
| 87 | + <h1 className='text-white xl:text-[48px] lg:text-[32px] text-[30px] leading-[140%] font-bold mb-6'> |
| 88 | + Boundless is Where |
| 89 | + <br /> |
| 90 | + <span className='gradient-text font-medium'> |
| 91 | + Ideas meet Opportunity |
| 92 | + </span> |
| 93 | + </h1> |
| 94 | + |
| 95 | + <DottedUnderline className='w-full max-w-md mx-auto mb-7' /> |
| 96 | + |
| 97 | + <p |
| 98 | + className='xl:text-[16px] lg:text-[14px] text-[14px] leading-[150%] mb-7' |
| 99 | + style={{ |
| 100 | + background: 'linear-gradient(93deg, #B5B5B5 15.93%, #FFF 97.61%)', |
| 101 | + backgroundClip: 'text', |
| 102 | + WebkitBackgroundClip: 'text', |
| 103 | + WebkitTextFillColor: 'transparent', |
| 104 | + }} |
| 105 | + > |
| 106 | + We help innovators validate ideas, raise funds, and access grants & |
| 107 | + hackathons through milestone-based support powered by Stellar and |
| 108 | + Trustless Work. |
| 109 | + </p> |
| 110 | + |
| 111 | + <div className='buttons flex flex-col md:flex-row gap-4 justify-center items-center'> |
| 112 | + <BoundlessButton variant='default' size='lg'> |
| 113 | + Explore Projects |
| 114 | + </BoundlessButton> |
| 115 | + <BoundlessButton variant='secondary' size='lg'> |
| 116 | + Submit Your Idea |
| 117 | + </BoundlessButton> |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + </div> |
| 121 | + ); |
| 122 | +} |
0 commit comments