Repository navigation
Expand file tree
/
Copy pathexecSection.tsx
More file actions
191 lines (186 loc) · 6.04 KB
/
Copy pathexecSection.tsx
File metadata and controls
191 lines (186 loc) · 6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
"use client";
import { useMemo } from "react";
import { Swiper, SwiperSlide } from "swiper/react";
import { Button } from "@/components/primitives/button";
import useIsMobile from "@/app/lib/hooks/useIsMobile";
import { ArrowLeft, ArrowRight } from "lucide-react";
import { Navigation } from "swiper/modules";
import Image from "next/image";
import "swiper/css";
const lpFooterEllipse = "/icons/custom/footerEllipse.svg";
const execs = [
{
name: "Ura Hwang",
image: "/images/execs/ura_hwang.jpeg",
title: "Co-President",
linkedIn: "https://www.linkedin.com/in/ura-hwang-748336282/",
},
{
name: "Boris Wang",
image: "/images/execs/boris_wang.jpg",
title: "Co-President",
linkedIn: "https://www.linkedin.com/in/boriswangcs/",
},
{
name: "Harsh Amin",
image: "/images/execs/harsh_amin.jpeg",
title: "Co-President",
linkedIn: "https://www.linkedin.com/in/hamin06/",
},
{
name: "Owen Hochwald",
image: "/images/execs/owen_hochwald.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/ohoch/",
},
{
name: "Bradley Eugene Sakran",
image: "/images/execs/bradley_eugene_sakran.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/besakran/",
},
{
name: "June Wang",
image: "/images/execs/june_wang.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/june-wang-756065355/",
},
{
name: "Edward Jung",
image: "/images/execs/edward_jung.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/edward-h-jung/",
},
{
name: "Zayan Sheikh",
image: "/images/execs/zayan_sheikh.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/zayans/",
},
{
name: "Talia Feng",
image: "/images/execs/talia_feng.jpg",
title: "Tech Lead",
linkedIn: "https://www.linkedin.com/in/talfe/",
},
{
name: "Dora Hu",
image: "/images/execs/dora_hu.jpg",
title: "Design Lead",
linkedIn: "https://www.linkedin.com/in/dora-y-hu/",
},
{
name: "Kelly Wei Jin",
image: "/images/execs/kelly_wei_jin.jpg",
title: "Design Lead",
linkedIn: "https://www.linkedin.com/in/kellyw13/",
},
{
name: "Nicole Chu",
image: "/images/execs/nicole_chu.jpg",
title: "Sponsorship Coordinator",
linkedIn: "https://www.linkedin.com/in/nicole-chu-402b0b2ab/",
},
{
name: "Alvin Tsui",
image: "/images/execs/alvin_tsui.jpg",
title: "Sponsorship Coordinator",
linkedIn: "https://www.linkedin.com/in/alvintsui/",
},
{
name: "Jinah Pak",
image: "/images/execs/jinah_pak.jpg",
title: "Events Coordinator",
linkedIn: "https://www.linkedin.com/in/jinah-pak/",
},
{
name: "Stella Duo",
image: "/images/execs/stella_duo.jpg",
title: "Marketing Coordinator",
linkedIn: "https://www.linkedin.com/in/stelladuo/",
},
];
export default function ExecSection() {
const LARGE_SIZE = 1600;
const TABLET_SIZE = 900;
const MOBILE_SIZE = 768;
const isLargeScreen = !useIsMobile(LARGE_SIZE);
const isTablet = useIsMobile(TABLET_SIZE);
const isMobile = useIsMobile(MOBILE_SIZE);
const carouselSize = useMemo(() => {
if (isLargeScreen) return 6;
if (isTablet) return 4;
if (isMobile) return 3;
return 8;
}, [isLargeScreen, isTablet, isMobile]);
return (
<div className="w-full min-h-96 relative flex-shrink-0">
<div className="flex flex-col items-center justify-center md:justify-between py-10 w-full">
<div className="flex flex-col md:flex-row text-center items-center justify-between w-full md:px-10 py-10">
<div className="flex flex-col-reverse md:flex-row items-center">
<h2 className="text-3xl font-semibold py-2 md:py-0 md:pr-4">
Meet our <span className="text-lp-400">2026/2027</span> execs
</h2>
</div>
<span className="hidden md:flex md:flex-row md:space-x-2">
<Button variant={"dark"} className="swiper-button-prev gap-2">
<ArrowLeft size={20} />
</Button>
<Button variant={"dark"} className="swiper-button-next gap-2">
<ArrowRight size={20} />
</Button>
</span>
</div>
<div className="flex overflow-x-auto no-scrollbar mt-4 z-10 w-full">
<Swiper
spaceBetween={10}
slidesPerView={carouselSize}
loop={true}
modules={[Navigation]}
navigation={{
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
}}
>
{execs.map((exec, index) => (
<SwiperSlide
key={index}
className="flex justify-center items-center min-h-[250px] p-4"
>
<div className="flex flex-col items-center">
<a
href={exec.linkedIn}
target="_blank"
rel="noopener noreferrer"
aria-label={`${exec.name} LinkedIn`}
>
<div className="relative w-20 h-20 sm:w-24 sm:h-24 md:w-28 md:h-28 lg:w-32 lg:h-32 overflow-hidden rounded-2xl drop-shadow-xl">
<Image
src={exec.image}
alt={exec.name}
fill
className="object-cover"
sizes="(max-width: 640px) 80px, (max-width: 768px) 96px, (max-width: 1024px) 112px, 128px"
/>
</div>
</a>
<p className="mt-2 font-bold text-center text-lg">
{exec.name}
</p>
<p className="text-white text-sm text-center">{exec.title}</p>
</div>
</SwiperSlide>
))}
</Swiper>
</div>
</div>
<Image
src={lpFooterEllipse}
alt="Newsletter Image"
fill={true}
style={{ objectFit: "cover" }}
className="absolute top-1/2 left-1/2 transform translate-y-1/2 z-0"
/>
</div>
);
}