Skip to content

Commit a76b3a7

Browse files
committed
Add HeroConfCard
1 parent a762d38 commit a76b3a7

File tree

3 files changed

+78
-17
lines changed

3 files changed

+78
-17
lines changed

src/app/conf/2025/code-of-conduct/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import "../resources/prose.css"
1010
import { Hero, HeroStripes } from "../components/hero"
1111

1212
import markdown from "./code-of-conduct.mdx?raw"
13+
import { HeroConfCard } from "../components/hero/hero-conf-card"
1314

1415
export const metadata: Metadata = {
1516
title: "Code of Conduct | GraphQLConf 2025",
@@ -30,6 +31,7 @@ export default function ResourcesPage() {
3031
oddClassName="bg-[linear-gradient(180deg,hsl(319deg_100%_90%_/_0.2)_0%,hsl(var(--color-sec-base))_100%)] dark:bg-[linear-gradient(180deg,hsl(var(--color-sec-dark))_0%,hsl(var(--color-neu-0))_100%)]"
3132
/>
3233
}
34+
secondColumn={<HeroConfCard />}
3335
>
3436
<Button
3537
href="https://events.linuxfoundation.org/about/code-of-conduct/"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
2+
3+
import GraphQLFoundationWordmark from "../../assets/graphql-foundation-wordmark.svg?svgr"
4+
import logoMask from "../cta-card-section/logo-mask.webp"
5+
import { HeroDateAndLocation } from "."
6+
7+
export function HeroConfCard() {
8+
return (
9+
<div className="relative w-[590px] overflow-hidden border border-white bg-white/[0.24] p-8 backdrop-blur-xl">
10+
<div
11+
role="presentation"
12+
className="pointer-events-none absolute inset-0 -right-8 -top-16 [--end:rgba(255,204,239,0.2)] [--start:#FF99DF]"
13+
style={{
14+
maskImage: `url(${logoMask.src})`,
15+
maskRepeat: "no-repeat",
16+
maskPosition: "33px -22px",
17+
maskSize: "743px",
18+
}}
19+
>
20+
<StripesDecoration
21+
stripeWidth="8px"
22+
oddClassName="bg-[linear-gradient(180deg,var(--start)_0%,var(--end)_100%)]"
23+
/>
24+
</div>
25+
26+
<div className="relative z-10 space-y-8">
27+
<h2 className="text-[48px] font-normal leading-[1.2] text-neu-900">
28+
GraphQLConf
29+
<br />
30+
2025
31+
</h2>
32+
33+
<div className="flex h-min items-center gap-4">
34+
<span className="typography-body-sm whitespace-pre">hosted by</span>
35+
<GraphQLFoundationWordmark
36+
width={128}
37+
height={34.877}
38+
className="[&_path]:fill-pri-base"
39+
/>
40+
</div>
41+
42+
<HeroDateAndLocation className="[&_svg]:text-pri-base" />
43+
</div>
44+
</div>
45+
)
46+
}

src/app/conf/2025/components/hero/index.tsx

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type HeroProps = {
1919
bottom?: React.ReactNode
2020
colorScheme?: "primary" | "neutral"
2121
stripes?: ReactNode
22+
secondColumn?: ReactNode
2223
} & (
2324
| { year: string | number; subtitle?: never }
2425
| { year?: never; subtitle: string }
@@ -62,18 +63,20 @@ export function Hero(props: HeroProps) {
6263
</span>
6364
</h1>
6465
)}
65-
<div className="flex h-min items-center gap-4">
66-
<span className="typography-body-sm whitespace-pre">
67-
hosted by
68-
</span>
69-
<GraphQLFoundationWordmark
70-
width={128}
71-
height={34.877}
72-
className={
73-
colorScheme === "neutral" ? "[&_path]:fill-primary" : ""
74-
}
75-
/>
76-
</div>
66+
{props.secondColumn || (
67+
<div className="flex h-min items-center gap-4">
68+
<span className="typography-body-sm whitespace-pre">
69+
hosted by
70+
</span>
71+
<GraphQLFoundationWordmark
72+
width={128}
73+
height={34.877}
74+
className={
75+
colorScheme === "neutral" ? "[&_path]:fill-primary" : ""
76+
}
77+
/>
78+
</div>
79+
)}
7780
</div>
7881

7982
<div className="flex flex-col gap-8">{props.children}</div>
@@ -84,14 +87,24 @@ export function Hero(props: HeroProps) {
8487
)
8588
}
8689

87-
export function HeroDateAndLocation() {
90+
export function HeroDateAndLocation(
91+
props: React.HTMLAttributes<HTMLDivElement>,
92+
) {
8893
return (
89-
<div className="typography-body-md flex flex-col gap-4 md:flex-row md:gap-6">
94+
<div
95+
{...props}
96+
className={clsx(
97+
"typography-body-md flex flex-col gap-4 md:flex-row md:gap-6",
98+
props.className,
99+
)}
100+
>
90101
<div className="flex items-center gap-2">
91102
<CalendarIcon className="size-5 sm:size-6" />
92-
<time dateTime="2025-09-08">September 08</time>
93-
<span>-</span>
94-
<time dateTime="2025-09-10">10, 2025</time>
103+
<span>
104+
<time dateTime="2025-09-08">September 08</time>
105+
<span>-</span>
106+
<time dateTime="2025-09-10">10, 2025</time>
107+
</span>
95108
</div>
96109
<div className="flex items-center gap-2">
97110
<PinIcon className="size-5 sm:size-6" />

0 commit comments

Comments
 (0)