From 5819639c82d0cf2aa67bfd7ff1b05a28ee3b7608 Mon Sep 17 00:00:00 2001 From: bhansa Date: Sat, 31 Jan 2026 13:01:36 +0530 Subject: [PATCH 1/2] feat: add journey timeline section --- src/app/page.jsx | 3 + src/components/Journey.jsx | 371 +++++++++++++++++++++++++++++++++++++ src/config/featureFlags.js | 1 + 3 files changed, 375 insertions(+) create mode 100644 src/components/Journey.jsx diff --git a/src/app/page.jsx b/src/app/page.jsx index 328afcd..7320ff4 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -2,6 +2,7 @@ import { useEffect } from 'react'; import Hero from '@/components/Hero'; +import Journey from '@/components/Journey'; import KeynoteSpeakers from '@/components/KeynoteSpeakers'; import MeetOrganizers from '@/components/MeetOrganizers'; import SponsorsSection from '@/components/Sponsors'; @@ -34,6 +35,7 @@ export default function Home() { const isMeetOrganizersEnabled = useFeatureFlag('MEET_ORGANIZERS'); const isWhyAttendEnabled = useFeatureFlag('WHY_ATTEND'); const isEpicFramesEnabled = useFeatureFlag('EPIC_FRAMES'); + const isJourneyEnabled = useFeatureFlag('JOURNEY'); useEffect(() => { const hash = window.location.hash; @@ -48,6 +50,7 @@ export default function Home() { return ( <> + {isJourneyEnabled && } {isKeynoteSpeakersEnabled && ( )} diff --git a/src/components/Journey.jsx b/src/components/Journey.jsx new file mode 100644 index 0000000..7dd2313 --- /dev/null +++ b/src/components/Journey.jsx @@ -0,0 +1,371 @@ +'use client'; + +import { useEffect, useRef, useState } from 'react'; +import { Heading, Paragraph, Span } from '@/components/Typography'; + +const journeyData = [ + { + year: '2017', + title: '1st edition', + description: 'Python conference in Hyderabad', + position: 'top', + }, + { + year: '2018', + title: 'PyCon India 10th edition', + description: 'Hosted & conducted PyCon India\'s 10th edition in Hyderabad, achieving record attendance.', + position: 'bottom', + }, + { + year: '2019', + title: '2nd edition', + description: 'PyConf Hyderabad', + position: 'top', + }, + { + year: '2020', + title: '3rd edition', + description: 'PyConf Hyderabad virtual conference', + position: 'bottom', + }, + { + year: '2022', + title: '4th edition', + description: 'PyConf Hyderabad', + position: 'top', + }, + { + year: '2023', + title: 'PyCon India', + description: 'Hosted & conducted the 1st in-person PyCon India after pandemic', + position: 'bottom', + }, + { + year: '2025', + title: '5th edition', + description: 'PyConf Hyderabad', + position: 'top', + }, +]; + +const Star = ({ className = '' }) => ( + + + +); + +const TimelineItem = ({ item, index, isVisible }) => { + const isTop = item.position === 'top'; + + return ( +
+ {/* Content for top items */} + {isTop && ( +
+ + {item.year} + + + {item.title} + + + {item.description} + +
+ )} + + {/* Star marker */} +
+ +
+ + {/* Content for bottom items */} + {!isTop && ( +
+ + {item.year} + + + {item.title} + + + {item.description} + +
+ )} +
+ ); +}; + +const MobileTimelineItem = ({ item, index, isVisible }) => { + return ( +
+ {/* Star and line */} +
+
+ +
+ {index < journeyData.length - 1 && ( +
+ )} +
+ + {/* Content */} +
+ + {item.year} + + + {item.title} + + + {item.description} + +
+
+ ); +}; + +const Journey = () => { + const sectionRef = useRef(null); + const [isVisible, setIsVisible] = useState(false); + + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setIsVisible(true); + } + }, + { + threshold: 0.2, + rootMargin: '0px 0px -50px 0px', + } + ); + + if (sectionRef.current) { + observer.observe(sectionRef.current); + } + + return () => { + if (sectionRef.current) { + observer.unobserve(sectionRef.current); + } + }; + }, []); + + return ( +
+
+ {/* Section Header */} +
+ + Events Over the Years + +
+ + {/* Desktop Timeline */} +
+
+ {/* Timeline container */} +
+ {/* Top row items */} +
+ {journeyData.map((item, index) => ( + item.position === 'top' ? ( +
+
+ + {item.year} + + + {item.title} + + + {item.description} + +
+
+ ) : ( +
+ ) + ))} +
+ + {/* Timeline bar with stars */} +
+ {/* Red timeline bar */} +
+ + {/* Stars positioned on the bar */} +
+ {journeyData.map((item, index) => ( +
+
+ +
+
+ ))} +
+
+ + {/* Bottom row items */} +
+ {journeyData.map((item, index) => ( + item.position === 'bottom' ? ( +
+
+ + {item.year} + + + {item.title} + + + {item.description} + +
+
+ ) : ( +
+ ) + ))} +
+
+
+
+ + {/* Mobile Timeline */} +
+
+ {journeyData.map((item, index) => ( + + ))} +
+
+
+
+ ); +}; + +export default Journey; diff --git a/src/config/featureFlags.js b/src/config/featureFlags.js index 70476ca..aab5eb6 100644 --- a/src/config/featureFlags.js +++ b/src/config/featureFlags.js @@ -12,6 +12,7 @@ export const FEATURE_FLAGS = { MEET_ORGANIZERS: true, WHY_ATTEND: true, EPIC_FRAMES: true, + JOURNEY: true, SPEAKERS_PAGE: false, TICKETS: true, BLOG_POSTS: false, From a5ca251d1ad7374b76d5711292db2234c76b9cd5 Mon Sep 17 00:00:00 2001 From: bhansa Date: Sat, 31 Jan 2026 13:04:33 +0530 Subject: [PATCH 2/2] fix: pre-push changes --- README.md | 5 --- package-lock.json | 4 ++ src/components/Hero.jsx | 2 +- src/components/Journey.jsx | 83 +++++++++++++++++++++++--------------- 4 files changed, 56 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 2aaf5c1..319aca2 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,11 @@ This is the repo for PyConf Hyderabad 2026's website. The 6th edition of the reg Before you start, ensure you have Node.js and a package manager installed on your machine. Follow these steps: 1. **Download Node.js**: - - Visit the [Node.js official website](https://nodejs.org/). - Download the v20.18.0 version. This was the latest LTS version when the project was created. - Follow the installation instructions provided on the website. 2. **Verify Installation**: - - Open your terminal or command prompt. - Run the following command to check if Node.js is installed: ```bash @@ -24,7 +22,6 @@ Before you start, ensure you have Node.js and a package manager installed on you - You should see the version number of Node.js. 3. **Install a Package Manager**: - - Node.js comes with npm (Node Package Manager) by default. To check if npm is installed, run: ```bash npm -v @@ -32,7 +29,6 @@ Before you start, ensure you have Node.js and a package manager installed on you - Alternatively, you can use other package managers like Yarn or pnpm. 4. **Install Dependencies**: - - Install the project dependencies using your preferred package manager: ```bash npm install @@ -43,7 +39,6 @@ Before you start, ensure you have Node.js and a package manager installed on you ``` 5. **Run the Development Server**: - - Once Node.js and a package manager are installed, you can start the development server: ```bash diff --git a/package-lock.json b/package-lock.json index affdf2c..f58c6d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "pyconfhyd2026", "version": "0.1.0", + "license": "MIT", "dependencies": { "@mdx-js/loader": "^3.1.0", "@next/mdx": "^15.1.3", @@ -26,6 +27,9 @@ "postcss": "^8.4.47", "prettier": "^3.3.3", "tailwindcss": "^3.4.14" + }, + "engines": { + "node": ">=20.18.0" } }, "node_modules/@alloc/quick-lru": { diff --git a/src/components/Hero.jsx b/src/components/Hero.jsx index 14a0aca..caaa6a5 100644 --- a/src/components/Hero.jsx +++ b/src/components/Hero.jsx @@ -101,7 +101,7 @@ const Hero = () => { fill />
- + {/* */}
diff --git a/src/components/Journey.jsx b/src/components/Journey.jsx index 7dd2313..1248bb3 100644 --- a/src/components/Journey.jsx +++ b/src/components/Journey.jsx @@ -13,7 +13,8 @@ const journeyData = [ { year: '2018', title: 'PyCon India 10th edition', - description: 'Hosted & conducted PyCon India\'s 10th edition in Hyderabad, achieving record attendance.', + description: + "Hosted & conducted PyCon India's 10th edition in Hyderabad, achieving record attendance.", position: 'bottom', }, { @@ -37,7 +38,8 @@ const journeyData = [ { year: '2023', title: 'PyCon India', - description: 'Hosted & conducted the 1st in-person PyCon India after pandemic', + description: + 'Hosted & conducted the 1st in-person PyCon India after pandemic', position: 'bottom', }, { @@ -73,24 +75,27 @@ const TimelineItem = ({ item, index, isVisible }) => { {/* Content for top items */} {isTop && (
- + {item.year} - + {item.title} - + {item.description}
)} {/* Star marker */} -
{ {/* Content for bottom items */} {!isTop && (
- + {item.year} - + {item.title} - + {item.description}
@@ -134,7 +141,8 @@ const MobileTimelineItem = ({ item, index, isVisible }) => { > {/* Star and line */}
-
{ {/* Content */}
- + {item.year} - + {item.title} - + {item.description}
@@ -224,9 +234,12 @@ const Journey = () => {
{/* Top row items */}
- {journeyData.map((item, index) => ( + {journeyData.map((item, index) => item.position === 'top' ? ( -
+
{ ) : (
) - ))} + )}
{/* Timeline bar with stars */} @@ -284,7 +297,10 @@ const Journey = () => { {/* Stars positioned on the bar */}
{journeyData.map((item, index) => ( -
+
{ {/* Bottom row items */}
- {journeyData.map((item, index) => ( + {journeyData.map((item, index) => item.position === 'bottom' ? ( -
+
{ ) : (
) - ))} + )}