Skip to content

Commit 54c2f5c

Browse files
committed
feat: add sponsor section with responsive logo cards and yellow heading accent
1 parent 1e8b199 commit 54c2f5c

3 files changed

Lines changed: 14 additions & 18 deletions

File tree

src/components/common/section-header.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ type SectionHeaderProps = {
44
subheading: string;
55
headingLine1: string;
66
headingLine2: string;
7+
headingLine2ClassName?: string;
78
};
89

910
export const SectionHeader = ({
1011
subheading,
1112
headingLine1,
1213
headingLine2,
14+
headingLine2ClassName = 'text-google-blue',
1315
}: SectionHeaderProps) => {
1416
return (
1517
<div className="mb-24 flex flex-col items-start justify-between gap-12 border-l-2 border-primary/10 pl-10 md:flex-row md:items-end">
@@ -20,7 +22,7 @@ export const SectionHeader = ({
2022
<h2 className="font-display text-4xl font-bold uppercase leading-[0.95] tracking-tighter text-on-surface sm:text-5xl md:text-7xl">
2123
<span className="font-light">{headingLine1}</span>
2224
<br />
23-
<span className="text-google-blue">{headingLine2}</span>
25+
<span className={headingLine2ClassName}>{headingLine2}</span>
2426
</h2>
2527
</div>
2628
</div>

src/components/home/home-landing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ export function HomeLanding({ copy }: HomeLandingProps) {
6565
subheading={copy.sponsors.header.subheading}
6666
headingLine1={copy.sponsors.header.heading.line1}
6767
headingLine2={copy.sponsors.header.heading.line2}
68+
headingLine2ClassName="text-google-yellow"
6869
/>
6970
<SponsorsTiers
7071
tiers={copy.sponsors.tiers}
7172
ctaLabel={copy.sponsors.cta.label}
72-
ctaLink={copy.sponsors.cta.link}
7373
/>
7474
</section>
7575
</main>

src/components/sponsors/sponsors-tiers.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'use client';
22

3-
// Note: Reverted to <img> tag to respect original SVG sizing as requested.
4-
// Using a white background for maximum contrast with dark/transparent logos.
5-
// Added grayscale-to-color hover effect.
3+
import Image from 'next/image';
64

75
type SponsorTier = {
86
title: string;
@@ -18,10 +16,9 @@ type SponsorTier = {
1816
type SponsorsTiersProps = {
1917
tiers: SponsorTier[];
2018
ctaLabel: string;
21-
ctaLink: string;
2219
};
2320

24-
export function SponsorsTiers({ tiers, ctaLabel, ctaLink }: SponsorsTiersProps) {
21+
export function SponsorsTiers({ tiers, ctaLabel }: SponsorsTiersProps) {
2522
return (
2623
<div className="space-y-14">
2724
{tiers.map((tier) => (
@@ -40,20 +37,22 @@ export function SponsorsTiers({ tiers, ctaLabel, ctaLink }: SponsorsTiersProps)
4037
</p>
4138
</div>
4239

43-
<div className="grid grid-cols-2 gap-6 md:grid-cols-3 lg:grid-cols-4">
40+
<div className="flex flex-col items-center gap-12 md:flex-row md:flex-wrap md:justify-start md:gap-x-16 md:gap-y-12">
4441
{tier.items.map((sponsor) => (
4542
<a
4643
key={sponsor.name}
4744
href={sponsor.link || '#'}
4845
target="_blank"
4946
rel="noopener noreferrer"
50-
className="group relative flex items-center justify-center rounded-lg bg-white p-6 transition-all duration-300 hover:scale-105"
47+
className="group inline-flex w-full max-w-[420px] flex-col items-center justify-center rounded-lg bg-white p-6 transition-all duration-300 hover:scale-105 md:w-auto"
5148
>
5249
{sponsor.logo && (
53-
<img
50+
<Image
5451
src={sponsor.logo}
5552
alt={sponsor.name}
56-
className="grayscale transition-all duration-300 group-hover:grayscale-0"
53+
width={400}
54+
height={250}
55+
className="block h-auto w-auto max-w-full grayscale transition-all duration-300 group-hover:grayscale-0"
5756
/>
5857
)}
5958
</a>
@@ -63,14 +62,9 @@ export function SponsorsTiers({ tiers, ctaLabel, ctaLink }: SponsorsTiersProps)
6362
))}
6463

6564
<div className="pt-2">
66-
<a
67-
href={ctaLink}
68-
target="_blank"
69-
rel="noopener noreferrer"
70-
className="inline-flex items-center border border-white/25 px-5 py-3 font-mono-tech text-xs uppercase tracking-[0.2em] text-white transition-colors hover:border-google-blue hover:text-google-blue"
71-
>
65+
<div className="inline-flex items-center border border-white/25 px-5 py-3 font-mono-tech text-xs uppercase tracking-[0.2em] text-white transition-colors hover:border-google-blue hover:text-google-blue">
7266
{ctaLabel}
73-
</a>
67+
</div>
7468
</div>
7569
</div>
7670
);

0 commit comments

Comments
 (0)