Content Partners: align with newsletter; Blackmagic PNG logo for dark band
This commit is contained in:
BIN
public/img/partners/blackmagic-design.png
Normal file
BIN
public/img/partners/blackmagic-design.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -7,6 +7,16 @@ type Sponsor = {
|
|||||||
logoUrl: string | null;
|
logoUrl: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Partner logos that need alternate assets on dark homepage bands. */
|
||||||
|
const LOGO_OVERRIDES: Record<string, string> = {
|
||||||
|
// Full-color wordmark PNG reads cleanly on the white logo tile (unlike the gray SVG).
|
||||||
|
"blackmagic-design": "/img/partners/blackmagic-design.png",
|
||||||
|
};
|
||||||
|
|
||||||
|
function resolveLogoUrl(slug: string, logoUrl: string | null): string {
|
||||||
|
return LOGO_OVERRIDES[slug] || logoUrl || "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Content Partners strip — mirrors Broadcast Beat partner list (bb schema +
|
* Content Partners strip — mirrors Broadcast Beat partner list (bb schema +
|
||||||
* broadcastbeat advertisers) so both RMP sites show the same logos.
|
* broadcastbeat advertisers) so both RMP sites show the same logos.
|
||||||
@@ -58,7 +68,7 @@ async function fetchSponsors(): Promise<Sponsor[]> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.from(bySlug.values()).filter((s) => s.logoUrl);
|
return Array.from(bySlug.values()).filter((s) => resolveLogoUrl(s.slug, s.logoUrl));
|
||||||
} catch {
|
} catch {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -69,8 +79,8 @@ export default async function SponsorLogoStrip() {
|
|||||||
if (sponsors.length === 0) return null;
|
if (sponsors.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-[#0d1520] border-t border-[#DCE6F2]">
|
<section className="max-w-container mx-auto px-4" aria-label="Content partners">
|
||||||
<section className="max-w-container mx-auto px-4 py-6 md:py-8" aria-label="Content partners">
|
<div className="bg-[#0d1520] border border-[#DCE6F2] py-6 md:py-8 px-4">
|
||||||
<div className="flex items-center gap-4 mb-3">
|
<div className="flex items-center gap-4 mb-3">
|
||||||
<span className="text-[10px] uppercase tracking-widest text-[#1D4ED8] font-bold">
|
<span className="text-[10px] uppercase tracking-widest text-[#1D4ED8] font-bold">
|
||||||
Content Partners
|
Content Partners
|
||||||
@@ -91,7 +101,7 @@ export default async function SponsorLogoStrip() {
|
|||||||
>
|
>
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||||
<img
|
<img
|
||||||
src={s.logoUrl || ""}
|
src={resolveLogoUrl(s.slug, s.logoUrl)}
|
||||||
alt={s.name}
|
alt={s.name}
|
||||||
className="h-14 md:h-16 w-auto object-contain max-w-[180px] bg-white p-2 rounded"
|
className="h-14 md:h-16 w-auto object-contain max-w-[180px] bg-white p-2 rounded"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
@@ -99,7 +109,7 @@ export default async function SponsorLogoStrip() {
|
|||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user