Skip to content

Commit e55ce30

Browse files
committed
feat: adjust carousel button size
1 parent 61bac5d commit e55ce30

3 files changed

Lines changed: 26 additions & 50 deletions

File tree

src/components/Sponsor.jsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,29 @@ const SponsorsSection = () => {
6666
return (
6767
<section className="bg-white py-10 relative overflow-hidden">
6868
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:pl-0">
69-
<div>
70-
<h2 className="text-3xl sm:text-4xl font-bold text-slate-900 mb-4">
69+
<div className="mb-8">
70+
<h2 className="text-3xl sm:text-4xl font-bold text-slate-900 mb-2">
7171
Our Sponsors and Partners
7272
</h2>
73-
<p className="text-gray-700 text-lg mb-8">
73+
<p className="text-gray-700 text-lg">
7474
We are proudly supported by our amazing sponsors and partners.
7575
</p>
7676
</div>
7777

7878
<div
79-
className="relative overflow-hidden"
79+
className="relative"
8080
onMouseEnter={() => setIsHovered(true)}
8181
onMouseLeave={() => setIsHovered(false)}
8282
>
83+
{/* Left Arrow */}
84+
<button
85+
onClick={() => handleManualScroll("left")}
86+
className="absolute left-0 sm:left-0 top-1/2 -translate-y-1/2 sm:-translate-x-3 bg-[#00163A] rounded-full p-2 sm:p-2.5 shadow z-10 cursor-pointer hover:bg-[#2563eb]"
87+
>
88+
<ArrowLeft className="w-5 h-5 sm:w-6 sm:h-6 text-white" />
89+
</button>
90+
91+
{/* Sponsor Scroll Area */}
8392
<div
8493
ref={scrollRef}
8594
className="flex overflow-x-auto scroll-smooth hide-scrollbar"
@@ -93,31 +102,23 @@ const SponsorsSection = () => {
93102
className="flex-shrink-0 px-2 box-border"
94103
style={{ width: `${100 / visibleCount}%` }}
95104
>
96-
<div className="h-64 bg-white flex items-center justify-center rounded transition duration-300 transform hover:shadow-xl cursor-pointer border-2">
105+
<div className="h-64 bg-white flex items-center justify-center rounded-xl transition duration-300 transform hover:shadow-xl cursor-pointer border-2">
97106
<img
98107
src={sponsor.image}
99108
alt={sponsor.name}
100-
className="object-contain h-32"
109+
className="object-contain h-32 "
101110
/>
102111
</div>
103112
</a>
104113
))}
105114
</div>
106115

107-
<div className="flex justify-center space-x-4 mt-6">
108-
<button
109-
onClick={() => handleManualScroll("left")}
110-
className="carousel-arrow-btn absolute left-2 top-1/2 -translate-y-1/2 z-10"
111-
>
112-
<ArrowLeft />
113-
</button>
114-
<button
115-
onClick={() => handleManualScroll("right")}
116-
className="carousel-arrow-btn absolute right-2 top-1/2 -translate-y-1/2 z-10"
117-
>
118-
<ArrowRight />
119-
</button>
120-
</div>
116+
<button
117+
onClick={() => handleManualScroll("right")}
118+
className="absolute right-0 sm:right-0 top-1/2 -translate-y-1/2 sm:translate-x-3 bg-[#00163A] cursor-pointer rounded-full p-2 sm:p-2.5 shadow z-10 hover:bg-[#2563eb]"
119+
>
120+
<ArrowRight className="w-5 h-5 sm:w-6 sm:h-6 text-white" />
121+
</button>
121122
</div>
122123
</div>
123124
</section>

src/components/Team.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ const TeamSlider = () => {
5858
<div className="relative">
5959
<button
6060
onClick={prevSlide}
61-
className="absolute left-2 top-1/3 -translate-y-1/2 z-10 p-2 border-2 rounded-full bg-white border-gray-300 shadow-lg hover:bg-gray-100 flex items-center justify-center cursor-pointer"
61+
className="absolute left-0 top-1/3 -translate-y-1/2 -translate-x-3 z-10 p-1.5 sm:p-2 border-2 rounded-full bg-white border-gray-300 shadow-lg hover:bg-gray-100 flex items-center justify-center cursor-pointer"
6262
aria-label="Previous"
6363
>
64-
<ArrowLeft size={24} color="#00163A" />
64+
<ArrowLeft className="w-6 h-6" color="#00163A" />
6565
</button>
6666

6767
<button
6868
onClick={nextSlide}
69-
className="absolute right-2 top-1/3 -translate-y-1/2 z-10 p-2 border-2 rounded-full bg-white border-gray-300 shadow-lg hover:bg-gray-100 flex items-center justify-center cursor-pointer"
69+
className="absolute right-0 top-1/3 -translate-y-1/2 translate-x-3 z-10 p-1.5 sm:p-2 border-2 rounded-full bg-white border-gray-300 shadow-lg hover:bg-gray-100 flex items-center justify-center cursor-pointer"
7070
aria-label="Next"
7171
>
72-
<ArrowRight size={24} color="#00163A" />
72+
<ArrowRight className=" w-5 h-5 sm:w-6 sm:h-6" color="#00163A" />
7373
</button>
7474

7575
<div className="overflow-hidden">
@@ -88,7 +88,7 @@ const TeamSlider = () => {
8888
<img
8989
src={member.img}
9090
alt={member.name}
91-
className="w-full h-68 object-cover rounded-md"
91+
className="w-full h-68 object-cover rounded-lg"
9292
/>
9393
<div className="mt-3 px-2">
9494
<p className="font-semibold text-white">{member.name}</p>

src/components/sponsor.css

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,3 @@
55
-ms-overflow-style: none;
66
scrollbar-width: none;
77
}
8-
.carousel-arrow-btn {
9-
width: 48px;
10-
height: 48px;
11-
display: flex;
12-
align-items: center;
13-
justify-content: center;
14-
border: none;
15-
border-radius: 50%;
16-
background: linear-gradient(135deg, #112051 60%, #c7d2fe 100%);
17-
box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
18-
color: #fff;
19-
cursor: pointer;
20-
transition:
21-
transform 0.2s,
22-
box-shadow 0.2s,
23-
background 0.2s;
24-
font-size: 1.5rem;
25-
margin-right: -5px;
26-
}
27-
28-
.carousel-arrow-btn:hover {
29-
transform: scale(1.1);
30-
background: linear-gradient(135deg, #2563eb 80%, #a5b4fc 100%);
31-
box-shadow: 0 4px 16px rgba(30, 64, 175, 0.25);
32-
}

0 commit comments

Comments
 (0)