@@ -4,44 +4,61 @@ import Image from "next-image-export-optimizer"
44import type { StaticImageData } from "next/image"
55
66import TwitterIcon from "@/icons/twitter.svg"
7+ import LinkedInIcon from "@/icons/linkedin-filled.svg"
8+
79import { Button } from "@/app/conf/_design-system/button"
810import { BECOME_A_SPEAKER_LINK } from "../../links"
911import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
12+ import {
13+ SocialIconType ,
14+ SocialIcon ,
15+ urlForUser ,
16+ } from "@/app/conf/_design-system/social-icon"
1017
1118const previousConfSpeakers = {
1219 benjie : {
1320 name : "Benjie Gillam" ,
1421 title : "GraphQL TSC & Spec" ,
1522 src : "https://avatars.sched.co/b/99/18743846/avatar.jpg.320x320px.jpg" ,
16- twitter : "benjie" ,
17- linkedin : "benjiegillam" ,
23+ socials : {
24+ twitter : "benjie" ,
25+ linkedin : "benjiegillam" ,
26+ } ,
1827 } ,
1928 kewei : {
2029 name : "Kewei Qu" ,
2130 title : "Meta, Senior Staff Engineer" ,
2231 src : "https://avatars.sched.co/9/1a/18743864/avatar.jpg.320x320px.jpg" ,
23- twitter : "kewei_qu" ,
24- linkedin : "keweiqu" ,
32+ socials : {
33+ twitter : "kewei_qu" ,
34+ linkedin : "keweiqu" ,
35+ } ,
2536 } ,
2637 donna : {
2738 name : "Donna Zhou" ,
2839 title : "Atlassian, GraphQL Java" ,
2940 src : "https://avatars.sched.co/0/1d/18743879/avatar.jpg.320x320px.jpg?e1f" ,
30- linkedin : "donnazhou" ,
41+ socials : {
42+ linkedin : "donnazhou" ,
43+ } ,
3144 } ,
3245 uri : {
3346 name : "Uri Goldshtein" ,
3447 title : "The Guild, Founder" ,
3548 src : "https://avatars.sched.co/8/2b/14900013/avatar.jpg.320x320px.jpg?9f1" ,
36- twitter : "UriGoldshtein" ,
37- linkedin : "urigo" ,
49+ socials : {
50+ twitter : "UriGoldshtein" ,
51+ linkedin : "urigo" ,
52+ } ,
3853 } ,
3954 alessia : {
4055 name : "Alessia Bellisario" ,
4156 title : "Apollo, Staff Engineer" ,
4257 src : "https://avatars.sched.co/a/c6/18743837/avatar.jpg.320x320px.jpg?847" ,
43- twitter : "alessbell" ,
44- linkedin : "alessiabellisario" ,
58+ socials : {
59+ twitter : "alessbell" ,
60+ linkedin : "alessiabellisario" ,
61+ } ,
4562 } ,
4663}
4764
@@ -63,30 +80,30 @@ export default function TopMindsSection({
6380 { ...rest }
6481 >
6582 < 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" >
66- < h3 className = "mr-auto flex w-full grow text-pretty pb-6 pr-6 typography-h2 [@media(width>857px)]:basis-0" >
83+ < h3 className = "typography-h2 mr-auto flex w-full grow text-pretty pb-6 pr-6 [@media(width>857px)]:basis-0" >
6784 Meet the top industry minds
6885 </ h3 >
69- < SpeakerCard
86+ < TopMindCard
7087 { ...previousConfSpeakers . benjie }
7188 stripes = "linear-gradient(80deg, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent)"
7289 />
73- < SpeakerCard
90+ < TopMindCard
7491 { ...previousConfSpeakers . kewei }
7592 className = "[@media(width<=742px)]:border-l"
7693 stripes = "radial-gradient(circle at bottom right, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 10%, transparent 40%, transparent)"
7794 />
7895 < div className = "flex grow border-sec-dark [@media(width<970px)]:contents [@media(width>=970px)]:border-t [@media(width>=970px)]:*:border-t-0" >
79- < SpeakerCard
96+ < TopMindCard
8097 { ...previousConfSpeakers . donna }
8198 className = "[@media(744px<=width<=970px)]:first-of-type:border-l-0"
8299 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%)"
83100 />
84- < SpeakerCard
101+ < TopMindCard
85102 { ...previousConfSpeakers . uri }
86103 className = "[@media(639px<=width<=970px)]:border-l"
87104 stripes = "linear-gradient(-40deg, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent)"
88105 />
89- < SpeakerCard
106+ < TopMindCard
90107 { ...previousConfSpeakers . alessia }
91108 className = "[@media(width<744px)]:border-l"
92109 stripes = "radial-gradient(circle at top left, transparent 0%, transparent 65%, black 90%)"
@@ -108,23 +125,23 @@ export default function TopMindsSection({
108125 )
109126}
110127
111- function SpeakerCard ( {
112- name,
113- title,
114- src,
115- twitter,
116- linkedin,
117- className,
118- stripes,
119- } : {
128+ export interface TopMindCardProps {
120129 name : string
121130 title : string
122131 src : string | StaticImageData
123- twitter ?: string
124- linkedin ?: string
125132 className ?: string
126133 stripes ?: string
127- } ) {
134+ socials : Partial < Record < SocialIconType , string > >
135+ }
136+
137+ function TopMindCard ( {
138+ name,
139+ title,
140+ src,
141+ className,
142+ stripes,
143+ socials,
144+ } : TopMindCardProps ) {
128145 return (
129146 < article
130147 className = { clsx (
@@ -146,51 +163,28 @@ function SpeakerCard({
146163 < div className = "flex flex-1 items-stretch border-t border-sec-dark" >
147164 < div className = "flex grow flex-col justify-center gap-1 p-3 sm:h-[80px]" >
148165 < h4 className = "typography-body-md" > { name } </ h4 >
149- < p className = "text-neu-700 typography-body-xs" > { title } </ p >
166+ < p className = "typography-body-xs text-neu-700 " > { title } </ p >
150167 </ div >
151- { ( linkedin || twitter ) && (
152- < div className = "flex border-l border-sec-dark max-sm:divide-x sm:flex-col sm:items-center sm:divide-y sm:border-l" >
153- { linkedin && (
168+ < div className = "flex border-l border-sec-dark max-sm:divide-x sm:flex-col sm:items-center sm:divide-y sm:border-l" >
169+ { SocialIconType . all . map ( type => {
170+ if ( ! socials [ type ] ) return null
171+ return (
154172 < a
155- href = { `https://www.linkedin.com/in/${ linkedin } ` }
156- target = "_blank"
157- rel = "noopener noreferrer"
158- className = "flex grow items-center justify-center p-4 transition-colors hover:bg-neu-900/10 hover:text-neu-700 sm:p-2"
159- >
160- < LinkedInIcon />
161- </ a >
162- ) }
163- { twitter && (
164- < a
165- href = { `https://x.com/${ twitter } ` }
173+ href = { urlForUser ( type , socials [ type ] ) }
166174 target = "_blank"
167175 rel = "noopener noreferrer"
168176 className = "flex grow items-center justify-center border-sec-dark p-4 transition-colors hover:bg-neu-900/10 hover:text-neu-700 sm:p-2"
169177 >
170- < TwitterIcon className = "size-6" />
178+ < SocialIcon type = { type } className = "size-6" />
171179 </ a >
172- ) }
173- </ div >
174- ) }
180+ )
181+ } ) }
182+ </ div >
175183 </ div >
176184 </ article >
177185 )
178186}
179187
180- function LinkedInIcon ( props : HTMLAttributes < SVGElement > ) {
181- return (
182- < svg
183- width = "24"
184- height = "24"
185- viewBox = "0 0 24 24"
186- fill = "currentColor"
187- { ...props }
188- >
189- < path d = "M19 3C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19ZM18.5 18.5V13.2C18.5 12.3354 18.1565 11.5062 17.5452 10.8948C16.9338 10.2835 16.1046 9.94 15.24 9.94C14.39 9.94 13.4 10.46 12.92 11.24V10.13H10.13V18.5H12.92V13.57C12.92 12.8 13.54 12.17 14.31 12.17C14.6813 12.17 15.0374 12.3175 15.2999 12.5801C15.5625 12.8426 15.71 13.1987 15.71 13.57V18.5H18.5ZM6.88 8.56C7.32556 8.56 7.75288 8.383 8.06794 8.06794C8.383 7.75288 8.56 7.32556 8.56 6.88C8.56 5.95 7.81 5.19 6.88 5.19C6.43178 5.19 6.00193 5.36805 5.68499 5.68499C5.36805 6.00193 5.19 6.43178 5.19 6.88C5.19 7.81 5.95 8.56 6.88 8.56ZM8.27 18.5V10.13H5.5V18.5H8.27Z" />
190- </ svg >
191- )
192- }
193-
194188function Stripes ( { mask } : { mask ?: string } ) {
195189 return (
196190 < div
0 commit comments