From 61bac5d88af6ad63d1e362264ff2e57ef84d2817 Mon Sep 17 00:00:00 2001 From: Krish Agarwal Date: Fri, 18 Jul 2025 17:01:52 +0530 Subject: [PATCH 1/3] style: change carousel positioning --- src/components/Sponsor.jsx | 20 +++++++------ src/components/Team.jsx | 57 ++++++++++++++++--------------------- src/components/sponsor.css | 25 ++++++++++++++++ src/pages/team/TeamPage.jsx | 17 +++-------- 4 files changed, 64 insertions(+), 55 deletions(-) diff --git a/src/components/Sponsor.jsx b/src/components/Sponsor.jsx index d48b46c..beed0ae 100644 --- a/src/components/Sponsor.jsx +++ b/src/components/Sponsor.jsx @@ -65,13 +65,15 @@ const SponsorsSection = () => { return (
-
-

- Our Sponsors and Partners -

-

- We are proudly supported by our amazing sponsors and partners. -

+
+
+

+ Our Sponsors and Partners +

+

+ We are proudly supported by our amazing sponsors and partners. +

+
{
diff --git a/src/components/Team.jsx b/src/components/Team.jsx index 144b337..23ee83a 100644 --- a/src/components/Team.jsx +++ b/src/components/Team.jsx @@ -1,5 +1,6 @@ import { useState, useEffect } from "react"; import teamMembers from "../config/teammate"; +import { ArrowLeft, ArrowRight } from "lucide-react"; import { FaLinkedin, FaXTwitter } from "react-icons/fa6"; const TeamSlider = () => { @@ -45,16 +46,32 @@ const TeamSlider = () => {
-

Our team

-

+

Our team

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
+ + + +
{ ))}
- -
- - -
- -
- {Array.from({ length: pageCount }).map((_, idx) => ( - - ))} -
-
-

Join Us Today!

-

+

+

Join Us Today!

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

-
diff --git a/src/components/sponsor.css b/src/components/sponsor.css index 7613c95..a2b22d9 100644 --- a/src/components/sponsor.css +++ b/src/components/sponsor.css @@ -5,3 +5,28 @@ -ms-overflow-style: none; scrollbar-width: none; } +.carousel-arrow-btn { + width: 48px; + height: 48px; + display: flex; + align-items: center; + justify-content: center; + border: none; + border-radius: 50%; + background: linear-gradient(135deg, #112051 60%, #c7d2fe 100%); + box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15); + color: #fff; + cursor: pointer; + transition: + transform 0.2s, + box-shadow 0.2s, + background 0.2s; + font-size: 1.5rem; + margin-right: -5px; +} + +.carousel-arrow-btn:hover { + transform: scale(1.1); + background: linear-gradient(135deg, #2563eb 80%, #a5b4fc 100%); + box-shadow: 0 4px 16px rgba(30, 64, 175, 0.25); +} diff --git a/src/pages/team/TeamPage.jsx b/src/pages/team/TeamPage.jsx index 09270a7..25b1ea1 100644 --- a/src/pages/team/TeamPage.jsx +++ b/src/pages/team/TeamPage.jsx @@ -1,8 +1,9 @@ import { useState } from "react"; import { FaLinkedin, FaXTwitter } from "react-icons/fa6"; +import teamMembers from "../../config/teammate"; import container from "../../assets/Frame 142.png"; -const TeamPage = ({ teamMembers = [] }) => { +const TeamPage = () => { const [activeTeam, setActiveTeam] = useState("All"); const teams = ["All", "Team 1", "Team 2", "Team 3", "Team 4"]; @@ -14,24 +15,15 @@ const TeamPage = ({ teamMembers = [] }) => { return (
-
- Team Cover -
- -
+

Meet Our Team

-

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit...

- {/* Tabs */}
{teams.map((team) => (
- {/* Team Cards */}
{filteredMembers.map((member, index) => (
From e55ce306e382a92cdaab37e17f540d36501d6eff Mon Sep 17 00:00:00 2001 From: Krish Agarwal Date: Fri, 18 Jul 2025 19:32:04 +0530 Subject: [PATCH 2/3] feat: adjust carousel button size --- src/components/Sponsor.jsx | 41 +++++++++++++++++++------------------- src/components/Team.jsx | 10 +++++----- src/components/sponsor.css | 25 ----------------------- 3 files changed, 26 insertions(+), 50 deletions(-) diff --git a/src/components/Sponsor.jsx b/src/components/Sponsor.jsx index beed0ae..32ef68c 100644 --- a/src/components/Sponsor.jsx +++ b/src/components/Sponsor.jsx @@ -66,20 +66,29 @@ const SponsorsSection = () => { return (
-
-

+
+

Our Sponsors and Partners

-

+

We are proudly supported by our amazing sponsors and partners.

setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > + {/* Left Arrow */} + + + {/* Sponsor Scroll Area */}
{ className="flex-shrink-0 px-2 box-border" style={{ width: `${100 / visibleCount}%` }} > -
+
{sponsor.name}
))}
-
- - -
+

diff --git a/src/components/Team.jsx b/src/components/Team.jsx index 23ee83a..a38efd0 100644 --- a/src/components/Team.jsx +++ b/src/components/Team.jsx @@ -58,18 +58,18 @@ const TeamSlider = () => {
@@ -88,7 +88,7 @@ const TeamSlider = () => { {member.name}

{member.name}

diff --git a/src/components/sponsor.css b/src/components/sponsor.css index a2b22d9..7613c95 100644 --- a/src/components/sponsor.css +++ b/src/components/sponsor.css @@ -5,28 +5,3 @@ -ms-overflow-style: none; scrollbar-width: none; } -.carousel-arrow-btn { - width: 48px; - height: 48px; - display: flex; - align-items: center; - justify-content: center; - border: none; - border-radius: 50%; - background: linear-gradient(135deg, #112051 60%, #c7d2fe 100%); - box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15); - color: #fff; - cursor: pointer; - transition: - transform 0.2s, - box-shadow 0.2s, - background 0.2s; - font-size: 1.5rem; - margin-right: -5px; -} - -.carousel-arrow-btn:hover { - transform: scale(1.1); - background: linear-gradient(135deg, #2563eb 80%, #a5b4fc 100%); - box-shadow: 0 4px 16px rgba(30, 64, 175, 0.25); -} From d1de1607bcac75c1f1f7a306606430db1f0e7d4c Mon Sep 17 00:00:00 2001 From: Krish Agarwal Date: Fri, 18 Jul 2025 22:11:17 +0530 Subject: [PATCH 3/3] eslint error --- src/components/Sponsor.jsx | 20 ++++++++++---------- src/components/Team.jsx | 3 --- src/pages/team/TeamPage.jsx | 1 - 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/components/Sponsor.jsx b/src/components/Sponsor.jsx index 32ef68c..fb986ad 100644 --- a/src/components/Sponsor.jsx +++ b/src/components/Sponsor.jsx @@ -35,15 +35,6 @@ const SponsorsSection = () => { return Math.ceil(sponsors.length / visibleCount); }; - const autoScroll = () => { - const container = scrollRef.current; - if (!container) return; - - const pages = totalPages(); - pageIndex.current = (pageIndex.current + 1) % pages; - scrollToPage(pageIndex.current); - }; - const handleManualScroll = (direction) => { const pages = totalPages(); if (direction === "left") { @@ -56,9 +47,18 @@ const SponsorsSection = () => { }; useEffect(() => { + const autoScroll = () => { + const container = scrollRef.current; + if (!container) return; + + const pages = totalPages(); + pageIndex.current = (pageIndex.current + 1) % pages; + scrollToPage(pageIndex.current); + }; + let interval; if (!isHovered) { - interval = setInterval(autoScroll, 3000); + interval = setInterval(autoScroll, 5000); } return () => clearInterval(interval); }, [isHovered, visibleCount]); diff --git a/src/components/Team.jsx b/src/components/Team.jsx index a38efd0..234b345 100644 --- a/src/components/Team.jsx +++ b/src/components/Team.jsx @@ -39,9 +39,6 @@ const TeamSlider = () => { setCurrentIndex((prev) => Math.max(prev - visibleCount, 0)); }; - const pageCount = Math.ceil(teamMembers.length / visibleCount); - const activeDot = Math.round(currentIndex / visibleCount); - return (
diff --git a/src/pages/team/TeamPage.jsx b/src/pages/team/TeamPage.jsx index 25b1ea1..83d9795 100644 --- a/src/pages/team/TeamPage.jsx +++ b/src/pages/team/TeamPage.jsx @@ -1,7 +1,6 @@ import { useState } from "react"; import { FaLinkedin, FaXTwitter } from "react-icons/fa6"; import teamMembers from "../../config/teammate"; -import container from "../../assets/Frame 142.png"; const TeamPage = () => { const [activeTeam, setActiveTeam] = useState("All");