diff --git a/src/components/landing-page/(AboutSectionComponents)/FlyingHusky.tsx b/src/components/landing-page/(AboutSectionComponents)/FlyingHusky.tsx index 990ba605..5154a17f 100644 --- a/src/components/landing-page/(AboutSectionComponents)/FlyingHusky.tsx +++ b/src/components/landing-page/(AboutSectionComponents)/FlyingHusky.tsx @@ -15,8 +15,8 @@ export default function FlyingHusky() { }); gsap.to(".flyingHusky", { - delay: 0.8, - duration: 1.5, + delay: 0.3, + duration: 1.2, x: 0, y: 0, rotation: 0, @@ -27,20 +27,20 @@ export default function FlyingHusky() { { x: "-80vw", y: "40vh", rotation: "-20deg", scale: 0.75 }, { x: "-40vw", y: "-30vh", rotation: "10deg", scale: 0.85 }, { x: "-20vw", y: "-20vh", rotation: "5deg", scale: 0.9 }, - { x: "-10vw", y: "-10vh", rotation: 0, scale: 0.95 }, - { x: 0, y: 0, rotation: 0, scale: 1 }, + { x: "-10vw", y: "-10vh", rotation: "0deg", scale: 0.95 }, + { x: 0, y: 0, rotation: "0deg", scale: 1 }, ], curviness: 1.5, autoRotate: true, }, scrollTrigger: { - trigger: ".aboutSectionContainer", - start: "top 80%", + trigger: "#aboutPanel", + start: "30% 80%", }, }); gsap.to(".flyingHusky", { - delay: 2, + delay: 1.35, repeat: -1, duration: 2.25, ease: "linear", diff --git a/src/components/landing-page/(AboutSectionComponents)/FunFacts/FunFact.tsx b/src/components/landing-page/(AboutSectionComponents)/FunFacts/FunFact.tsx index 79bd2773..0272e71b 100644 --- a/src/components/landing-page/(AboutSectionComponents)/FunFacts/FunFact.tsx +++ b/src/components/landing-page/(AboutSectionComponents)/FunFacts/FunFact.tsx @@ -15,14 +15,14 @@ export default function FunFact({ src, alt }: FunFactProps) { gsap.set(".funFact", { scale: 0, rotate: 0 }); gsap.to(".funFact", { - delay: 0.7, + delay: 0.2, stagger: 0.2, duration: 0.35, ease: "bounce", scale: 1, scrollTrigger: { trigger: "#funFactsContainer", - start: "65% 90%", + start: "30% 80%", }, }); }, []); diff --git a/src/components/landing-page/(AboutSectionComponents)/Panel/Content.tsx b/src/components/landing-page/(AboutSectionComponents)/Panel/Content.tsx index cffdc22f..3536a195 100644 --- a/src/components/landing-page/(AboutSectionComponents)/Panel/Content.tsx +++ b/src/components/landing-page/(AboutSectionComponents)/Panel/Content.tsx @@ -6,35 +6,38 @@ import ScrollTrigger from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); type PanelContentProps = { + parentPanelId: string; children: React.ReactNode; className?: string; }; export default function PanelContent({ + parentPanelId, children, className, }: PanelContentProps) { const panelContentRef = useRef(null); useEffect(() => { - if (!panelContentRef) return; + if (!panelContentRef.current) return; const panelContent = panelContentRef.current; gsap.set(panelContent, { scale: 0.1, opacity: 0 }); gsap.to(panelContent, { - delay: 0.4, + delay: 0.3, scale: 1, opacity: 1, - duration: 0.3, - ease: "power2.in", + duration: 0.2, + ease: "expo.out", scrollTrigger: { - trigger: panelContent, - start: "70% 90%", + trigger: `#${parentPanelId}`, + start: "30% 80%", }, }); - }, []); + // parentPanelId only passed into dependency array to satisfy ESLint. value of parentPanelId will never be changed within this component + }, [parentPanelId]); return (
diff --git a/src/components/landing-page/(AboutSectionComponents)/Panel/Header.tsx b/src/components/landing-page/(AboutSectionComponents)/Panel/Header.tsx index 957fb2af..e914402e 100644 --- a/src/components/landing-page/(AboutSectionComponents)/Panel/Header.tsx +++ b/src/components/landing-page/(AboutSectionComponents)/Panel/Header.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useEffect } from "react"; +import React, { useEffect, useRef } from "react"; import clsx from "clsx"; import { twMerge } from "tailwind-merge"; import gsap from "gsap"; @@ -7,6 +7,7 @@ import { ScrollTrigger } from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); type PanelHeaderProps = { + parentPanelId: string; children: React.ReactNode; isSectionHeader?: boolean; className?: string; @@ -14,6 +15,7 @@ type PanelHeaderProps = { }; export default function PanelHeader({ + parentPanelId, children, isSectionHeader = false, className, @@ -22,29 +24,23 @@ export default function PanelHeader({ const headerRef = useRef(null); useEffect(() => { - const header = headerRef.current; + if (!headerRef.current) return; - if (header) { - gsap.set(header, { y: "-100%" }); + const header = headerRef.current; - const animation = gsap.to(header, { - duration: 0.4, - ease: "power2.out", - y: 0, - scrollTrigger: { - trigger: header, - start: "bottom 65%", - }, - }); + gsap.set(header, { y: "-100%" }); - return () => { - if (animation.scrollTrigger) { - animation.scrollTrigger.kill(); - } - animation.kill(); - }; - } - }, []); + gsap.to(header, { + duration: 0.2, + ease: "expo.out", + y: 0, + scrollTrigger: { + trigger: `#${parentPanelId}`, + start: "30% 80%", + }, + }); + // parentPanelId only passed into dependency array to satisfy ESLint. value of parentPanelId will never be changed within this component + }, [parentPanelId]); const props = { ref: headerRef, diff --git a/src/components/landing-page/(AboutSectionComponents)/Panel/Panel.tsx b/src/components/landing-page/(AboutSectionComponents)/Panel/Panel.tsx index 8c2a7b21..46d20916 100644 --- a/src/components/landing-page/(AboutSectionComponents)/Panel/Panel.tsx +++ b/src/components/landing-page/(AboutSectionComponents)/Panel/Panel.tsx @@ -7,6 +7,7 @@ import { ScrollTrigger } from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); type PanelProps = { + id: string; children: React.ReactNode; className?: string; panelBackground?: string; @@ -15,6 +16,7 @@ type PanelProps = { export default function Panel({ children, + id, className = "", panelBackground, panelColor, @@ -33,6 +35,7 @@ export default function Panel({ return (
}> = ({
{/* UWBHacks About Container */} {/* UWBHacks About Section Header */} }> = ({ {/* UWBHacks About Section Content */} - + {/* UWBHacks About Section Description */} @@ -90,9 +92,13 @@ const AboutSection: React.FC<{ hackeroonPrizes: Promise }> = ({ {/* Previous UWBHacks Fun Statistics Container */} - +
@@ -124,16 +130,20 @@ const AboutSection: React.FC<{ hackeroonPrizes: Promise }> = ({ {/* UWB ACM Description Container */} {/* UWBHacks ACM Description Header */} - + UWB Association for Computing Machinery {/* UWB ACM Description Content */} - +

UWB ACM is a chapter of the Association of Computing @@ -169,13 +179,16 @@ const AboutSection: React.FC<{ hackeroonPrizes: Promise }> = ({

{/* Month of Hacking */} - Month of Hacking - + + Month of Hacking + +

In{" "} @@ -197,13 +210,19 @@ const AboutSection: React.FC<{ hackeroonPrizes: Promise }> = ({ - {/* Last Year's Prizes */} + {/* Last Year's Winners */} - Last Year's Projects - + + Last Year's Projects + + }> = ({ {/* Hackeroons */} - - Hackeroons + + + Hackeroons + - + {/* Hackeroon Prizes Carousel */} }> = ({ {/* Leaderboard */} - - Leaderboard - + + + Leaderboard + + {/* TODO: get top 3 hackathon participants with highest hackeroon count and use LeaderboardRecord to display */}

Coming soon! diff --git a/src/components/landing-page/MeetTheTeamSection.tsx b/src/components/landing-page/MeetTheTeamSection.tsx index 79be62fc..159ec9a6 100644 --- a/src/components/landing-page/MeetTheTeamSection.tsx +++ b/src/components/landing-page/MeetTheTeamSection.tsx @@ -20,16 +20,20 @@ const MeetTheTeamSection = () => { ); return ( - + {/* Heading */} Meet the League - + {/* Tabs */} { const panelMargin = "mt-12 md:mt-16"; return ( - + Schedule - + { const panelMargin = "mt-12 md:mt-16"; return ( - + UWB HACKS 2025 SPONSORS - + {/* Main sponsors row */}
diff --git a/src/components/landing-page/TrackSection.tsx b/src/components/landing-page/TrackSection.tsx index 09ececcd..44cb85db 100644 --- a/src/components/landing-page/TrackSection.tsx +++ b/src/components/landing-page/TrackSection.tsx @@ -33,20 +33,24 @@ const TracksSection = () => { }, [showTracks]); return ( - + Tracks - +