Skip to content

Commit 8da1227

Browse files
committed
Restyle Resources
2 parents c029ff3 + 5c3e9c9 commit 8da1227

File tree

5 files changed

+98
-32
lines changed

5 files changed

+98
-32
lines changed

src/app/conf/2025/components/top-minds/index.tsx

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { StaticImageData } from "next/image"
66
import TwitterIcon from "@/icons/twitter.svg"
77
import { Button } from "@/app/conf/_design-system/button"
88
import { BECOME_A_SPEAKER_LINK } from "../../links"
9+
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
910

1011
const previousConfSpeakers = {
1112
benjie: {
@@ -17,27 +18,27 @@ const previousConfSpeakers = {
1718
},
1819
kewei: {
1920
name: "Kewei Qu",
20-
title: "MetaSenior Staff Software Engineer",
21+
title: "Meta, Senior Staff Engineer",
2122
src: "https://avatars.sched.co/9/1a/18743864/avatar.jpg.320x320px.jpg",
2223
twitter: "kewei_qu",
2324
linkedin: "keweiqu",
2425
},
2526
donna: {
2627
name: "Donna Zhou",
27-
title: "Atlassian — Maintainer of GraphQL Java",
28+
title: "Atlassian, GraphQL Java",
2829
src: "https://avatars.sched.co/0/1d/18743879/avatar.jpg.320x320px.jpg?e1f",
2930
linkedin: "donnazhou",
3031
},
3132
uri: {
3233
name: "Uri Goldshtein",
33-
title: "The Guild Founder",
34+
title: "The Guild, Founder",
3435
src: "https://avatars.sched.co/8/2b/14900013/avatar.jpg.320x320px.jpg?9f1",
3536
twitter: "UriGoldshtein",
3637
linkedin: "urigo",
3738
},
3839
alessia: {
3940
name: "Alessia Bellisario",
40-
title: "Apollo GraphQL — Staff Open Source Engineer",
41+
title: "Apollo, Staff Engineer",
4142
src: "https://avatars.sched.co/a/c6/18743837/avatar.jpg.320x320px.jpg?847",
4243
twitter: "alessbell",
4344
linkedin: "alessiabellisario",
@@ -62,27 +63,33 @@ export default function TopMindsSection({
6263
{...rest}
6364
>
6465
<div className="flex grid-cols-2 flex-wrap [@media(444px<width<743px)]:grid [@media(width<=444px)]:flex-col [@media(width<=743px)]:justify-center [@media(width>=970px)]:*:border-b-0">
65-
{/* todo: remaining socials */}
6666
<h3 className="mr-auto flex w-full grow text-pretty pb-6 pr-6 typography-h2 [@media(width>857px)]:basis-0">
6767
Meet the top industry minds
6868
</h3>
69-
<SpeakerCard {...previousConfSpeakers.benjie} />
69+
<SpeakerCard
70+
{...previousConfSpeakers.benjie}
71+
stripes="linear-gradient(80deg, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent)"
72+
/>
7073
<SpeakerCard
7174
{...previousConfSpeakers.kewei}
7275
className="[@media(width<=742px)]:border-l"
76+
stripes="radial-gradient(circle at bottom right, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 10%, transparent 40%, transparent)"
7377
/>
7478
<div className="flex grow border-sec-dark [@media(width<970px)]:contents [@media(width>=970px)]:border-t [@media(width>=970px)]:*:border-t-0">
7579
<SpeakerCard
7680
{...previousConfSpeakers.donna}
7781
className="[@media(744px<=width<=970px)]:first-of-type:border-l-0"
82+
stripes="radial-gradient(ellipse at top left, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent, transparent 85%, black 100%)"
7883
/>
7984
<SpeakerCard
8085
{...previousConfSpeakers.uri}
8186
className="[@media(639px<=width<=970px)]:border-l"
87+
stripes="linear-gradient(-40deg, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent)"
8288
/>
8389
<SpeakerCard
8490
{...previousConfSpeakers.alessia}
8591
className="[@media(width<744px)]:border-l"
92+
stripes="radial-gradient(circle at top left, transparent 0%, transparent 65%, black 90%)"
8693
/>
8794
<div className="mt-6 flex shrink-0 basis-[content] items-end justify-stretch max-lg:w-full [@media(640px<=width<=855px)]:basis-[236px] [@media(width<=444px)]:*:w-full [@media(width>742px)]:justify-end [@media(width>742px)]:pl-6 [@media(width>855px)]:grow">
8895
{hasSpeakersPage ? (
@@ -108,13 +115,15 @@ function SpeakerCard({
108115
twitter,
109116
linkedin,
110117
className,
118+
stripes,
111119
}: {
112120
name: string
113121
title: string
114122
src: string | StaticImageData
115123
twitter?: string
116124
linkedin?: string
117125
className?: string
126+
stripes?: string
118127
}) {
119128
return (
120129
<article
@@ -123,13 +132,17 @@ function SpeakerCard({
123132
className,
124133
)}
125134
>
126-
<Image
127-
src={src}
128-
alt=""
129-
width={312}
130-
height={312}
131-
className="aspect-square size-[312px] w-full object-cover transition-transform sm:h-[236px]"
132-
/>
135+
<div className="relative overflow-hidden">
136+
<div className="absolute inset-0 z-[1] bg-sec-light opacity-90 mix-blend-multiply" />
137+
<Image
138+
src={src}
139+
alt=""
140+
width={312}
141+
height={312}
142+
className="aspect-square size-[312px] w-full object-cover saturate-[0.1] transition-transform sm:h-[236px]"
143+
/>
144+
<Stripes mask={stripes} />
145+
</div>
133146
<div className="flex flex-1 items-stretch border-t border-sec-dark">
134147
<div className="flex grow flex-col justify-center gap-1 p-3 sm:h-[80px]">
135148
<h4 className="typography-body-md">{name}</h4>
@@ -177,3 +190,18 @@ function LinkedInIcon(props: HTMLAttributes<SVGElement>) {
177190
</svg>
178191
)
179192
}
193+
194+
function Stripes({ mask }: { mask?: string }) {
195+
return (
196+
<div
197+
role="presentation"
198+
className="pointer-events-none absolute inset-0 inset-y-[-20px]"
199+
style={{
200+
maskImage: mask,
201+
WebkitMaskImage: mask,
202+
}}
203+
>
204+
<StripesDecoration evenClassName="bg-gradient-to-b from-sec-darker to-sec-dark" />
205+
</div>
206+
)
207+
}

src/app/conf/2025/resources/client-mdx.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@ export default function ResourcesPage() {
66
return (
77
<Resources
88
components={{
9-
// @ts-expect-error - not sure how to type this
10-
a: props => {
11-
const isExternal = props.href.startsWith("http")
9+
a: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {
10+
const isExternal = props.href?.startsWith("http")
1211
if (isExternal) {
1312
return <a {...props} target="_blank" rel="noopener noreferrer" />
1413
}
1514

1615
return <a {...props} />
1716
},
17+
h3: (props: React.HTMLAttributes<HTMLHeadingElement>) => {
18+
return (
19+
<h3
20+
className="border-t border-neu-100 pt-2 text-pri-base typography-menu dark:border-neu-50 dark:text-pri-light"
21+
{...props}
22+
>
23+
{props.children}
24+
</h3>
25+
)
26+
},
1827
}}
1928
/>
2029
)

src/app/conf/2025/resources/page.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
import Resources from "./client-mdx"
2-
3-
import { clsx } from "clsx"
41
import { Metadata } from "next"
52

3+
import { NavbarPlaceholder } from "../components/navbar"
4+
5+
import Resources from "./client-mdx"
6+
import "./prose.css"
7+
68
export const metadata: Metadata = {
79
title: "Resources | 2025",
810
}
911

1012
export default function ResourcesPage() {
1113
return (
12-
<main>
13-
<div
14-
className={clsx(
15-
"container my-10 flex flex-col md:my-20",
16-
"prose max-w-screen-xl",
17-
"text-white prose-headings:text-white prose-a:text-white prose-strong:text-white",
18-
"prose-a:w-fit prose-a:transition-colors hover:prose-a:text-primary",
19-
)}
20-
>
21-
<Resources />
22-
</div>
23-
</main>
14+
<>
15+
<NavbarPlaceholder className="top-0 bg-neu-0 before:bg-white/30 dark:bg-neu-0 dark:before:bg-blk/40" />
16+
<main className="gql-all-anchors-focusable gql-conf-navbar-strip text-neu-900 before:bg-white/40 before:dark:bg-blk/30">
17+
<div className="gql-conf-container gql-conf-section gql-prose">
18+
<Resources />
19+
</div>
20+
</main>
21+
</>
2422
)
2523
}

src/app/conf/2025/resources/prose.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.gql-prose {
2+
--prose-width: 800px;
3+
--grid-col-aside: 1;
4+
--grid-col-content: 1;
5+
6+
@apply xl:[--grid-col-content:3];
7+
@apply grid grid-cols-1 gap-6 typography-body-md xl:my-12 xl:grid-cols-[auto_1fr_var(--prose-width)_1fr];
8+
9+
& > * {
10+
grid-column: var(--grid-col-content);
11+
}
12+
13+
& h1 {
14+
@apply typography-h2 lg:col-span-full xl:pb-16;
15+
}
16+
& h2 {
17+
@apply typography-h3;
18+
}
19+
& a:not(.raw) {
20+
@apply typography-link;
21+
}
22+
}
23+
24+
.gql-sticky-aside {
25+
grid-column: var(--grid-col-aside);
26+
@apply xl:sticky xl:top-[calc(var(--navbar-h)+1rem)];
27+
}

src/app/conf/2025/resources/resources.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# GraphQLConf 2025 Resource Hub
22

3-
<div className="mt-6 grid grid-cols-2 gap-x-4">{toc.map(({value, id}) => <a key={id} href={`#${id}`}>{value}</a>)}</div>
3+
<aside className='gql-sticky-aside w-fit row-span-8 -mt-1 sm:max-xl:grid-cols-2 sm:max-xl:grid sm:max-xl:bg-neu-100 dark:sm:max-xl:bg-neu-50/50 sm:max-xl:p-4'>
4+
{toc.map(({value, id, depth}) => <a key={id} data-depth={depth} className='block raw hover:bg-neu-100 dark:hover:bg-neu-50 py-2 p-4 max-xl:-ml-4 hover:text-neu-900 text-neu-800 typography-menu xl:data-[depth=2]:text-lg data-[depth=2]:font-semibold' style={{
5+
paddingLeft: (depth - 2) * 16 + 16,
6+
}} href={`#${id}`}>{value}</a>)}
7+
</aside>
48

59
## Code of Conduct
610

0 commit comments

Comments
 (0)