diff --git a/package-lock.json b/package-lock.json index 894829a..1767489 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,6 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -1599,7 +1598,6 @@ "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1641,7 +1639,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1747,7 +1744,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -2003,7 +1999,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3053,7 +3048,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -3114,7 +3108,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -3124,7 +3117,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -3152,9 +3144,9 @@ } }, "node_modules/react-router": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.11.0.tgz", - "integrity": "sha512-uI4JkMmjbWCZc01WVP2cH7ZfSzH91JAZUDd7/nIprDgWxBV1TkkmLToFh7EbMTcMak8URFRa2YoBL/W8GWnCTQ==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.12.0.tgz", + "integrity": "sha512-kTPDYPFzDVGIIGNLS5VJykK0HfHLY5MF3b+xj0/tTyNYL1gF1qs7u67Z9jEhQk2sQ98SUaHxlG31g1JtF7IfVw==", "license": "MIT", "dependencies": { "cookie": "^1.0.1", @@ -3174,12 +3166,12 @@ } }, "node_modules/react-router-dom": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.11.0.tgz", - "integrity": "sha512-e49Ir/kMGRzFOOrYQBdoitq3ULigw4lKbAyKusnvtDu2t4dBX4AGYPrzNvorXmVuOyeakai6FUPW5MmibvVG8g==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.12.0.tgz", + "integrity": "sha512-pfO9fiBcpEfX4Tx+iTYKDtPbrSLLCbwJ5EqP+SPYQu1VYCXdy79GSj0wttR0U4cikVdlImZuEZ/9ZNCgoaxwBA==", "license": "MIT", "dependencies": { - "react-router": "7.11.0" + "react-router": "7.12.0" }, "engines": { "node": ">=20.0.0" @@ -3420,7 +3412,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.0.tgz", "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -3542,7 +3533,6 @@ "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/src/Pages/Home_Page/Event_Section/Event.jsx b/src/Pages/Home_Page/Event_Section/Event.jsx index 05af4a4..2135c98 100644 --- a/src/Pages/Home_Page/Event_Section/Event.jsx +++ b/src/Pages/Home_Page/Event_Section/Event.jsx @@ -2,7 +2,10 @@ import React, { useEffect, useRef } from "react"; import { gsap } from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; import { useNavigate } from "react-router-dom"; - +import HacknocturneImg from "../../../assets/Hacknocturne.jpeg"; +import csocImg from "../../../assets/csoc.jpeg"; +import techvistaraImg from "../../../assets/Techvistara.jpg"; +import codecafeImg from "../../../assets/CodeCafe.jpg"; gsap.registerPlugin(ScrollTrigger); export const Event = () => { @@ -15,7 +18,7 @@ export const Event = () => { slug: "hacknocturne", name: "HackNocturne", number: 0, - image: "https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=800&q=80", + image: HacknocturneImg, description: "HackNocturne is CodeShack's flagship annual inter-college hackathon where students participate in a 24-hour non-stop coding challenge.", buttonText: "VIEW DETAILS" @@ -25,7 +28,7 @@ export const Event = () => { slug: "tech-vistara", name: "Tech Vistara", number: 1, - image: "https://images.unsplash.com/photo-1509062522246-3755977927d7?w=800&q=80", + image: techvistaraImg, description: "Orientation program designed to introduce freshers to tech culture.", buttonText: "LEARN MORE" @@ -35,7 +38,7 @@ export const Event = () => { slug: "codecafe", name: "CodeCafe", number: 2, - image: "https://images.unsplash.com/photo-1531482615713-2afd69097998?w=800&q=80", + image: codecafeImg, description: "Webinar and talk series on technology, placements, and careers.", buttonText: "EXPLORE" @@ -45,7 +48,7 @@ export const Event = () => { slug: "csoc", name: "CSoC (CodeShack Summer of Code)", number: 3, - image: "https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800&q=80", + image: csocImg, description: "A structured summer learning program focused on real-world skills.", buttonText: "JOIN NOW" @@ -53,106 +56,106 @@ export const Event = () => { ]; useEffect(() => { - cardsRef.current.forEach((card, index) => { - if (!card) return; - - const numberEl = card.querySelector(".event-number"); - const glowEl = card.querySelector(".event-glow"); - - const valueObj = { value: 0 }; - const targetValue = events[index].number; - - /* Timeline (paused by default) */ - const tl = gsap.timeline({ paused: true }); - - /* Card animation */ - tl.fromTo( - card, - { opacity: 0, y: 80 }, - { - opacity: 1, - y: 0, - duration: 1, - ease: "power3.out" - }, - 0 - ); - - /* Glow animation */ - tl.fromTo( - glowEl, - { opacity: 0, scale: 0.6 }, - { - opacity: 0.8, - scale: 1.2, - duration: 0.6, - ease: "power2.out" - }, - 0.1 - ); - - tl.to( - glowEl, - { - opacity: 0.25, - scale: 1, - duration: 0.6, - ease: "power2.out" - }, - 0.8 - ); - - /* Number animation */ - tl.to( - valueObj, - { - value: targetValue, - duration: 1.2, - ease: "power2.out", - snap: { value: 1 }, - onUpdate: () => { - numberEl.textContent = String(valueObj.value).padStart(2, "0"); + cardsRef.current.forEach((card, index) => { + if (!card) return; + + const numberEl = card.querySelector(".event-number"); + const glowEl = card.querySelector(".event-glow"); + + const valueObj = { value: 0 }; + const targetValue = events[index].number; + + /* Timeline (paused by default) */ + const tl = gsap.timeline({ paused: true }); + + /* Card animation */ + tl.fromTo( + card, + { opacity: 0, y: 80 }, + { + opacity: 1, + y: 0, + duration: 1, + ease: "power3.out" + }, + 0 + ); + + /* Glow animation */ + tl.fromTo( + glowEl, + { opacity: 0, scale: 0.6 }, + { + opacity: 0.8, + scale: 1.2, + duration: 0.6, + ease: "power2.out" + }, + 0.1 + ); + + tl.to( + glowEl, + { + opacity: 0.25, + scale: 1, + duration: 0.6, + ease: "power2.out" + }, + 0.8 + ); + + /* Number animation */ + tl.to( + valueObj, + { + value: targetValue, + duration: 1.2, + ease: "power2.out", + snap: { value: 1 }, + onUpdate: () => { + numberEl.textContent = String(valueObj.value).padStart(2, "0"); + } + }, + 0 + ); + + /* ScrollTrigger */ + ScrollTrigger.create({ + trigger: card, + start: "top 80%", + + onEnter: () => { + tl.restart(); + }, + + onLeaveBack: () => { + // Fade out smoothly when scrolling up + gsap.to(card, { + opacity: 0, + y: 80, + duration: 0.5, + ease: "power2.in", + onComplete: () => { + // Reset everything AFTER fade-out + tl.pause(0); + + valueObj.value = 0; + numberEl.textContent = "00"; + + gsap.set(glowEl, { + opacity: 0, + scale: 0.6 + }); + } + }); } - }, - 0 - ); - - /* ScrollTrigger */ - ScrollTrigger.create({ - trigger: card, - start: "top 80%", - - onEnter: () => { - tl.restart(); - }, - - onLeaveBack: () => { - // Fade out smoothly when scrolling up - gsap.to(card, { - opacity: 0, - y: 80, - duration: 0.5, - ease: "power2.in", - onComplete: () => { - // Reset everything AFTER fade-out - tl.pause(0); - - valueObj.value = 0; - numberEl.textContent = "00"; - - gsap.set(glowEl, { - opacity: 0, - scale: 0.6 - }); - } - }); - } -}); + }); - }); + }); - return () => ScrollTrigger.getAll().forEach(t => t.kill()); -}, []); + return () => ScrollTrigger.getAll().forEach(t => t.kill()); + }, []); diff --git a/src/Pages/Home_Page/Event_Section/EventDetailPage.jsx b/src/Pages/Home_Page/Event_Section/EventDetailPage.jsx index ac4b9ef..8d74a0e 100644 --- a/src/Pages/Home_Page/Event_Section/EventDetailPage.jsx +++ b/src/Pages/Home_Page/Event_Section/EventDetailPage.jsx @@ -1,37 +1,234 @@ -import React, { useEffect } from "react"; +import React, { useEffect, useState, useRef } from "react"; import { useParams, useNavigate } from "react-router-dom"; -import { ArrowLeft } from "lucide-react"; +import { ArrowLeft, ChevronLeft, ChevronRight, Calendar, Clock, X, FileText, Key, Camera } from "lucide-react"; +import { gsap } from "gsap"; +import { ScrollTrigger } from "gsap/ScrollTrigger"; +import HacknocturneImg from "../../../assets/Hacknocturne.jpeg"; +import HacknocturneCat1 from "../../../assets/hacknocturneCat1.jpeg"; +import HacknocturneCat2 from "../../../assets/hacknocturneCat2.jpeg"; +import Winner1Img from "../../../assets/winner1.png"; +import Winner2Img from "../../../assets/winner2.png"; +import Winner3Img from "../../../assets/winner3.png"; +import TechvistaraImg from "../../../assets/Techvistara.jpg"; +import CodeCafeImg from "../../../assets/CodeCafe.jpg"; +import CsocImg from "../../../assets/csoc.jpeg"; + +// Placeholder imports for Tech Vistara domains - replace with actual images +import DsaImg from "../../../assets/dsa.png"; +import WebDevImg from "../../../assets/webdev.png"; +import ComputerFundamentalsImg from "../../../assets/Techvistara.jpg"; // Placeholder +import RosImg from "../../../assets/cybersecurity.png"; +import PersonalBrandingImg from "../../../assets/uiux.png"; +import VideoEditingImg from "../../../assets/aiml.png"; +import LaptopGuideImg from "../../../assets/laptopguide.png"; + +// Placeholder imports for CodeCafe episodes - replace with actual images +import Episode1Img from "../../../assets/CodeCafe.jpg"; // Placeholder +import Episode2Img from "../../../assets/codecafeep2.png"; + +// Event Gallery Images for CodeCafe Episode 2 +import EventImg1 from "../../../assets/eventimg1.png"; +import EventImg2 from "../../../assets/eventimg2.jpg"; + +gsap.registerPlugin(ScrollTrigger); export const EventDetailPage = () => { const { eventId } = useParams(); const navigate = useNavigate(); + const winnerCardsRef = useRef([]); + const domainItemsRef = useRef([]); + const [selectedEpisode, setSelectedEpisode] = useState(null); + const episodeCardsRef = useRef([]); useEffect(() => { window.scrollTo(0, 0); }, [eventId]); + // Carousel state and auto-play + const [currentImageIndex, setCurrentImageIndex] = useState(0); + const hacknocturneImages = [HacknocturneCat1, HacknocturneImg, HacknocturneCat2]; + + useEffect(() => { + if (eventId === "hacknocturne") { + const interval = setInterval(() => { + setCurrentImageIndex((prevIndex) => + (prevIndex + 1) % hacknocturneImages.length + ); + }, 3000); // Change image every 3 seconds + + return () => clearInterval(interval); + } + }, [eventId]); + + // GSAP animation for winner cards + useEffect(() => { + if (eventId === "hacknocturne") { + winnerCardsRef.current.forEach((card) => { + if (!card) return; + + const tl = gsap.timeline({ paused: true }); + + tl.fromTo( + card, + { opacity: 0, y: 80 }, + { + opacity: 1, + y: 0, + duration: 1, + ease: "power3.out" + } + ); + + ScrollTrigger.create({ + trigger: card, + start: "top 80%", + onEnter: () => { + tl.restart(); + }, + onLeaveBack: () => { + gsap.to(card, { + opacity: 0, + y: 80, + duration: 0.5, + ease: "power2.in", + onComplete: () => { + tl.pause(0); + } + }); + } + }); + }); + + return () => ScrollTrigger.getAll().forEach(t => t.kill()); + } + }, [eventId]); + + // GSAP animation for Tech Vistara and CSoC domain timeline + useEffect(() => { + if (eventId === "tech-vistara" || eventId === "csoc") { + domainItemsRef.current.forEach((item) => { + if (!item) return; + + const tl = gsap.timeline({ paused: true }); + + tl.fromTo( + item, + { opacity: 0, scale: 0.8, y: 30 }, + { + opacity: 1, + scale: 1, + y: 0, + duration: 0.6, + ease: "back.out(1.2)" + } + ); + + ScrollTrigger.create({ + trigger: item, + start: "top 85%", + onEnter: () => { + tl.restart(); + }, + onLeaveBack: () => { + gsap.to(item, { + opacity: 0, + scale: 0.8, + y: 30, + duration: 0.4, + ease: "power2.in", + onComplete: () => { + tl.pause(0); + } + }); + } + }); + }); + + return () => ScrollTrigger.getAll().forEach(t => t.kill()); + } + }, [eventId]); + + // GSAP animation for CodeCafe episode cards + useEffect(() => { + if (eventId === "codecafe") { + episodeCardsRef.current.forEach((card) => { + if (!card) return; + + const tl = gsap.timeline({ paused: true }); + + tl.fromTo( + card, + { opacity: 0, y: 60 }, + { + opacity: 1, + y: 0, + duration: 0.8, + ease: "power3.out" + } + ); + + ScrollTrigger.create({ + trigger: card, + start: "top 80%", + onEnter: () => { + tl.restart(); + }, + onLeaveBack: () => { + gsap.to(card, { + opacity: 0, + y: 60, + duration: 0.5, + ease: "power2.in", + onComplete: () => { + tl.pause(0); + } + }); + } + }); + }); + + return () => ScrollTrigger.getAll().forEach(t => t.kill()); + } + }, [eventId]); + + const nextImage = () => { + setCurrentImageIndex((prevIndex) => + (prevIndex + 1) % hacknocturneImages.length + ); + }; + + const prevImage = () => { + setCurrentImageIndex((prevIndex) => + prevIndex === 0 ? hacknocturneImages.length - 1 : prevIndex - 1 + ); + }; + const events = { hacknocturne: { id: 1, name: "HackNocturne", + image: HacknocturneImg, description: "HackNocturne is CodeShack's flagship annual inter-college hackathon where students participate in a 24-hour non-stop coding challenge. Teams work together to build innovative solutions for real-world problems while learning new technologies and collaborating under time pressure. The event promotes creativity, teamwork, and hands-on experience. HackNocturne features a prize money, along with certificates, swag, and recognition for top-performing teams.", }, "tech-vistara": { id: 2, name: "Tech Vistara", + image: TechvistaraImg, description: "Tech Vistara is the official orientation program by CodeShack for first-year students. It is designed to help freshers understand what engineering and technology are really about beyond classrooms and exams. The session acts as a beginner-friendly guide that introduces different tech domains, learning paths, useful resources, and opportunities available in college. Tech Vistara helps first-year students take their first confident step into their technical journey and avoid common mistakes early on.", }, codecafe: { id: 3, name: "CodeCafe", + image: CodeCafeImg, description: "CodeCafe is a webinar and talk series conducted by CodeShack that focuses on technology, placements, career guidance, and industry insights. The sessions are interactive and beginner-friendly, featuring seniors, alumni, and industry professionals who share their experiences and practical advice. CodeCafe aims to create an open and relaxed environment where students can learn, ask questions, and gain clarity about their academic and career paths.", }, csoc: { id: 4, name: "CSoC (CodeShack Summer of Code)", + image: CsocImg, description: "CSoC (CodeShack Summer of Code) is a structured 4–5 week summer learning program focused on helping students upskill in various technical domains such as Web Development, App Development, and Data Structures & Algorithms. The program includes guided learning, hands-on assignments, and mentor support. It concludes with a hackathon where participants apply what they have learned to build real projects, making CSoC a complete learning-to-building experience.", }, @@ -59,10 +256,10 @@ export const EventDetailPage = () => {
+ An insightful session covering the essential steps for first-year students to kickstart their tech journey. Topics included choosing the right tech stack, building projects, and preparing for internships. +
+ + {/* Speaker Info */} +SPEAKER
+Rahul Sharma
+Software Engineer @ Google
++ An insightful session on how Artificial Intelligence is transforming software engineering, the shifting role of engineers, and practical advice for students and aspiring founders. +
+ + {/* Speaker Info */} +SPEAKER
+Khushagra Agarwal
+Co-founder @ Zryth Solutions
++ Learn the fundamentals of DSA, essential for coding interviews and competitive programming. Master arrays, linked lists, trees, graphs, and algorithmic problem-solving techniques. +
++ Master modern web technologies including HTML5, CSS3, JavaScript, and React. Build responsive, interactive websites and web applications from scratch to deployment. +
++ Protect systems and networks from digital attacks. Learn about ethical hacking, network security, cryptography, and security protocols to safeguard information. +
++ Design intuitive and beautiful user interfaces. Master design principles, wireframing, prototyping, and user research to create exceptional digital experiences. +
++ Explore the world of Artificial Intelligence. Learn about machine learning algorithms, deep learning, neural networks, and how to build intelligent systems. +
++ Make informed decisions when purchasing a laptop for engineering and development. Learn about specs, performance requirements, and budget-friendly options. +
++ Master the art of building modern web applications. Learn HTML, CSS, JavaScript, and popular frameworks like React. Build responsive, interactive websites and deploy them to production. +
++ Create powerful mobile applications for Android and iOS. Learn native development or cross-platform frameworks like React Native and Flutter. Build apps that solve real-world problems. +
++ Build a strong foundation in DSA for coding interviews and competitive programming. Master essential data structures, algorithmic techniques, and problem-solving strategies to excel in technical assessments. +
+🏆 Champion
+Prize Amount
+₹25,000
+🥈 2nd Place
+Prize Amount
+₹15,000
+🥉 3rd Place
+Prize Amount
+₹10,000
+Featured Speaker
+Co-founder @ Zryth Solutions
+Alumnus & CEO of an AI Solutions Company
++ The session featured Kushagra Agarwal, an alumnus and CEO of Zit Solutions, an AI solutions company. + The talk focused on how Artificial Intelligence is transforming software engineering, the shifting role + of engineers, and practical advice for students and aspiring founders. +
++ +
Sir M. Visvesvaraya Institute of Technology, Bengaluru
- +