@@ -17,7 +17,6 @@ import topstats from "@/public/lower.svg";
1717import * as motion from "motion/react-client" ;
1818import AnimatedTitle from "@/components/AnimatedTitle" ;
1919
20-
2120interface GuidlinesCard {
2221 title : string ;
2322 description : string ;
@@ -27,32 +26,32 @@ interface GuidlinesCard {
2726
2827function GuidelinesCard ( { title, description, icon, index } : GuidlinesCard ) {
2928 // Define animation variants based on index
30- const animationVariants = {
31- hidden : { opacity : 0 , x : index % 2 === 0 ? - 50 : 50 } ,
32- visible : { opacity : 1 , x : 0 } ,
33- } ;
29+ const animationVariants = {
30+ hidden : { opacity : 0 , x : index % 2 === 0 ? - 50 : 50 } ,
31+ visible : { opacity : 1 , x : 0 } ,
32+ } ;
3433
35- return (
36- < motion . div
37- className = "card flex gap-4 items-start"
38- initial = "hidden"
39- whileInView = "visible"
40- viewport = { { once : true } }
41- transition = { { duration : 0.5 , delay : 0.2 } }
42- variants = { animationVariants }
43- >
44- < Image src = { icon } alt = "Icon" className = "xl:w-20 md:w-16 pt-1" />
45- < div className = "flex flex-col justify-center gap-2" >
46- < div className = "monitor:text-4xl xl:text-3xl lg:text-2xl text-xl text-white font-bold" >
47- { title }
48- </ div >
49- < div className = "text-base lg:text-base xl:text-lg monitor:text-xl font-normal text-supporting-darkGray md:max-w-64 lg:max-w-[500px] leading-[1.5rem]" >
50- { description }
51- </ div >
52- </ div >
53- </ motion . div >
54- ) ;
55- }
34+ return (
35+ < motion . div
36+ className = "card flex gap-4 items-start"
37+ initial = "hidden"
38+ whileInView = "visible"
39+ viewport = { { once : true } }
40+ transition = { { duration : 0.5 , delay : 0.2 } }
41+ variants = { animationVariants }
42+ >
43+ < Image src = { icon } alt = "Icon" className = "xl:w-20 md:w-16 pt-1" />
44+ < div className = "flex flex-col justify-center gap-2" >
45+ < div className = "monitor:text-4xl xl:text-3xl lg:text-2xl text-xl text-white font-bold" >
46+ { title }
47+ </ div >
48+ < div className = "text-base lg:text-base xl:text-lg monitor:text-xl font-normal text-supporting-darkGray md:max-w-64 lg:max-w-[500px] leading-[1.5rem]" >
49+ { description }
50+ </ div >
51+ </ div >
52+ </ motion . div >
53+ ) ;
54+ }
5655
5756export default function Home ( ) {
5857 const Guidelines = [
@@ -114,19 +113,15 @@ export default function Home() {
114113 < div className = "overflow-hidden" >
115114 < HeroSection />
116115 < div className = "sm:hidden w-screen mt-28" >
117- < Image
118- src = { bottomstats }
119- alt = "bottomstats"
120- className = "w-screen"
121- />
122- < Image
123- src = { topstats }
124- alt = "topstats"
125- className = "w-screen"
126- />
116+ < Image src = { bottomstats } alt = "bottomstats" className = "w-screen" />
117+ < Image src = { topstats } alt = "topstats" className = "w-screen" />
127118 </ div >
128119 < div className = "relative sm:mt-0 mt-28 sm:block hidden" >
129- < Image src = { stats } alt = "Stats" className = " md:w-full md:scale-125 lg:scale-100" />
120+ < Image
121+ src = { stats }
122+ alt = "Stats"
123+ className = " md:w-full md:scale-125 lg:scale-100"
124+ />
130125 < div className = "w-full flex justify-evenly rotate-[5deg] absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" >
131126 < div className = "max-w-[90px] md:max-w-[250px] text-center flex flex-col items-center gap-2 lg:gap-4" >
132127 < div className = "font-black text-xl md:text-4xl lg:text-6xl xl:text-7xl text-white" >
@@ -178,19 +173,25 @@ export default function Home() {
178173 { /* Why Participate */ }
179174 < div className = "flex flex-col items-center gap-4 md:gap-16 md:py-28 py-16" >
180175 < div className = " text-supporting-lightGray lg:text-5xl monitor:text-7xl xl:text-6xl md:text-4xl sm:text-2xl text-3xl xs:text-4xl font-bold leading-[48px] xs:leading-[64px] text-center" >
181- < AnimatedTitle > Why Participate in Hackbyte 3.0?</ AnimatedTitle >
176+ < AnimatedTitle viewport = { true } >
177+ Why Participate in Hackbyte 3.0?
178+ </ AnimatedTitle >
182179 </ div >
183- < Image
184- src = { whyParticipate }
185- alt = "Why Participate"
186- className = "monitor:w-[900px] xl:w-[800px] lg:w-[700px] md:w-[500px] w-[350px] pt-4 md:pt-0 px-2 xs:px-0"
187- />
180+ < AnimatedTitle viewport = { true } >
181+ < Image
182+ src = { whyParticipate }
183+ alt = "Why Participate"
184+ className = "monitor:w-[900px] xl:w-[800px] lg:w-[700px] md:w-[500px] w-[350px] pt-4 md:pt-0 px-2 xs:px-0"
185+ />
186+ </ AnimatedTitle >
188187 </ div >
189188
190189 { /* Guidelines */ }
191190 < div className = "flex flex-col items-center gap-4 md:gap-16" >
192191 < div className = " text-supporting-lightGray lg:text-5xl monitor:text-7xl xl:text-6xl md:text-4xl text-center text-3xl xs:text-2xl font-bold leading-[48px] xs:leading-[64px]" >
193- < AnimatedTitle > Guidelines for Hackbyte 3.0</ AnimatedTitle >
192+ < AnimatedTitle viewport = { true } >
193+ Guidelines for Hackbyte 3.0
194+ </ AnimatedTitle >
194195 </ div >
195196 < div className = "w-full grid md:grid-cols-2 grid-cols-1 gap-y-20 xl:gap-x-28 lg:gap-x-16 gap-x-4 py-8 md:py-16 xl:px-28 lg:px-16 px-4 monitor:place-items-center" >
196197 { Guidelines . map ( ( item , index ) => (
@@ -207,7 +208,7 @@ export default function Home() {
207208
208209 < div className = "flex flex-col items-center gap-4 md:gap-16 pt-4 lg:pt-8 xl:pb-12 pb-8 md:pb-16" >
209210 < div className = " text-supporting-lightGray lg:text-5xl monitor:text-7xl xl:text-6xl md:text-4xl text-2xl font-bold leading-[64px] pb-4 md:pb-8 lg:pb-16" >
210- < AnimatedTitle > Join our Newsletter</ AnimatedTitle >
211+ < AnimatedTitle viewport = { true } > Join our Newsletter</ AnimatedTitle >
211212 </ div >
212213 < Newsletter />
213214 </ div >
0 commit comments