diff --git a/package.json b/package.json index 2e7c89a..44fac5e 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,12 @@ "@fontsource/poppins": "^5.0.8", "@vitejs/plugin-react": "^4.2.1", "baffle": "^0.3.6", + "canvas": "^3.0.0", + "color-thief-react": "^2.1.0", "framer-motion": "^11.5.4", "gsap": "^3.12.5", "lodash": "^4.17.21", + "lucide-react": "^0.469.0", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -29,6 +32,7 @@ "react-parallax-tilt": "^1.7.268", "react-router-dom": "^6.22.1", "react-toastify": "^10.0.4", + "swiper": "^11.1.15", "vite": "^5.1.0" }, "devDependencies": { diff --git a/public/gallery/RUST SESSION/rs2.HEIC b/public/gallery/RUST SESSION/rs2.HEIC deleted file mode 100644 index d81163f..0000000 Binary files a/public/gallery/RUST SESSION/rs2.HEIC and /dev/null differ diff --git a/public/gallery/RUST SESSION/rs2.jpg b/public/gallery/RUST SESSION/rs2.jpg new file mode 100644 index 0000000..fb1a187 Binary files /dev/null and b/public/gallery/RUST SESSION/rs2.jpg differ diff --git a/public/gallery/RUST SESSION/rs3.HEIC b/public/gallery/RUST SESSION/rs3.HEIC deleted file mode 100644 index dd39846..0000000 Binary files a/public/gallery/RUST SESSION/rs3.HEIC and /dev/null differ diff --git a/public/gallery/RUST SESSION/rs3.jpg b/public/gallery/RUST SESSION/rs3.jpg new file mode 100644 index 0000000..17dcfc9 Binary files /dev/null and b/public/gallery/RUST SESSION/rs3.jpg differ diff --git a/src/pages/Events/EventsCard.jsx b/src/pages/Events/EventsCard.jsx new file mode 100644 index 0000000..a630094 --- /dev/null +++ b/src/pages/Events/EventsCard.jsx @@ -0,0 +1,195 @@ +import { useMemo, useState, useEffect } from "react"; +import { X, ChevronLeft, ChevronRight } from "lucide-react"; +import PropTypes from "prop-types"; +import Tilt from "react-parallax-tilt"; + +const getRandomColor = () => { + const r = Math.floor(Math.random() * 150); + const g = Math.floor(Math.random() * 150); + const b = Math.floor(Math.random() * 150); + return `rgba(${r}, ${g}, ${b}, 0.3)`; +}; + +function ImageCarousel({ + images, + interval = 3000, + onManualChange, + className, + isModal, +}) { + const [currentIndex, setCurrentIndex] = useState(0); + const [isHovered, setIsHovered] = useState(false); + + useEffect(() => { + let timer; + if ((isHovered || isModal) && !onManualChange) { + timer = setInterval(() => { + setCurrentIndex((prev) => (prev + 1) % images.length); + }, interval); + } + return () => clearInterval(timer); + }, [images.length, interval, onManualChange, isHovered, isModal]); + + const handleMouseLeave = () => { + setIsHovered(false); + setCurrentIndex(0); + }; + + const handlePrev = (e) => { + e.stopPropagation(); + setCurrentIndex((prev) => (prev - 1 + images.length) % images.length); + }; + + const handleNext = (e) => { + e.stopPropagation(); + setCurrentIndex((prev) => (prev + 1) % images.length); + }; + + return ( +
setIsHovered(true)} + onMouseLeave={handleMouseLeave} + > + {`Slide + {images.length > 1 && ( + <> + {isModal && ( + <> + + + + )} +
+ {images.map((image, idx) => ( +
+ ))} +
+ + )} +
+ ); +} + +function EventsCard({ event }) { + const [showModal, setShowModal] = useState(false); + const randomColor = useMemo(() => getRandomColor(), []); + + const truncateText = (text, length) => + text.length > length ? `${text.slice(0, length)}...` : text; + + return ( + <> +
setShowModal(true)} + onKeyPress={(e) => { + if (e.key === "Enter" || e.key === " ") setShowModal(true); + }} + className="w-full" + > + +
+ +
+

+ {event.title} +

+

{event.date}

+

+ {truncateText(event.description, 100)} +

+
+
+
+
+ + {showModal && ( +
+
+ +
+ +
+
+

{event.title}

+

{event.date}

+

{event.description}

+
+
+
+ )} + + ); +} + +ImageCarousel.propTypes = { + images: PropTypes.arrayOf( + PropTypes.shape({ + src: PropTypes.string.isRequired, + alt: PropTypes.string, + }), + ).isRequired, + interval: PropTypes.number, + onManualChange: PropTypes.func, + className: PropTypes.string, + isModal: PropTypes.bool, +}; + +ImageCarousel.defaultProps = { + interval: 3000, + onManualChange: null, + className: "", + isModal: false, +}; + +EventsCard.propTypes = { + event: PropTypes.shape({ + images: PropTypes.arrayOf(PropTypes.string).isRequired, // Array of image URLs + title: PropTypes.string.isRequired, + date: PropTypes.string.isRequired, + description: PropTypes.string.isRequired, + }).isRequired, +}; + +export default EventsCard; diff --git a/src/pages/Events/events.js b/src/pages/Events/events.js new file mode 100644 index 0000000..d58f5a8 --- /dev/null +++ b/src/pages/Events/events.js @@ -0,0 +1,105 @@ +const events = [ + { + images: [ + "/CodeX-Website/gallery/AIML SESSION/aiml6.jpg", + "/CodeX-Website/gallery/AIML SESSION/aiml1.jpg", + "/CodeX-Website/gallery/AIML SESSION/aiml2.jpg", + "/CodeX-Website/gallery/AIML SESSION/aiml3.jpg", + "/CodeX-Website/gallery/AIML SESSION/aiml4.jpg", + "/CodeX-Website/gallery/AIML SESSION/aiml5.jpg", + ], + title: "AIML Session", + date: "14th October, 2023", + description: + "Conducted an engaging and informative event focused on the principles and applications of Artificial Intelligence and Machine Learning. Attendees were captivated by the in-depth exploration of these transformative technologies.", + }, + { + images: [ + "/CodeX-Website/gallery/RUST SESSION/rs1.JPG", + "/CodeX-Website/gallery/RUST SESSION/rs2.jpg", + "/CodeX-Website/gallery/RUST SESSION/rs3.jpg ", + ], + title: "Rust Session", + date: "7th October, 2023", + description: + "Conducted an engaging event that delved into the intricacies of Rust programming. An exploration of this powerful and efficient programming language. Participants gained valuable insights into its practical applications and unique features.", + }, + { + images: [ + "/CodeX-Website/gallery/HackTober Fest/htf1_1.jpg", + "/CodeX-Website/gallery/HackTober Fest/htf2_1.jpg", + "/CodeX-Website/gallery/HackTober Fest/htf3_1.jpg", + "/CodeX-Website/gallery/HackTober Fest/htf4_1.jpg", + "/CodeX-Website/gallery/HackTober Fest/htf5_1.jpg", + ], + title: "Hacktober Fest - Open Source Contribution Session", + date: "30th September, 2023", + description: + "During the event, we guided participants through the essential steps of getting started with open-source: from cloning repositories to making commits, and finally, opening pull requests. By the end of the session, students gained hands-on experience and the confidence to contribute to Hacktoberfest and other open-source projects, fostering a deeper understanding of collaborative coding and community-driven development.", + }, + { + images: [ + "/CodeX-Website/gallery/Generative ai session/gas1.jpg", + "/CodeX-Website/gallery/Generative ai session/gas2.jpg", + "/CodeX-Website/gallery/Generative ai session/gas3.jpg", + ], + title: + "Guest lecture on generative AI for Building and Scaling Applications in the Real World", + date: "3rd February, 2024", + description: + "Hosted a guest lecture by Shubham Londhe. He shared insights into practical applications of Generative AI, discussing its role in creativity and scalability challenges. It was a deep dive into the practical applications of Generative AI. He explored how this cutting-edge technology can spark creativity and address real-world scalability challenges.", + }, + { + images: [ + "/CodeX-Website/gallery/Laser Lock/ll1.jpg", + "/CodeX-Website/gallery/Laser Lock/ll4.jpg", + "/CodeX-Website/gallery/Laser Lock/ll5.jpg", + "/CodeX-Website/gallery/Laser Lock/ll6.jpg", + "/CodeX-Website/gallery/Laser Lock/ll7.jpg", + "/CodeX-Website/gallery/Laser Lock/ll8.jpg", + "/CodeX-Website/gallery/Laser Lock/ll9.jpg", + ], + title: "Laser Lock - SymbiTech", + date: "20th September, 2024- 21st September, 2024", + description: + "A major success at the annual techfest (Symbitech) of SIT, Pune. Participant's programming skills were put to the test as well as their shooting abilities with a prize of INR 8000.", + }, + // { + // title: "Project Exhibition", + // date: "21st April, 2023", + // description: + // "Event where we invited various industry experts to provide their valuable suggestions and reviews for student’s PBL-1 and PBL-2 projects. A great way for students to receive constructive criticism from industry experts and identify areas of improvement. It had a cash prize of INR 3500 for first place, INR 2500 for second place, and INR 1500 for third place.", + // }, + // { + // title: "Git and Github Session", + // date: "27th March, 2023", + // description: + // "The session provided students with invaluable learning experience, covering the essentials of Git and GitHub and their practical applications in software development. Certificates were also provided to participants.", + // }, + // { + // title: "The Bug Detective", + // date: "8th April, 2022", + // description: + // "This was a debugging competition designed by our team of seasoned coders to test your coding knowledge and determination. The faster participants debug the codes, the closer they get to winning a share of the INR 3000 prize.", + // }, + // { + // title: "Learning Series", + // date: "10th February, 2022- 11th February, 2022", + // description: + // "An Intermediate Level Programming Course, led by Moubani Ghosh and Antriksh Sharma, who are accomplished competitive coders with a strong grasp of Data Structures and Algorithms (DSA).", + // }, + // { + // title: "Study Abroad Webinar", + // date: "12th December, 2021", + // description: + // "SIT alumni Mukul Shinde: Master’s degree holder in Mechanical and Aerospace Engineering from Illinois Institute of Technology, and Quality Engineer at MilliporeSigma, U.S, Rashi Dhir: SIT graduate currently pursuing her Master’s in Computer Science at New York University, Siddharth Vyas: Final-year B.Tech student in IT at SIT. Participants gained valuable insights and advice on studying abroad from these experienced professionals.", + // }, + // { + // title: "Webinar on Greenware Software", + // date: "31st March, 2024", + // description: + // "Conducted by CodeX in collaboration with the Department of Computer Science and Engineering, featured Kedar Deo, Vice President at Tech Mahindra. Delved into the role of technology for creating a more sustainable future, eco-friendly coding practices and the environmental impact of software.", + // }, +]; + +export default events; diff --git a/src/pages/Events/index.jsx b/src/pages/Events/index.jsx new file mode 100644 index 0000000..e479fde --- /dev/null +++ b/src/pages/Events/index.jsx @@ -0,0 +1,36 @@ +import Marquee from "react-fast-marquee"; +import EventsCard from "./EventsCard"; +import events from "./events"; +import PageTransition from "@/components/PageTransition"; + +function EventsPage() { + return ( + + +
+ + Events + + + Events + + + Events + + + Events + +
+
+
+
+ {events.map((event) => ( + + ))} +
+
+
+ ); +} + +export default EventsPage; diff --git a/src/pages/Gallery/Gallery.jsx b/src/pages/Gallery/Gallery.jsx index 7938e71..a6728d0 100644 --- a/src/pages/Gallery/Gallery.jsx +++ b/src/pages/Gallery/Gallery.jsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import Heading from "@/components/Heading/index"; import PageTransition from "../../components/PageTransition"; -const images = [ +export const images = [ { src: "/CodeX-Website/gallery/RUST SESSION/rs1.JPG", caption: "Rust Session - Introduction to Rust", diff --git a/src/routes/index.jsx b/src/routes/index.jsx index f460a54..611f015 100644 --- a/src/routes/index.jsx +++ b/src/routes/index.jsx @@ -5,6 +5,7 @@ import Gallery from "@/pages/Gallery/Gallery"; import Contact from "@/pages/Contact"; import PageNotFound from "../pages/PageNotFound"; import Loader from "@/components/Loader"; +import Events from "../pages/Events"; const routes = [ { @@ -37,6 +38,12 @@ const routes = [ requireAuth: false, render: , }, + { + label: "Events", + path: "/events", + requireAuth: false, + render: , + }, { label: "Home", path: "/",