diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..889425e --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,21 @@ +import HeroSection from "@/components/HeroSection"; +import CurriculumSection from "@/components/CurriculumSection"; +import ScheduleSection from "@/components/ScheduleSection"; +import GallerySection from "@/components/GallerySection"; +import EventsSection from "@/components/EventsSection"; +import FAQSection from "@/components/FAQSection"; +import AboutUsSection from "@/components/AboutUsSection"; + +export default function Home() { + return ( +
+ + + + + + + +
+ ); +} diff --git a/components/GallerySection.tsx b/components/GallerySection.tsx new file mode 100644 index 0000000..1e3a886 --- /dev/null +++ b/components/GallerySection.tsx @@ -0,0 +1,381 @@ +"use client"; + +import React, { useState, useEffect, useRef } from "react"; +import { motion, AnimatePresence } from "framer-motion"; + +interface GalleryPhoto { + id: string; + imageSrc: string; + title: string; + caption: string; + frameSrc: string; + width: number; + height: number; + top: string; + left: string; + floatDuration: number; + rotationDrift: number; + isCenterpiece?: boolean; +} + +const GALLERY_ITEMS: GalleryPhoto[] = [ + // Top Row (mirroring Sirius, Umbridge/McGonagall, Bellatrix) + { + id: "mem-1", + imageSrc: "/gallery/event-1.jpg", + title: "The Gathering", + caption: "Attendees kicking off the day at WCE.", + frameSrc: "/frames/frame-square.png", + width: 230, + height: 290, + top: "3%", + left: "7%", + floatDuration: 6.2, + rotationDrift: 1.8, + }, + { + id: "mem-2", + imageSrc: "/gallery/event-2.jpg", + title: "Microservices Workshop", + caption: "Hands-on microservice architectures and deployments.", + frameSrc: "/frames/frame-oval.png", + width: 240, + height: 290, + top: "2%", + left: "40%", + floatDuration: 7.8, + rotationDrift: -1.5, + }, + { + id: "mem-3", + imageSrc: "/gallery/event-3.jpg", + title: "Git & GitHub Labs", + caption: "Demystifying commits, branching, and interactive rebasing.", + frameSrc: "/frames/frame-gothic.png", + width: 230, + height: 290, + top: "4%", + left: "73%", + floatDuration: 6.8, + rotationDrift: 2.0, + }, + + // Middle Tier (mirroring Lucius, Grand Centerpiece Dumbledore, Snape) + { + id: "mem-4", + imageSrc: "/gallery/event-4.jpg", + title: "Terminal Sorcery", + caption: "Late afternoon problem solving and mentoring.", + frameSrc: "/frames/frame-square.png", + width: 240, + height: 300, + top: "34%", + left: "13%", + floatDuration: 5.9, + rotationDrift: -1.9, + }, + { + id: "mem-5", + imageSrc: "/gallery/event-5.jpg", + title: "The Grand Assembly", + caption: "The keynote hall alive with open source passion and energy.", + frameSrc: "/frames/frame-gothic.png", + width: 295, + height: 380, + top: "26%", + left: "38%", + floatDuration: 8.4, + rotationDrift: 1.2, + isCenterpiece: true, + }, + { + id: "mem-6", + imageSrc: "/gallery/event-6.jpg", + title: "Code & Collaboration", + caption: "Peer programming, architecture debates, and lightning hacks.", + frameSrc: "/frames/frame-square.png", + width: 240, + height: 300, + top: "33%", + left: "69%", + floatDuration: 6.6, + rotationDrift: 1.7, + }, + + // Bottom Row (mirroring Hagrid, Hedwig/Rita, Lockhart) + { + id: "mem-7", + imageSrc: "/gallery/event-7.jpg", + title: "The Mentorship Circle", + caption: "Senior engineers guiding newcomers through their first contributions.", + frameSrc: "/frames/frame-square.png", + width: 250, + height: 310, + top: "66%", + left: "9%", + floatDuration: 6.4, + rotationDrift: 2.1, + }, + { + id: "mem-8", + imageSrc: "/gallery/event-8.jpg", + title: "Open Source Odyssey", + caption: "Exploring distributed systems and real-world Linux tools.", + frameSrc: "/frames/frame-oval.png", + width: 235, + height: 290, + top: "68%", + left: "40.5%", + floatDuration: 7.4, + rotationDrift: -1.6, + }, + { + id: "mem-9", + imageSrc: "/gallery/event-9.jpg", + title: "The Finale", + caption: "Certificates, swags, and closing open source celebrations.", + frameSrc: "/frames/frame-gothic.png", + width: 240, + height: 300, + top: "65%", + left: "72%", + floatDuration: 6.9, + rotationDrift: -1.8, + }, +]; + +const slideVariants = { + enter: (direction: number) => ({ + x: direction > 0 ? 320 : -320, + opacity: 0, + scale: 0.9, + }), + center: { + x: 0, + opacity: 1, + scale: 1, + transition: { + x: { type: "spring", stiffness: 300, damping: 30 }, + opacity: { duration: 0.2 }, + }, + }, + exit: (direction: number) => ({ + x: direction < 0 ? 320 : -320, + opacity: 0, + scale: 0.9, + transition: { + x: { type: "spring", stiffness: 300, damping: 30 }, + opacity: { duration: 0.2 }, + }, + }), +}; + +export default function GallerySection() { + const containerRef = useRef(null); + const [selectedIndex, setSelectedIndex] = useState(null); + const [direction, setDirection] = useState(0); + + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (selectedIndex === null) return; + if (e.key === "Escape") setSelectedIndex(null); + if (e.key === "ArrowRight") paginate(1); + if (e.key === "ArrowLeft") paginate(-1); + }; + window.addEventListener("keydown", handleKeyDown); + return () => window.removeEventListener("keydown", handleKeyDown); + }, [selectedIndex]); + + const paginate = (newDirection: number) => { + if (selectedIndex === null) return; + setDirection(newDirection); + setSelectedIndex((prev) => { + if (prev === null) return 0; + const next = prev + newDirection; + if (next < 0) return GALLERY_ITEMS.length - 1; + if (next >= GALLERY_ITEMS.length) return 0; + return next; + }); + }; + + return ( + + ); +} diff --git a/frontend/index.html b/frontend/index.html index 13ae1b3..fb5c0f2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -61,6 +61,7 @@