Skip to content

Commit 13f5335

Browse files
committed
feat: add sponsor section
1 parent 1cfe85d commit 13f5335

9 files changed

Lines changed: 281 additions & 50 deletions

File tree

app/(home)/components/Sponsors.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
import { Container } from '@/components/ui/container';
22
import dynamic from 'next/dynamic';
33
const SponsorsDesktop = dynamic(() => import('./SponsorsDesktop'));
4-
// const SponsorsMobile = dynamic(() => import("./SponsorsMobile"));
4+
const SponsorsMobile = dynamic(() => import('./SponsorsMobile'));
55

66
interface SponsorshipProps {
77
name: string;
88
logo: string;
99
logoMobile: string;
10-
testimonial: string;
10+
description: string;
1111
url: string;
1212
}
1313

14-
export function Sponsors() {
14+
export function Sponsors() {
1515
const sponsors: SponsorshipProps[] = [
1616
{
1717
name: 'Mugna Tech',
1818
logo: '/sponsor-logos/mugna-logo.png',
1919
logoMobile: '/sponsor-logos/mugna-logo.png',
20-
testimonial:
21-
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reprehenderit, quas possimus. Vitae, officia quia. Doloribus saepe',
20+
description:
21+
'Mugna Tech specializes in Web, Software, and Mobile Development, UI/UX Design, and more, with 75+ projects for diverse businesses.',
2222
url: 'https://mugna.tech',
2323
},
2424
{
2525
name: 'Codev',
2626
logo: '/sponsor-logos/codev-logo.png',
2727
logoMobile: '/sponsor-logos/codev-logo.png',
28-
testimonial:
29-
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reprehenderit, quas possimus. Vitae, officia quia. Doloribus saepe',
28+
description:
29+
'Hire top offshore developers with CoDev—skilled professionals dedicated to your success',
3030
url: 'https://codev.com',
3131
},
3232
{
3333
name: 'Ingenuity Software',
34-
logo: '/sponsor-logos/ingenuity-logo-mobile.png',
34+
logo: '/sponsor-logos/ingenuity-logo.png',
3535
logoMobile: '/sponsor-logos/ingenuity-logo-mobile.png',
36-
testimonial:
37-
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reprehenderit, quas possimus. Vitae, officia quia. Doloribus saepe',
36+
description:
37+
'Ingenuity Software is a Davao-based software development company that turns ideas into impactful digital solutions. ',
3838
url: 'https://ingenuity.ph',
3939
},
4040
{
4141
name: 'PythonPH',
4242
logo: '/sponsor-logos/pythonph-logo.png',
43-
logoMobile: '/sponsor-logos/pythonph-logo.png',
44-
testimonial:
45-
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reprehenderit, quas possimus. Vitae, officia quia. Doloribus saepe',
43+
logoMobile: '/sponsor-logos/pythonph-logo-mobile.png',
44+
description:
45+
'Python Philippines is a volunteer-run non-profit supporting the growth of the Python community in the country.',
4646
url: 'https://python.ph',
4747
},
4848
{
4949
name: 'Stace',
50-
logo: '/sponsor-logos/stace-logo.png',
51-
logoMobile: '/sponsor-logos/stace-logo.png',
52-
testimonial:
53-
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reprehenderit, quas possimus. Vitae, officia quia. Doloribus saepe',
50+
logo: '/sponsor-logos/stace-logo.svg',
51+
logoMobile: '/sponsor-logos/stace-logo.svg',
52+
description:
53+
'Stace is a comprehensive platform designed to enhance and simplify the rental experience for both renters and landlords.',
5454
url: 'https://www.stace.app',
5555
},
5656
];
@@ -64,10 +64,10 @@ export function Sponsors() {
6464
</section>
6565

6666
{/* Mobile View (Below 768px) */}
67-
{/* <section className="md:hidden">
68-
<SponsorsMobile sponsors={sponsors} />
69-
</section> */}
67+
<section className="md:hidden">
68+
<SponsorsMobile sponsors={sponsors} />
69+
</section>
7070
</Container>
7171
</section>
7272
);
73-
}
73+
}

app/(home)/components/SponsorsDesktop.tsx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface SponsorshipProps {
1919
name: string;
2020
logo: string;
2121
logoMobile: string;
22-
testimonial: string;
22+
description: string;
2323
url: string;
2424
}
2525

@@ -80,14 +80,14 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
8080
};
8181

8282
return (
83-
<div className="xl:grid xl:grid-cols-[1fr_2fr] lg:flex lg:flex-col lg:h-auto text-white gap-x-8 py-16">
83+
<div className="xl:grid xl:grid-cols-[1fr_2fr] md:flex md:flex-col md:h-auto text-white gap-x-8 py-16 items-center ">
8484
{/* Description Section */}
85-
<div className="space-y-16 xl:mb-28 lg:flex-1 lg:h-auto w-[480px] mt-24">
86-
<div className="space-y-9 max-w-[365px] mx-auto xl:mx-0">
87-
<h1 className="text-primary text-[80px] leading-none font-bold mt-12 mb-12">
85+
<div className="space-y-16 xl:mb-28 lg:flex-1 lg:h-auto md:flex-1 md:h-auto w-[480px]">
86+
<div className="space-y-9 xl:mx-0">
87+
<h1 className="text-primary text-[80px] leading-none font-bold mb-12">
8888
<span className="text-white">Our</span> Sponsors
8989
</h1>
90-
<p className="text-xl text-left mb-12">
90+
<p className="text-xl text-left mb-12 min-w-10">
9191
A big thank you to our generous sponsors whose support makes our
9292
work possible and helps us create lasting impact.
9393
</p>
@@ -108,10 +108,10 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
108108
</div>
109109
</div>
110110

111-
<div className="pb-36 w-[720px]">
111+
<div className="pb-36 w-[633px] xl:ml-16">
112112
{/* Featured Section */}
113113
{featuredSponsor && (
114-
<div className="flex-1 h-3/4 mb-4">
114+
<div className="flex-1 h-[418px] mb-4">
115115
<Link
116116
href={featuredSponsor.url}
117117
target="_blank"
@@ -124,12 +124,10 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
124124
loading="lazy"
125125
fill
126126
className={cn(
127+
featuredSponsor.name === 'PythonPH'
128+
? 'scale-150'
129+
: 'scale-100',
127130
'object-contain',
128-
featuredSponsor.name === 'Ingenuity Software' ||
129-
featuredSponsor.name === 'PythonPH' ||
130-
featuredSponsor.name === 'Stace'
131-
? 'scale-150' // Increase the size for specific sponsors
132-
: '',
133131
'w-full',
134132
'h-full',
135133
'p-12'
@@ -157,8 +155,8 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
157155
{/* Horizontal Line */}
158156
<div className="w-[440px] h-[1.5px] bg-[#FFFFFF]"></div>
159157
</div>
160-
<p className="text-xl mt-4">
161-
{featuredSponsor.testimonial}
158+
<p className="lg:text-xl mt-4 text-[12px] max-md:m-5 pr-3 pl-3">
159+
{featuredSponsor.description}
162160
<br></br>
163161
<br></br>{featuredSponsor.name}
164162
</p>
@@ -178,17 +176,17 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
178176
}}
179177
>
180178
{/* Previous Button */}
181-
<button onClick={autoPlayInteraction}>
179+
<a onClick={autoPlayInteraction}>
182180
<CarouselPrevious className="absolute left-[-64px] z-10 h-16 w-16 sm:w-20 sm:h-20" />
183-
</button>
181+
</a>
184182

185183
{/* Carousel Content */}
186184
<CarouselContent>
187185
{sponsors.map((sponsor, index) => (
188186
<CarouselItem key={index} className="basis-1/3">
189187
<div
190188
key={index}
191-
className="relative group transition-all duration-500 col-span-3 row-span-4 ease-in-out
189+
className="relative group transition-all duration-500 col-span-3 row-span-4 ease-in-out h-[166px] w-[200px]
192190
"
193191
onClick={() => carouselFeaturedAnimation(sponsor, index)}
194192
>
@@ -200,16 +198,17 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
200198
<div className="min-h-[160px] min-w-[160px] relative flex justify-center items-center transition-transform duration-500 ease-in-out hover:scale-105">
201199
<div className="">
202200
<Image
203-
src={sponsor.logo}
201+
src={sponsor.logoMobile}
204202
alt={sponsor.name}
205203
loading="lazy"
206204
fill
207205
className={cn(
208206
'object-contain',
207+
sponsor.name === 'PythonPH'
208+
? 'scale-75'
209+
: 'scale-100',
209210
'w-full',
210-
'h-full',
211-
'md:scale-[0.80]',
212-
'lg:scale-100'
211+
'h-full'
213212
)}
214213
/>
215214
</div>
@@ -221,9 +220,9 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
221220
</CarouselContent>
222221

223222
{/* Next Button */}
224-
<button onClick={autoPlayInteraction}>
223+
<a onClick={autoPlayInteraction}>
225224
<CarouselNext className="absolute right-[-64px] z-10 h-16 w-16 sm:w-20 sm:h-20" />
226-
</button>
225+
</a>
227226
</Carousel>
228227
</div>
229228
{/* Dots Navigation */}
@@ -244,4 +243,4 @@ const SponsorsDesktop = ({ sponsors }: { sponsors: SponsorshipProps[] }) => {
244243
);
245244
};
246245

247-
export default SponsorsDesktop;
246+
export default SponsorsDesktop;

0 commit comments

Comments
 (0)