@@ -576,7 +826,7 @@
Ask the crystal ball
alt=""
width="73"
height="120"
- />Stop 5: events
+ />Stop 6: events we conduct
The events we conduct
diff --git a/frontend/public/frames/frame-gothic.png b/frontend/public/frames/frame-gothic.png
new file mode 100644
index 0000000..6b2ec4e
Binary files /dev/null and b/frontend/public/frames/frame-gothic.png differ
diff --git a/frontend/public/frames/frame-gothic.png.png b/frontend/public/frames/frame-gothic.png.png
new file mode 100644
index 0000000..6b2ec4e
Binary files /dev/null and b/frontend/public/frames/frame-gothic.png.png differ
diff --git a/frontend/public/frames/frame-oval.png b/frontend/public/frames/frame-oval.png
new file mode 100644
index 0000000..7ae89f2
Binary files /dev/null and b/frontend/public/frames/frame-oval.png differ
diff --git a/frontend/public/frames/frame-oval.png.png b/frontend/public/frames/frame-oval.png.png
new file mode 100644
index 0000000..7ae89f2
Binary files /dev/null and b/frontend/public/frames/frame-oval.png.png differ
diff --git a/frontend/public/frames/frame-sqaure.png b/frontend/public/frames/frame-sqaure.png
new file mode 100644
index 0000000..d2c5e80
Binary files /dev/null and b/frontend/public/frames/frame-sqaure.png differ
diff --git a/frontend/public/frames/frame-sqaure.png.png b/frontend/public/frames/frame-sqaure.png.png
new file mode 100644
index 0000000..d2c5e80
Binary files /dev/null and b/frontend/public/frames/frame-sqaure.png.png differ
diff --git a/frontend/public/frames/frame-square.png b/frontend/public/frames/frame-square.png
new file mode 100644
index 0000000..d2c5e80
Binary files /dev/null and b/frontend/public/frames/frame-square.png differ
diff --git a/frontend/public/gallery/event-1.jpeg b/frontend/public/gallery/event-1.jpeg
new file mode 100644
index 0000000..f83bdbd
Binary files /dev/null and b/frontend/public/gallery/event-1.jpeg differ
diff --git a/frontend/public/gallery/event-1.jpg b/frontend/public/gallery/event-1.jpg
new file mode 100644
index 0000000..f83bdbd
Binary files /dev/null and b/frontend/public/gallery/event-1.jpg differ
diff --git a/frontend/public/gallery/event-2.jpeg b/frontend/public/gallery/event-2.jpeg
new file mode 100644
index 0000000..27244dc
Binary files /dev/null and b/frontend/public/gallery/event-2.jpeg differ
diff --git a/frontend/public/gallery/event-2.jpg b/frontend/public/gallery/event-2.jpg
new file mode 100644
index 0000000..27244dc
Binary files /dev/null and b/frontend/public/gallery/event-2.jpg differ
diff --git a/frontend/public/gallery/event-3.jpeg b/frontend/public/gallery/event-3.jpeg
new file mode 100644
index 0000000..57cdc58
Binary files /dev/null and b/frontend/public/gallery/event-3.jpeg differ
diff --git a/frontend/public/gallery/event-3.jpg b/frontend/public/gallery/event-3.jpg
new file mode 100644
index 0000000..57cdc58
Binary files /dev/null and b/frontend/public/gallery/event-3.jpg differ
diff --git a/frontend/public/gallery/event-4.jpeg b/frontend/public/gallery/event-4.jpeg
new file mode 100644
index 0000000..683d574
Binary files /dev/null and b/frontend/public/gallery/event-4.jpeg differ
diff --git a/frontend/public/gallery/event-4.jpg b/frontend/public/gallery/event-4.jpg
new file mode 100644
index 0000000..683d574
Binary files /dev/null and b/frontend/public/gallery/event-4.jpg differ
diff --git a/frontend/public/gallery/event-5.jpeg b/frontend/public/gallery/event-5.jpeg
new file mode 100644
index 0000000..a534304
Binary files /dev/null and b/frontend/public/gallery/event-5.jpeg differ
diff --git a/frontend/public/gallery/event-5.jpg b/frontend/public/gallery/event-5.jpg
new file mode 100644
index 0000000..a534304
Binary files /dev/null and b/frontend/public/gallery/event-5.jpg differ
diff --git a/frontend/public/gallery/event-6.jpeg b/frontend/public/gallery/event-6.jpeg
new file mode 100644
index 0000000..6e5c3cb
Binary files /dev/null and b/frontend/public/gallery/event-6.jpeg differ
diff --git a/frontend/public/gallery/event-6.jpg b/frontend/public/gallery/event-6.jpg
new file mode 100644
index 0000000..6e5c3cb
Binary files /dev/null and b/frontend/public/gallery/event-6.jpg differ
diff --git a/frontend/public/gallery/event-7.jpeg b/frontend/public/gallery/event-7.jpeg
new file mode 100644
index 0000000..90e7962
Binary files /dev/null and b/frontend/public/gallery/event-7.jpeg differ
diff --git a/frontend/public/gallery/event-7.jpg b/frontend/public/gallery/event-7.jpg
new file mode 100644
index 0000000..90e7962
Binary files /dev/null and b/frontend/public/gallery/event-7.jpg differ
diff --git a/frontend/public/gallery/event-8.jpeg b/frontend/public/gallery/event-8.jpeg
new file mode 100644
index 0000000..40553b9
Binary files /dev/null and b/frontend/public/gallery/event-8.jpeg differ
diff --git a/frontend/public/gallery/event-8.jpg b/frontend/public/gallery/event-8.jpg
new file mode 100644
index 0000000..40553b9
Binary files /dev/null and b/frontend/public/gallery/event-8.jpg differ
diff --git a/frontend/public/gallery/event-9.jpeg b/frontend/public/gallery/event-9.jpeg
new file mode 100644
index 0000000..6382bfb
Binary files /dev/null and b/frontend/public/gallery/event-9.jpeg differ
diff --git a/frontend/public/gallery/event-9.jpg b/frontend/public/gallery/event-9.jpg
new file mode 100644
index 0000000..6382bfb
Binary files /dev/null and b/frontend/public/gallery/event-9.jpg differ
diff --git a/frontend/src/components/GallerySection.tsx b/frontend/src/components/GallerySection.tsx
new file mode 100644
index 0000000..1e3a886
--- /dev/null
+++ b/frontend/src/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 (
+
+ {/* Background glow effects */}
+
+
+
+ {/* Section Header */}
+
+
+
+ Stop 3: Memory Lane
+
+
+ The Hall of Memories
+
+
+ Click any floating frame to view
+
+
+
+ {/* Salon Wall Floating Canvas */}
+
+ {GALLERY_ITEMS.map((item, index) => (
+
{
+ setDirection(0);
+ setSelectedIndex(index);
+ }}
+ style={{
+ position: "absolute",
+ top: item.top,
+ left: item.left,
+ width: item.width,
+ height: item.height,
+ zIndex: item.isCenterpiece ? 15 : 10,
+ }}
+ className="cursor-pointer flex items-center justify-center filter drop-shadow-[0_15px_30px_rgba(0,0,0,0.65)] hover:drop-shadow-[0_20px_40px_rgba(255,122,0,0.3)] transition-all"
+ >
+ {/* Inner Photo */}
+
+

+
+
+ {/* Clay Frame Overlay */}
+
+
+ ))}
+
+
+ {/* Lightbox Slider Modal */}
+
+ {selectedIndex !== null && (
+ setSelectedIndex(null)}
+ >
+ e.stopPropagation()}
+ >
+ {/* Close Button */}
+
+
+ {/* Slider Viewport with Fixed Frame */}
+
+ {/* Sliding Photo Mask */}
+
+
+ {
+ if (info.offset.x > 80) paginate(-1);
+ else if (info.offset.x < -80) paginate(1);
+ }}
+ className="w-full h-full object-cover cursor-grab active:cursor-grabbing"
+ />
+
+
+
+ {/* Frame Bezel */}
+

+
+ {/* Left/Right Controls */}
+
+
+
+
+ {/* Caption and Page Indicator */}
+
+
+ {GALLERY_ITEMS[selectedIndex].title}
+
+
+ {GALLERY_ITEMS[selectedIndex].caption}
+
+
+ {selectedIndex + 1} / {GALLERY_ITEMS.length}
+
+
+
+
+ )}
+
+
+ );
+}
diff --git a/frontend/src/scripts/gallery.js b/frontend/src/scripts/gallery.js
new file mode 100644
index 0000000..29dd05c
--- /dev/null
+++ b/frontend/src/scripts/gallery.js
@@ -0,0 +1,390 @@
+/**
+ * Anti-Gravity Floating Photo Wall & Lightbox Slider
+ * Arranged in a salon-wall composition inspired by the grand portrait gallery
+ */
+
+export const GALLERY_ITEMS = [
+ // Top Row (Sirius, Umbridge/McGonagall, Bellatrix)
+ {
+ id: 'mem-1',
+ imageSrc: '/gallery/event-1.jpg',
+ title: 'The Gathering',
+ caption: 'Attendees kicking off the day at WCE Sangli.',
+ 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, containers, 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, pull requests, and interactive rebasing.',
+ frameSrc: '/frames/frame-gothic.png',
+ width: 230,
+ height: 290,
+ top: '4%',
+ left: '73%',
+ floatDuration: 6.8,
+ rotationDrift: 2.0,
+ },
+
+ // Middle Tier (Lucius, Grand Centerpiece Dumbledore, Snape)
+ {
+ id: 'mem-4',
+ imageSrc: '/gallery/event-4.jpg',
+ title: 'Terminal Sorcery',
+ caption: 'Late afternoon command-line mastery and debugging puzzles.',
+ 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 (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,
+ },
+];
+
+export function initGallery(root) {
+ if (!root) return;
+
+ const canvas = root.querySelector('[data-gallery-canvas]');
+ const modal = root.querySelector('[data-gallery-modal]');
+ if (!canvas || !modal) return;
+
+ const modalMask = modal.querySelector('[data-modal-mask]');
+ const modalSlider = modal.querySelector('[data-modal-slider]');
+ const modalBezel = modal.querySelector('[data-modal-bezel]');
+ const modalTitle = modal.querySelector('[data-modal-title]');
+ const modalCaption = modal.querySelector('[data-modal-caption]');
+ const modalCounter = modal.querySelector('[data-modal-counter]');
+ const closeBtn = modal.querySelector('[data-modal-close]');
+ const prevBtn = modal.querySelector('[data-modal-prev]');
+ const nextBtn = modal.querySelector('[data-modal-next]');
+
+ let currentIndex = 0;
+ let isAnimating = false;
+
+ // Set up dragging on floating portraits
+ const portraits = canvas.querySelectorAll('[data-gallery-item]');
+ portraits.forEach((portrait, index) => {
+ let startX = 0;
+ let startY = 0;
+ let initialLeft = 0;
+ let initialTop = 0;
+ let hasDragged = false;
+ let isDragging = false;
+
+ portrait.addEventListener('pointerdown', (e) => {
+ // Only primary mouse button or touch
+ if (e.button !== 0) return;
+ isDragging = true;
+ hasDragged = false;
+ startX = e.clientX;
+ startY = e.clientY;
+
+ const rect = portrait.getBoundingClientRect();
+ const parentRect = canvas.getBoundingClientRect();
+ initialLeft = rect.left - parentRect.left;
+ initialTop = rect.top - parentRect.top;
+
+ portrait.setPointerCapture(e.pointerId);
+ });
+
+ portrait.addEventListener('pointermove', (e) => {
+ if (!isDragging) return;
+ const dx = e.clientX - startX;
+ const dy = e.clientY - startY;
+
+ if (!hasDragged && Math.hypot(dx, dy) > 6) {
+ hasDragged = true;
+ portrait.classList.add('is-dragging');
+ portrait.style.left = `${initialLeft}px`;
+ portrait.style.top = `${initialTop}px`;
+ }
+
+ if (hasDragged) {
+ const newX = initialLeft + dx;
+ const newY = initialTop + dy;
+ portrait.style.left = `${newX}px`;
+ portrait.style.top = `${newY}px`;
+ }
+ });
+
+ const finishDrag = (e) => {
+ if (!isDragging) return;
+ isDragging = false;
+ portrait.classList.remove('is-dragging');
+ try {
+ if (portrait.hasPointerCapture(e.pointerId)) {
+ portrait.releasePointerCapture(e.pointerId);
+ }
+ } catch {
+ // Pointer capture release safeguard
+ }
+
+ // If user simply clicked (no significant movement), open lightbox
+ if (!hasDragged) {
+ openLightbox(index);
+ }
+ };
+
+ portrait.addEventListener('pointerup', finishDrag);
+ portrait.addEventListener('pointercancel', finishDrag);
+ });
+
+ function updateModalMeta(idx) {
+ const item = GALLERY_ITEMS[idx];
+ if (modalTitle) modalTitle.textContent = item.title;
+ if (modalCaption) modalCaption.textContent = item.caption;
+ if (modalCounter) modalCounter.textContent = `${idx + 1} / ${GALLERY_ITEMS.length}`;
+ if (modalBezel) {
+ modalBezel.src = item.frameSrc;
+ modalBezel.alt = `${item.title} Frame`;
+ }
+ }
+
+ function openLightbox(index) {
+ currentIndex = index;
+ updateModalMeta(currentIndex);
+
+ // Prepare active slide image
+ if (modalSlider) {
+ modalSlider.innerHTML = '';
+ const slideImg = document.createElement('img');
+ slideImg.className = 'gallery-modal__slide';
+ slideImg.src = GALLERY_ITEMS[currentIndex].imageSrc;
+ slideImg.alt = GALLERY_ITEMS[currentIndex].title;
+ modalSlider.appendChild(slideImg);
+ }
+
+ modal.classList.add('is-open');
+ modal.setAttribute('aria-hidden', 'false');
+ document.body.style.overflow = 'hidden';
+ window.addEventListener('keydown', handleKeydown);
+ }
+
+ function closeLightbox() {
+ modal.classList.remove('is-open');
+ modal.setAttribute('aria-hidden', 'true');
+ document.body.style.overflow = '';
+ window.removeEventListener('keydown', handleKeydown);
+ }
+
+ function paginate(direction) {
+ if (isAnimating || !modalSlider) return;
+ isAnimating = true;
+
+ const nextIndex = (currentIndex + direction + GALLERY_ITEMS.length) % GALLERY_ITEMS.length;
+ const currentSlide = modalSlider.querySelector('.gallery-modal__slide');
+
+ // Create incoming slide
+ const nextSlide = document.createElement('img');
+ nextSlide.className = 'gallery-modal__slide';
+ nextSlide.src = GALLERY_ITEMS[nextIndex].imageSrc;
+ nextSlide.alt = GALLERY_ITEMS[nextIndex].title;
+
+ // Position incoming slide offscreen based on direction
+ const enterOffset = direction > 0 ? 100 : -100;
+ const exitOffset = direction > 0 ? -100 : 100;
+ nextSlide.style.transform = `translateX(${enterOffset}%) scale(0.92)`;
+ nextSlide.style.opacity = '0';
+ modalSlider.appendChild(nextSlide);
+
+ // Update metadata right as transition begins
+ updateModalMeta(nextIndex);
+
+ // Force reflow
+ void nextSlide.offsetWidth;
+
+ // Animate slides
+ if (currentSlide) {
+ currentSlide.style.transform = `translateX(${exitOffset}%) scale(0.92)`;
+ currentSlide.style.opacity = '0';
+ }
+
+ nextSlide.style.transform = 'translateX(0) scale(1)';
+ nextSlide.style.opacity = '1';
+
+ setTimeout(() => {
+ if (currentSlide && currentSlide.parentNode) {
+ currentSlide.parentNode.removeChild(currentSlide);
+ }
+ currentIndex = nextIndex;
+ isAnimating = false;
+ }, 360);
+ }
+
+ function handleKeydown(e) {
+ if (!modal.classList.contains('is-open')) return;
+ if (e.key === 'Escape') {
+ closeLightbox();
+ } else if (e.key === 'ArrowRight') {
+ paginate(1);
+ } else if (e.key === 'ArrowLeft') {
+ paginate(-1);
+ }
+ }
+
+ // Close handlers
+ if (closeBtn) {
+ closeBtn.addEventListener('click', closeLightbox);
+ }
+
+ modal.addEventListener('click', (e) => {
+ // If clicking the modal backdrop (not the content dialog)
+ if (e.target === modal) {
+ closeLightbox();
+ }
+ });
+
+ // Next / Prev button controls
+ if (prevBtn) {
+ prevBtn.addEventListener('click', (e) => {
+ e.stopPropagation();
+ paginate(-1);
+ });
+ }
+
+ if (nextBtn) {
+ nextBtn.addEventListener('click', (e) => {
+ e.stopPropagation();
+ paginate(1);
+ });
+ }
+
+ // Swipe / Drag on Modal Photo Mask
+ if (modalMask) {
+ let maskStartX = 0;
+ let isMaskDragging = false;
+ let diffX = 0;
+
+ modalMask.addEventListener('pointerdown', (e) => {
+ if (e.button !== 0 || isAnimating) return;
+ isMaskDragging = true;
+ diffX = 0;
+ maskStartX = e.clientX;
+ modalMask.setPointerCapture(e.pointerId);
+ });
+
+ modalMask.addEventListener('pointermove', (e) => {
+ if (!isMaskDragging) return;
+ diffX = e.clientX - maskStartX;
+ const currentSlide = modalSlider?.querySelector('.gallery-modal__slide');
+ if (currentSlide) {
+ currentSlide.style.transform = `translateX(${diffX * 0.7}px)`;
+ }
+ });
+
+ const handleMaskPointerEnd = (e) => {
+ if (!isMaskDragging) return;
+ isMaskDragging = false;
+ try {
+ if (modalMask.hasPointerCapture(e.pointerId)) {
+ modalMask.releasePointerCapture(e.pointerId);
+ }
+ } catch {
+ // Pointer capture safeguard
+ }
+
+ if (diffX < -50) {
+ paginate(1);
+ } else if (diffX > 50) {
+ paginate(-1);
+ } else {
+ // Reset slide transform
+ const currentSlide = modalSlider?.querySelector('.gallery-modal__slide');
+ if (currentSlide) {
+ currentSlide.style.transform = 'translateX(0) scale(1)';
+ }
+ }
+ };
+
+ modalMask.addEventListener('pointerup', handleMaskPointerEnd);
+ modalMask.addEventListener('pointercancel', handleMaskPointerEnd);
+ }
+}
diff --git a/frontend/src/scripts/main.js b/frontend/src/scripts/main.js
index 97bd417..e9ca9ea 100644
--- a/frontend/src/scripts/main.js
+++ b/frontend/src/scripts/main.js
@@ -10,6 +10,7 @@ import { initEventCards } from './event-cards.js';
import { initHeroParallax } from './hero-parallax.js';
import { initOffscreenPause } from './motion.js';
import { initFog } from './fog/fog.js';
+import { initGallery } from './gallery.js';
import { prefersReducedMotion, isLowPowerDevice } from './device.js';
import { initRegistration } from './register.js';
@@ -64,7 +65,7 @@ function init() {
initFaq(document.querySelector('[data-faq]'));
initSessions(document.querySelector('[data-sessions]'));
initEventCards();
- initRegistration();
+ initGallery(document.querySelector('[data-gallery]'));
initOffscreenPause(document.querySelectorAll('main > section'));
// If page is loaded with #registration or #register hash, scroll smoothly to section
diff --git a/frontend/src/styles/main.css b/frontend/src/styles/main.css
index 88554a6..e06aa74 100644
--- a/frontend/src/styles/main.css
+++ b/frontend/src/styles/main.css
@@ -7,6 +7,7 @@
@import './sections/hero.css';
@import './sections/curriculum.css';
@import './sections/schedule.css';
+@import './sections/gallery.css';
@import './sections/about.css';
@import './sections/faq.css';
@import './sections/sponsor.css';
diff --git a/frontend/src/styles/sections/curriculum.css b/frontend/src/styles/sections/curriculum.css
index 6ca902a..8488cd7 100644
--- a/frontend/src/styles/sections/curriculum.css
+++ b/frontend/src/styles/sections/curriculum.css
@@ -305,28 +305,17 @@
.sign__title {
font-size: 0.9375rem;
}
- .scroll,
- .scroll--one,
- .scroll--two {
- position: relative;
- inset: auto;
- top: auto;
- left: auto;
- right: auto;
- bottom: auto;
- flex: 0 0 100%;
- width: 100%;
- max-width: 100%;
- box-sizing: border-box;
- margin-top: 6px;
- padding: 18px 20px;
+ .scroll {
+ position: absolute;
+ inset: 6px;
+ width: auto;
+ max-width: none;
+ padding: 16px 18px;
border-radius: 18px;
- overflow-y: visible;
- z-index: 5;
+ overflow-y: auto;
+ z-index: 35;
}
- .scroll::before,
- .scroll--one::before,
- .scroll--two::before {
+ .scroll::before {
display: none;
}
}
diff --git a/frontend/src/styles/sections/gallery.css b/frontend/src/styles/sections/gallery.css
new file mode 100644
index 0000000..17a7121
--- /dev/null
+++ b/frontend/src/styles/sections/gallery.css
@@ -0,0 +1,441 @@
+/* ========================================================
+ GALLERY SECTION: The Hall of Memories
+ Anti-Gravity Floating Salon Wall + Lightbox Slider
+ ======================================================== */
+
+.gallery-section {
+ position: relative;
+ width: 100%;
+ min-height: 1220px;
+ background:
+ radial-gradient(ellipse 85% 65% at 50% 45%, #190e36 0%, #0e081f 65%, #070311 100%);
+ overflow: hidden;
+ user-select: none;
+ -webkit-user-select: none;
+ padding: 90px 0 120px;
+}
+
+/* Background atmospheric glow effects */
+.gallery-glow {
+ position: absolute;
+ pointer-events: none;
+ border-radius: 50%;
+}
+
+.gallery-glow--purple {
+ top: 35%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: min(750px, 92vw);
+ height: min(750px, 92vw);
+ background: radial-gradient(circle, rgba(138, 77, 255, 0.22) 0%, rgba(88, 28, 135, 0.12) 45%, transparent 70%);
+ filter: blur(140px);
+}
+
+.gallery-glow--amber {
+ bottom: 12%;
+ left: 35%;
+ width: min(450px, 75vw);
+ height: min(450px, 75vw);
+ background: radial-gradient(circle, rgba(255, 122, 0, 0.18) 0%, rgba(217, 119, 6, 0.08) 50%, transparent 70%);
+ filter: blur(95px);
+}
+
+/* Section Header */
+.gallery-header {
+ position: relative;
+ z-index: 10;
+ text-align: center;
+ margin-bottom: 36px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.gallery-header .stop__label {
+ justify-content: center;
+}
+
+.gallery-header .stop__title {
+ margin-bottom: 12px;
+}
+
+.gallery-header .stop__text,
+.gallery-subtitle {
+ color: var(--c-text-muted);
+ font-size: var(--fs-body);
+ line-height: 1.6;
+ max-width: 56ch;
+ margin-inline: auto;
+}
+
+/* Salon Wall Floating Anti-Gravity Canvas */
+.gallery-canvas {
+ position: relative;
+ width: 100%;
+ max-width: 1240px;
+ margin-inline: auto;
+ height: 1020px;
+ touch-action: none;
+}
+
+/* Individual Floating Portrait Item */
+.gallery-portrait {
+ position: absolute;
+ cursor: grab;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.65));
+ transition:
+ transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
+ filter 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
+ will-change: transform;
+}
+
+/* Grand Centerpiece Styling (Dumbledore position) */
+.gallery-portrait[data-centerpiece="true"] {
+ z-index: 15;
+ filter:
+ drop-shadow(0 20px 45px rgba(0, 0, 0, 0.85))
+ drop-shadow(0 0 30px rgba(255, 122, 0, 0.25));
+}
+
+.gallery-portrait:hover {
+ z-index: 50 !important;
+ transform: scale(1.05) !important;
+ filter:
+ drop-shadow(0 22px 45px rgba(0, 0, 0, 0.9))
+ drop-shadow(0 0 28px rgba(255, 122, 0, 0.38));
+}
+
+.gallery-portrait:active,
+.gallery-portrait.is-dragging {
+ cursor: grabbing;
+ transform: scale(0.98);
+}
+
+/* Anti-gravity float wrapper that executes bobbing & rotation drift */
+.gallery-portrait__float {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ animation: portrait-float var(--float-dur, 6s) ease-in-out infinite alternate,
+ portrait-rot calc(var(--float-dur, 6s) * 1.25) ease-in-out infinite alternate;
+}
+
+@keyframes portrait-float {
+ 0% {
+ transform: translateY(0);
+ }
+ 50% {
+ transform: translateY(-16px);
+ }
+ 100% {
+ transform: translateY(14px);
+ }
+}
+
+@keyframes portrait-rot {
+ 0% {
+ rotate: 0deg;
+ }
+ 50% {
+ rotate: var(--rot-drift, 1.8deg);
+ }
+ 100% {
+ rotate: calc(var(--rot-drift, 1.8deg) * -1);
+ }
+}
+
+/* Inner Photo Layer (sitting underneath the clay frame) */
+.gallery-portrait__photo {
+ position: absolute;
+ width: 62%;
+ height: 66%;
+ overflow: hidden;
+ border-radius: 4px;
+ z-index: 10;
+ background-color: #0c071a;
+}
+
+.gallery-portrait__photo img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ pointer-events: none;
+ user-select: none;
+ transition: transform 0.4s ease;
+}
+
+.gallery-portrait:hover .gallery-portrait__photo img {
+ transform: scale(1.04);
+}
+
+/* 3D Clay Frame Bezel Overlay */
+.gallery-portrait__frame {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ pointer-events: none;
+ z-index: 20;
+}
+
+/* ========================================================
+ LIGHTBOX SLIDER MODAL
+ ======================================================== */
+
+.gallery-modal {
+ position: fixed;
+ inset: 0;
+ z-index: 999;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-color: rgba(0, 0, 0, 0.82);
+ backdrop-filter: blur(14px);
+ -webkit-backdrop-filter: blur(14px);
+ padding: 20px;
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 0.28s ease;
+}
+
+.gallery-modal.is-open {
+ opacity: 1;
+ pointer-events: auto;
+}
+
+.gallery-modal__content {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ max-width: 480px;
+ width: 100%;
+ transform: scale(0.85) translateY(20px);
+ transition: transform 0.35s cubic-bezier(0.18, 0.9, 0.25, 1.15);
+}
+
+.gallery-modal.is-open .gallery-modal__content {
+ transform: scale(1) translateY(0);
+}
+
+/* Close Button */
+.gallery-modal__close {
+ position: absolute;
+ top: -46px;
+ right: 0;
+ background: none;
+ border: none;
+ color: rgba(254, 240, 138, 0.85); /* amber-200/80 */
+ font-family: var(--font-body), sans-serif;
+ font-size: 0.85rem;
+ font-weight: 700;
+ letter-spacing: 0.12em;
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ cursor: pointer;
+ padding: 6px 14px;
+ border-radius: var(--radius-pill);
+ transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
+}
+
+.gallery-modal__close:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.1);
+ transform: scale(1.05);
+}
+
+/* Viewport for the Slider Frame */
+.gallery-modal__viewport {
+ position: relative;
+ width: 320px;
+ height: 410px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.95));
+}
+
+@media (min-width: 640px) {
+ .gallery-modal__viewport {
+ width: 400px;
+ height: 500px;
+ }
+}
+
+/* Sliding Photo Mask: sits precisely inside the clay frame opening */
+.gallery-modal__mask {
+ position: absolute;
+ width: 62%;
+ height: 66%;
+ border-radius: 4px;
+ overflow: hidden;
+ z-index: 10;
+ background-color: rgba(0, 0, 0, 0.6);
+ cursor: grab;
+ touch-action: pan-y;
+}
+
+.gallery-modal__mask:active {
+ cursor: grabbing;
+}
+
+.gallery-modal__slider {
+ position: relative;
+ width: 100%;
+ height: 100%;
+}
+
+.gallery-modal__slide {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ user-select: none;
+ -webkit-user-drag: none;
+ transition: transform 0.35s cubic-bezier(0.2, 0.85, 0.3, 1), opacity 0.25s ease;
+ will-change: transform, opacity;
+}
+
+/* Bezel overlay stays static in the center */
+.gallery-modal__bezel {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ pointer-events: none;
+ z-index: 20;
+}
+
+/* Left / Right Controls */
+.gallery-modal__nav {
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 44px;
+ height: 44px;
+ border-radius: 50%;
+ background: rgba(22, 12, 40, 0.88);
+ border: 1px solid rgba(138, 77, 255, 0.35);
+ color: #ffd15c;
+ font-size: 1.1rem;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ z-index: 30;
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
+ transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
+}
+
+.gallery-modal__nav:hover {
+ background: rgba(45, 26, 77, 0.95);
+ border-color: rgba(255, 123, 28, 0.6);
+ color: #ffffff;
+ transform: translateY(-50%) scale(1.1);
+ box-shadow: 0 8px 24px rgba(255, 123, 28, 0.3);
+}
+
+.gallery-modal__nav--prev {
+ left: -16px;
+}
+
+.gallery-modal__nav--next {
+ right: -16px;
+}
+
+@media (min-width: 768px) {
+ .gallery-modal__nav {
+ width: 48px;
+ height: 48px;
+ font-size: 1.25rem;
+ }
+ .gallery-modal__nav--prev {
+ left: -58px;
+ }
+ .gallery-modal__nav--next {
+ right: -58px;
+ }
+}
+
+/* Caption and Page Indicator */
+.gallery-modal__meta {
+ text-align: center;
+ margin-top: 22px;
+ z-index: 30;
+ max-width: 380px;
+}
+
+.gallery-modal__title {
+ font-family: var(--font-display), 'Georgia', serif;
+ font-size: 1.35rem;
+ font-weight: 700;
+ color: #fef08a; /* amber-200 */
+}
+
+.gallery-modal__caption {
+ font-size: 0.92rem;
+ color: rgba(216, 180, 254, 0.85); /* purple-300 / 80 */
+ margin-top: 6px;
+ line-height: 1.45;
+}
+
+.gallery-modal__counter {
+ display: inline-block;
+ margin-top: 14px;
+ padding: 4px 14px;
+ border-radius: var(--radius-pill);
+ background: rgba(75, 35, 144, 0.45);
+ border: 1px solid rgba(138, 77, 255, 0.25);
+ color: #c9a8ff;
+ font-family: var(--font-mono);
+ font-size: 0.75rem;
+ letter-spacing: 0.05em;
+}
+
+/* Pause animations when offscreen */
+.is-offscreen .gallery-portrait__float {
+ animation-play-state: paused !important;
+}
+
+/* Responsive Canvas adjustments for mobile & tablet */
+@media (max-width: 860px) {
+ .gallery-section {
+ min-height: auto;
+ }
+
+ .gallery-canvas {
+ height: auto;
+ min-height: auto;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 20px;
+ padding: 16px 8px;
+ }
+
+ .gallery-portrait {
+ position: relative !important;
+ top: auto !important;
+ left: auto !important;
+ width: 210px !important;
+ height: 270px !important;
+ margin: 6px;
+ }
+
+ .gallery-portrait[data-centerpiece="true"] {
+ width: 250px !important;
+ height: 320px !important;
+ order: -1;
+ }
+}