diff --git a/package-lock.json b/package-lock.json index 9ad577c..034241a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "@tailwindcss/vite": "^4.1.11", + "lucide-react": "^0.525.0", "react": "^19.1.0", "react-dom": "^19.1.0", "react-router": "^7.6.3", @@ -3082,6 +3083,15 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.525.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.525.0.tgz", + "integrity": "sha512-Tm1txJ2OkymCGkvwoHt33Y2JpN5xucVq1slHcgE6Lk0WjDfjgKWor5CdVER8U6DvcfMwh4M8XxmpTiyzfmfDYQ==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", diff --git a/package.json b/package.json index 294f4ea..fda287c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@tailwindcss/vite": "^4.1.11", + "lucide-react": "^0.525.0", "react": "^19.1.0", "react-dom": "^19.1.0", "react-router": "^7.6.3", diff --git a/src/config/achievement.js b/src/config/achievement.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/config/achievement.jsx b/src/config/achievement.jsx new file mode 100644 index 0000000..99d69f0 --- /dev/null +++ b/src/config/achievement.jsx @@ -0,0 +1,49 @@ +const achievementsData = [ + { + id: 1, + title: "Name", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.", + image: + "https://images.unsplash.com/photo-1593376853899-fbb47a057fa0?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cm9ib3RzfGVufDB8fDB8fHww", + date: "December 2023", + }, + { + id: 2, + title: "Name", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.", + image: + "https://images.unsplash.com/photo-1593376853899-fbb47a057fa0?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cm9ib3RzfGVufDB8fDB8fHww", + date: "December 2023", + }, + { + id: 3, + title: "Name", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.", + image: + "https://images.unsplash.com/photo-1593376853899-fbb47a057fa0?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cm9ib3RzfGVufDB8fDB8fHww", + date: "December 2023", + }, + { + id: 4, + title: "Name", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.", + image: + "https://images.unsplash.com/photo-1593376853899-fbb47a057fa0?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cm9ib3RzfGVufDB8fDB8fHww", + date: "December 2023", + }, + { + id: 5, + title: "Name", + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.", + image: + "https://images.unsplash.com/photo-1593376853899-fbb47a057fa0?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cm9ib3RzfGVufDB8fDB8fHww", + date: "December 2023", + }, +]; + +export default achievementsData; diff --git a/src/config/achievementCard.jsx b/src/config/achievementCard.jsx new file mode 100644 index 0000000..665c1ae --- /dev/null +++ b/src/config/achievementCard.jsx @@ -0,0 +1,54 @@ +import { Calendar } from "lucide-react"; + +const AchievementCard = ({ + title, + description, + image, + date, + isLeft, + index, +}) => { + return ( +
+
+ {/* Image */} +
+ {title} +
+
+ + {/* Content */} +
+
+ + {date} +
+ +

+ {title} +

+ +

{description}

+ + {/* Decorative element */} +
+
+
+
+ ); +}; + +export default AchievementCard; diff --git a/src/config/timeline.jsx b/src/config/timeline.jsx new file mode 100644 index 0000000..8123be8 --- /dev/null +++ b/src/config/timeline.jsx @@ -0,0 +1,130 @@ +import { useEffect, useRef, useState } from "react"; +import AchievementCard from "./achievementCard"; +import achievementsData from "./achievement"; + +const Timeline = () => { + const timelineRef = useRef(null); + const [visibleDots, setVisibleDots] = useState(new Set()); + + useEffect(() => { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + const index = parseInt( + entry.target.getAttribute("data-index") || "0", + ); + setVisibleDots((prev) => new Set([...prev, index])); + } + }); + }, + { threshold: 0.5 }, + ); + + const cards = document.querySelectorAll("[data-index]"); + cards.forEach((card) => observer.observe(card)); + + return () => observer.disconnect(); + }, []); + + return ( +
+
+ {/* Header */} +
+

+ Our Achievements +

+

+ ASME NIT Rourkela excels in fostering innovation and leadership + through workshops, competitions, and expert lectures. Recognized for + achievements in events like the Student Design Challenge and HPVC, + the chapter addresses real-world problems with engineering + creativity. Their STEM outreach initiatives further enhance their + impact, solidifying their reputation for excellence in mechanical + engineering. +

+
+ {/* Timeline */} +
+
+ {achievementsData.map((achievement, index) => ( +
+ {/* Left card */} + + {/* Timeline line and dot */} +
+ {/* Vertical line */} +
+ + {/* Timeline dot */} +
+
+
+
+ {/* Right card */} + + {/* Mobile view: single column, card below dot/line */} +
+
+ +
+
+
+ ))} +
+
+
+
+ ); +}; + +export default Timeline; diff --git a/src/main.jsx b/src/main.jsx index 2a0bd58..56373c7 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -6,16 +6,18 @@ import App from "./App.jsx"; import Playground from "./Playground.jsx"; import Test from "./components/playground/Test.jsx"; import Home from "./pages/playground/landing-page/Home.jsx"; - +import Achievements from "./pages/playground/Achievements.jsx"; +import AchievementPage from "./pages/playground/AchievementPage.jsx"; createRoot(document.getElementById("root")).render( }> - }> - } /> - } /> - + } /> + } /> + } /> + } /> + } /> , diff --git a/src/pages/playground/AchievementPage.jsx b/src/pages/playground/AchievementPage.jsx new file mode 100644 index 0000000..8c2e704 --- /dev/null +++ b/src/pages/playground/AchievementPage.jsx @@ -0,0 +1,13 @@ +import Timeline from "../../config/timeline"; + +const AchievementPage = () => { + return ( +
+
+ +
+
+ ); +}; + +export default AchievementPage; diff --git a/src/pages/playground/Achievements.jsx b/src/pages/playground/Achievements.jsx new file mode 100644 index 0000000..b2b423b --- /dev/null +++ b/src/pages/playground/Achievements.jsx @@ -0,0 +1,57 @@ +import { useNavigate } from "react-router"; +import achievementsData from "../../config/achievement"; + +export default function Achievements() { + const navigate = useNavigate(); + + return ( +
+
+

+ Our Achievements +

+

+ ASME NIT Rourkela excels in fostering innovation and leadership + through workshops, competitions, and expert lectures. Recognized for + achievements in events like the Student Design Challenge and HPVC, the + chapter addresses real-world problems with engineering creativity. + Their STEM outreach initiatives further enhance their impact, + solidifying their reputation for excellence in mechanical engineering. +

+ +
+ +
+
+
+ +
+ {achievementsData.map((item, index) => ( +
+
+ +
+

{item.title}

+

{item.description}

+
+
+ ))} +
+
+
+ ); +}