Skip to content

Commit db9b648

Browse files
authored
Bring the color back to sponsor logos (#2068)
1 parent 5dfd2bb commit db9b648

File tree

3 files changed

+58
-12
lines changed

3 files changed

+58
-12
lines changed

public/img/conf/Sponsors/Meta-dark.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/conf/Sponsors/Meta.svg

Lines changed: 1 addition & 0 deletions
Loading

src/app/conf/2025/components/sponsors.tsx

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ import Apollo from "public/img/conf/Sponsors/Apollo.svg?svgr"
33

44
import { clsx } from "clsx"
55
import { ChevronRight } from "../../_design-system/pixelarticons/chevron-right"
6+
import { ComponentPropsWithoutRef } from "react"
67

78
interface Sponsor {
8-
icon: React.FC<React.SVGProps<SVGElement>>
9+
icon:
10+
| React.FC<React.SVGProps<SVGElement>>
11+
| React.FC<React.ImgHTMLAttributes<HTMLImageElement>>
12+
| React.FC<React.HTMLAttributes<HTMLDivElement>>
913
name: string
1014
link: string
1115
}
@@ -15,11 +19,56 @@ const sponsorDiamond: Sponsor[] = []
1519
const sponsorPlatinum: Sponsor[] = []
1620

1721
const sponsorGold: Sponsor[] = [
18-
{ icon: Apollo, name: "Apollo", link: "https://www.apollographql.com" },
22+
{
23+
icon: (props: React.SVGProps<SVGElement>) => (
24+
<Apollo
25+
{...props}
26+
className={clsx(
27+
props.className,
28+
"[&_path]:fill-[#15252D] dark:[&_path]:fill-white",
29+
)}
30+
/>
31+
),
32+
name: "Apollo",
33+
link: "https://www.apollographql.com",
34+
},
1935
]
2036

2137
const sponsorSilver: Sponsor[] = [
22-
{ icon: Grafbase, name: "Grafbase", link: "https://grafbase.com/" },
38+
{
39+
icon: (props: React.SVGProps<SVGElement>) => (
40+
<Grafbase
41+
{...props}
42+
className={clsx(
43+
props.className,
44+
"[&_path]:fill-blk dark:[&_path]:fill-white",
45+
)}
46+
/>
47+
),
48+
name: "Grafbase",
49+
link: "https://grafbase.com/",
50+
},
51+
{
52+
icon: (props: React.HTMLAttributes<HTMLDivElement>) => (
53+
<div {...props} className={clsx(props.className, "relative")}>
54+
<img
55+
src={
56+
new URL("/public/img/conf/Sponsors/Meta.svg", import.meta.url).href
57+
}
58+
className="absolute inset-0 dark:hidden"
59+
/>
60+
<img
61+
src={
62+
new URL("/public/img/conf/Sponsors/Meta-dark.svg", import.meta.url)
63+
.href
64+
}
65+
className="absolute inset-0 hidden dark:block"
66+
/>
67+
</div>
68+
),
69+
name: "Meta",
70+
link: "https://about.facebook.com/meta/",
71+
},
2372
]
2473

2574
export interface SponsorsProps {
@@ -74,27 +123,22 @@ export function Sponsors({ heading }: SponsorsProps) {
74123
function Tier({ tier, logoHeight }: { tier: Tier; logoHeight: number }) {
75124
return (
76125
<div className="flex gap-x-12 gap-y-4 border-t border-neu-200 py-4 dark:border-neu-50 max-md:flex-col">
77-
<h3 className="flex w-[80px] shrink-0 items-center gap-1 self-start whitespace-nowrap font-mono text-sm/none font-normal uppercase text-primary">
126+
<h3 className="flex w-[80px] shrink-0 items-center gap-1 self-start whitespace-nowrap font-mono text-sm/none font-normal uppercase text-pri-base">
78127
<ChevronRight className="shrink-0 translate-y-[-0.5px]" />
79128
{tier.name}
80129
</h3>
81-
<div
82-
className={clsx(
83-
"grid justify-center gap-x-8 gap-y-4",
84-
tier.items.length > 2 && "sm:grid-cols-2 xl:grid-cols-3",
85-
)}
86-
>
130+
<div className="flex flex-wrap justify-center gap-y-4">
87131
{tier.items.map(({ link, icon: Icon, name }, i) => (
88132
<a
89133
key={i}
90134
href={link}
91135
target="_blank"
92136
rel="noreferrer"
93137
title={name}
94-
className="group flex min-h-24 items-center justify-center opacity-75 [--fill:hsl(var(--color-neu-700))] hover:bg-neu-500/10 hover:[--fill:hsl(var(--color-neu-800))] dark:opacity-90"
138+
className="group flex min-h-24 items-center justify-center hover:bg-neu-500/10 dark:opacity-90 dark:hover:opacity-100"
95139
>
96140
<Icon
97-
className="aspect-[3] w-auto max-w-[80%] shrink-0 fill-[--fill] [&_path]:fill-[--fill]"
141+
className="aspect-[3] w-auto max-w-[80%] shrink-0"
98142
style={{
99143
height: logoHeight,
100144
}}

0 commit comments

Comments
 (0)