Skip to content

Commit 3000da8

Browse files
committed
Add colorScheme=neutral to Hero props
1 parent c2daf7b commit 3000da8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function ResourcesPage() {
1919
return (
2020
<>
2121
<NavbarPlaceholder className="top-0 bg-neu-0 before:bg-white/30 dark:bg-neu-0 dark:before:bg-blk/40" />
22-
<Hero pageName="Code of conduct" subtitle="The Linux Foundation">
22+
<Hero pageName="Code of conduct" subtitle="The Linux Foundation" colorScheme="neutral">
2323
<Button
2424
href="https://events.linuxfoundation.org/about/code-of-conduct/"
2525
className="mt-[18px] w-fit"

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,28 @@ import GraphQLFoundationWordmark from "../../assets/graphql-foundation-wordmark.
55

66
import { ImageLoaded } from "../image-loaded"
77
import blurBean from "./blur-bean-cropped.webp"
8+
import clsx from "clsx"
89

910
export type HeroProps = {
1011
pageName?: string
1112
children: React.ReactNode
1213
bottom?: React.ReactNode
14+
colorScheme?: "primary" | "neutral"
1315
} & (
1416
| { year: string | number; subtitle?: never }
1517
| { year?: never; subtitle: string }
1618
)
1719

1820
export function Hero(props: HeroProps) {
21+
const colorScheme = props.colorScheme || "primary"
22+
1923
return (
20-
<article className="gql-conf-navbar-strip relative isolate flex flex-col justify-center bg-pri-base text-neu-0 selection:bg-blk/40 before:bg-white/30 dark:bg-pri-darker dark:text-neu-900 dark:selection:bg-white/40 before:dark:bg-blk/40">
24+
<article
25+
className={clsx(
26+
"gql-conf-navbar-strip relative isolate flex flex-col justify-center text-neu-0 selection:bg-blk/40 before:bg-white/30 dark:bg-pri-darker dark:text-neu-900 dark:selection:bg-white/40 before:dark:bg-blk/40",
27+
colorScheme === "primary" ? "bg-pri-base" : "bg-neu-100",
28+
)}
29+
>
2130
<article className="relative">
2231
<HeroStripes />
2332
<div className="gql-conf-container mx-auto flex max-w-full flex-col gap-12 overflow-hidden p-4 pt-6 sm:p-8 sm:pt-12 md:gap-12 md:bg-left md:p-12 lg:px-24 lg:pb-16 lg:pt-24">

0 commit comments

Comments
 (0)