From 5be2f65d552f59ce56293058464eaeb11f533c11 Mon Sep 17 00:00:00 2001 From: Ikki Date: Sun, 27 Oct 2024 02:38:15 +0530 Subject: [PATCH] about-page-revamp --- frontend/package.json | 2 + frontend/src/App.jsx | 3 +- frontend/src/Pages/AboutUs.jsx | 226 ++++++++++-------------- frontend/src/components/TeamSection.jsx | 159 +++++++++++++++++ frontend/src/components/about.jsx | 163 ----------------- 5 files changed, 258 insertions(+), 295 deletions(-) create mode 100644 frontend/src/components/TeamSection.jsx delete mode 100644 frontend/src/components/about.jsx diff --git a/frontend/package.json b/frontend/package.json index 104935a..4a6b2ce 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,11 +19,13 @@ "google-translate-api-x": "^10.7.1", "jwt-decode": "^4.0.0", "leaflet": "^1.9.4", + "lucide-react": "^0.453.0", "react": "^18.3.1", "react-datepicker": "^7.4.0", "react-dom": "^18.3.1", "react-icons": "^5.3.0", "react-leaflet": "^4.2.1", + "react-responsive": "^10.0.0", "react-router-dom": "^6.26.2", "shadcn-ui": "^0.2.3", "socket.io-client": "^4.8.0", diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index fd17d9c..cc51905 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -17,7 +17,6 @@ import Chatbot from "./components/chatbot"; import ContactUs from "./Pages/ContactUs"; import Settings from "./components/Settings"; import Help from "./components/help"; -import About from "./components/about"; import Contributor from "./Pages/contributor"; import Payment from "./Pages/Payment"; import HelpAndSupport from "./Pages/HelpandSupport"; @@ -46,7 +45,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> } /> } /> diff --git a/frontend/src/Pages/AboutUs.jsx b/frontend/src/Pages/AboutUs.jsx index accbc4d..521f558 100644 --- a/frontend/src/Pages/AboutUs.jsx +++ b/frontend/src/Pages/AboutUs.jsx @@ -1,9 +1,9 @@ import React from 'react'; // Importing React import { useNavigate } from 'react-router-dom'; // Importing navigation function import backicon from '../assets/svg/backicon.svg'; // Importing back icon asset - +import TeamSection from '../components/TeamSection'; // About component -const About = () => { +const AboutUs = () => { // UseNavigate hook for navigation const navigate = useNavigate(); @@ -12,15 +12,8 @@ const About = () => { // Navigates to the home page when back button is clicked navigate('/'); }; - - - // Return JSX structure return ( -
- - {/* Back button to navigate to home */} +
- - {/* Main Heading */} -

- ABOUT US -

- - {/* Introduction Section */} -

- Welcome to{' '} - - StationSaarthi - , - your one-stop platform designed to elevate your Indian Railway Station experience. - With cutting-edge technology and user-friendly design, we aim to provide smooth and efficient - travel assistance for all passengers. -

- - {/* Our Mission Section */} -
-

- Our Mission -

-

- At{' '} - - StationSaarthi - , - our mission is to simplify the railway station experience by integrating advanced technology - and providing real-time, actionable information to every traveler. - We are committed to enhancing travel convenience for all. + {/* Hero Section */} +

+

Welcome to Station Saarthi

+

+ Elevate Your Railway Station Experience +

+

+ StationSaarthi is your one-stop platform designed to elevate your Indian Railway Station + experience. With cutting-edge technology and user-friendly design, we aim to provide + smooth and efficient travel assistance for all passengers.

-
+ - {/* Our Vision Section */} -
-

- Our Vision -

-

- Our vision is a future where every journey is hassle-free. - We strive to create a travel ecosystem that connects passengers, railways, and services - through seamless digital integration. -

-
+ {/* Our Mission & Vision Section */} +
+
+

Our Mission

+

+ At StationSaarthi, our mission is to simplify the railway station experience by + integrating advanced technology and providing real-time, actionable information to every + traveler. We are committed to enhancing travel convenience for all. +

+
+
+

Our Vision

+

+ Our vision is a future where every journey is hassle-free. We strive to create a travel + ecosystem that connects passengers, railways, and services through seamless digital + integration. +

+
+
{/* What We Offer Section */} -
-

- What We Offer -

-

- With{' '} - - StationSaarthi - , - you get access to: -

    -
  • Real-time train updates and notifications
  • -
  • Interactive station maps for easy navigation
  • -
  • Personalized travel recommendations
  • -
  • Multi-language support to cater to diverse passengers
  • -
  • Accessible services for differently-abled travelers
  • -
-

+
+

What We Offer

+
+
+
+ +
+

Real-Time Train Updates

+

+ Stay informed with live train schedules and notifications for timely travel assistance. +

+
+
+
+ +
+

Interactive Station Maps

+

+ Navigate the station effortlessly with detailed maps, making it easier to find your way. +

+
+
+
+ +
+

Accessible Services

+

+ Our platform ensures accessible services, providing support for differently-abled travelers. +

+
+
{/* Why Choose Us Section */} -
-

- Why Choose Us? -

-

- - StationSaarthi{' '} - - is more than a service; it's a commitment to revolutionizing your railway station experience. - We believe in technology's power to enhance every aspect of your journey, ensuring safety, - comfort, and convenience at every step. -

-
+
+

Why Choose StationSaarthi?

+

+ With StationSaarthi, you’re not just navigating a station — you're embracing a revolutionary approach to travel. Our platform is designed to streamline your experience, providing you with essential resources, convenience, and tailored support. +

+
+
+

Smart Journey Planning

+

Plan your trips efficiently with our smart journey planning tools and suggestions.

+
+
+

User-Friendly Interface

+

Enjoy a seamless experience with our intuitive and easy-to-use platform.

+
+
+

Community Support

+

Join a community of travelers to share experiences, tips, and support for a better journey.

+
+
+
- {/* Our Team Section */} -
-

- Meet the Team -

-

- Our diverse team of professionals is driven by a passion for innovation. - With expertise spanning technology, transportation, and user experience design, - we are dedicated to making railway stations smarter, more efficient, and more - enjoyable for every passenger. -

-
- {/* Footer */} -
+ {/* Meet the Team Section */} +
+ + + +
+ + {/* Footer Section */} +

© 2024 StationSaarthi | All rights reserved

-
+
); -}; +} -// Exporting the About component for use in other parts of the app -export default About; +export default AboutUs; diff --git a/frontend/src/components/TeamSection.jsx b/frontend/src/components/TeamSection.jsx new file mode 100644 index 0000000..72cfaba --- /dev/null +++ b/frontend/src/components/TeamSection.jsx @@ -0,0 +1,159 @@ +import React, { useState, useEffect, useCallback } from 'react'; +import { ChevronLeft, ChevronRight, Star } from 'lucide-react'; +import { useMediaQuery } from 'react-responsive'; + +const teamMembers = [ + { + name: 'Rajesh Kumar', + role: 'Technology Lead', + image: 'https://media.istockphoto.com/id/613557584/photo/portrait-of-a-beautifull-smiling-man.jpg?s=612x612&w=0&k=20&c=hkCg5CrmTKOApePbPOyo1U9GexEfIJOJqoLXJIvcN8E=', // Add actual image URL + quote: 'Passionate about technology and travel.', + bio: 'With over 10 years of experience in software development, Rajesh leads our tech initiatives to enhance the travel experience.', + }, + { + name: 'Anita Desai', + role: 'User Experience Designer', + image: 'https://www.stylecraze.com/wp-content/uploads/2013/05/Most-Beautiful-Women-In-India.jpg', // Add actual image URL + quote: 'Designing for users is my passion.', + bio: 'Anita specializes in creating user-friendly interfaces that simplify interactions and enhance accessibility.', + }, + { + name: 'Vikram Singh', + role: 'Operations Manager', + image: 'https://english.cdn.zeenews.com/sites/default/files/2017/11/17/639329-indian-men.jpg', // Add actual image URL + quote: 'Optimizing processes for better efficiency.', + bio: 'Vikram ensures that our operations run smoothly, focusing on delivering top-notch services to travelers.', + }, + { + name: 'Rekha Sharma', + role: 'UX/UI Designer', + image: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQJv1aDBUeruN6ZJwt5VqNHQx1UfUM8wShdEjGRAvW1lQxCAMG4cTgUX_ekZXDKHbAg8wQ&usqp=CAU', + quote: 'Creating user-centric designs.', + bio: 'Rekha ensures our interfaces are not only beautiful but also intuitive for users.' + }, + { + name: 'Suresh Mehta', + role: 'Customer Support Lead', + image: 'https://cdn.openart.ai/stable_diffusion/18d45fc8e03d0f93cb1b170c810720b55d1822c7_2000x2000.webp', + quote: 'Ensuring a smooth journey for every passenger.', + bio: 'Suresh leads our customer support team, dedicated to resolving queries efficiently.' + }, + // Add more team member objects as needed +]; + +// Duplicate the first and last members for infinite scroll effect +const infiniteTeamMembers = teamMembers; + +const TeamCard = ({ member }) => ( +
+
+
+ {member.name} +
+

{member.name}

+

{member.role}

+
+
+

"{member.quote}"

+

{member.bio}

+
+
+); + +const TeamSection = () => { + const [currentIndex, setCurrentIndex] = useState(1); // Start at the first real member + const [isTransitioning, setIsTransitioning] = useState(false); + const isSmallScreen = useMediaQuery({ query: '(max-width: 640px)' }); + const isLargeScreen = useMediaQuery({ query: '(min-width: 641px)' }); + + const teamWidth = isSmallScreen ? 100 : 100 / 3; + + const nextMember = useCallback(() => { + setIsTransitioning(true); + setCurrentIndex((prevIndex) => { + if (prevIndex === infiniteTeamMembers.length - 2) { + setTimeout(() => { + setIsTransitioning(false); + setCurrentIndex(1); + }, 500); + return prevIndex; + } + return prevIndex + 1; + }); + }, []); + + const prevMember = useCallback(() => { + setIsTransitioning(true); + setCurrentIndex((prevIndex) => { + if (prevIndex === 1) { + setTimeout(() => { + setIsTransitioning(false); + setCurrentIndex(infiniteTeamMembers.length - 2); + }, 500); + return prevIndex; + } + return prevIndex - 1; + }); + }, []); + + useEffect(() => { + const timer = setInterval(nextMember, 4000); + return () => clearInterval(timer); + }, [nextMember]); + + return ( +
+
+

+ Meet Our Team +

+

+ Our diverse team of professionals is driven by a passion for innovation. With expertise + spanning technology, transportation, and user experience design, we are dedicated to + making railway stations smarter, more efficient, and more enjoyable for every passenger. +

+
+
+
+ {infiniteTeamMembers.map((member, index) => ( +
+ +
+ ))} +
+
+ + +
+
+ {infiniteTeamMembers + .slice(1, isLargeScreen ? infiniteTeamMembers.length-1 : infiniteTeamMembers.length) + .map((_, index) => ( +
setCurrentIndex(index + 1)} + className={`w-2 h-2 mx-1 rounded-full cursor-pointer transition-colors duration-200 ${index + 1 === currentIndex ? 'bg-blue-600' : 'bg-gray-300'}`} + /> + ))} +
+
+
+ ); +}; + +export default TeamSection; diff --git a/frontend/src/components/about.jsx b/frontend/src/components/about.jsx deleted file mode 100644 index e165550..0000000 --- a/frontend/src/components/about.jsx +++ /dev/null @@ -1,163 +0,0 @@ -import React from 'react'; // Importing React -import { useNavigate } from 'react-router-dom'; // Importing navigation function -import backicon from '../assets/svg/backicon.svg'; // Importing back icon asset - -// About component -const About = () => { - // UseNavigate hook for navigation - const navigate = useNavigate(); - - // Function to handle home button click - const HomeClick = () => { - // Navigates to the home page when back button is clicked - navigate('/'); - }; - - // Return JSX structure - return ( -
- - {/* Back button to navigate to home */} - - - {/* Main Heading */} -

- ABOUT US -

- - {/* Introduction Section */} -

- Welcome to - - StationSaarthi - , - your one-stop platform designed to elevate your Indian Railway Station experience. - With cutting-edge technology and user-friendly design, we aim to provide smooth and efficient - travel assistance for all passengers. -

- - {/* Our Mission Section */} -
-

- Our Mission -

-

- At - - StationSaarthi - , - our mission is to simplify the railway station experience by integrating advanced technology - and providing real-time, actionable information to every traveler. - We are committed to enhancing travel convenience for all. -

-
- - {/* Our Vision Section */} -
-

- Our Vision -

-

- Our vision is a future where every journey is hassle-free. - We strive to create a travel ecosystem that connects passengers, railways, and services - through seamless digital integration. -

-
- - {/* What We Offer Section */} -
-

- What We Offer -

-

- With - - StationSaarthi - , - you get access to: -

    -
  • Real-time train updates and notifications
  • -
  • Interactive station maps for easy navigation
  • -
  • Personalized travel recommendations
  • -
  • Multi-language support to cater to diverse passengers
  • -
  • Accessible services for differently-abled travelers
  • -
-

-
- - {/* Why Choose Us Section */} -
-

- Why Choose Us? -

-

- - StationSaarthi - - is more than a service; it's a commitment to revolutionizing your railway station experience. - We believe in technology's power to enhance every aspect of your journey, ensuring safety, - comfort, and convenience at every step. -

-
- - {/* Our Team Section */} -
-

- Meet the Team -

-

- Our diverse team of professionals is driven by a passion for innovation. - With expertise spanning technology, transportation, and user experience design, - we are dedicated to making railway stations smarter, more efficient, and more - enjoyable for every passenger. -

-
- - {/* Footer */} -
-

© 2024 StationSaarthi | All rights reserved

-
-
- ); -}; - -// Exporting the About component for use in other parts of the app -export default About;