|
| 1 | +import type { SchedSpeaker } from "@/app/conf/2023/types" |
| 2 | +import { CalendarIcon } from "../../_design-system/pixelarticons/calendar-icon" |
| 3 | +import { PinIcon } from "../../_design-system/pixelarticons/pin-icon" |
| 4 | +import { formatSpeakerPosition } from "./format-speaker-position" |
| 5 | +import { GraphQLLogo } from "./graphql-conf-logo-link" |
| 6 | + |
| 7 | +interface SpeakerOpengraphImageProps extends React.HTMLAttributes<HTMLElement> { |
| 8 | + speaker: SchedSpeaker |
| 9 | + date: string |
| 10 | + location: string |
| 11 | +} |
| 12 | + |
| 13 | +export default function SpeakerOpengraphImage({ |
| 14 | + speaker, |
| 15 | + date, |
| 16 | + location, |
| 17 | + ...rest |
| 18 | +}: SpeakerOpengraphImageProps) { |
| 19 | + return ( |
| 20 | + <article |
| 21 | + className="flex h-[630px] w-[1200px] flex-col border border-neu-300 bg-neu-50" |
| 22 | + {...rest} |
| 23 | + > |
| 24 | + <header className="flex h-36 items-center border-b border-neu-300"> |
| 25 | + <div className="flex flex-1 items-center gap-6 border-r border-neu-300 p-10 pr-16"> |
| 26 | + <div className="flex items-center gap-4"> |
| 27 | + <div className="font-mono font-normal uppercase leading-none text-neu-900"> |
| 28 | + <div className="flex h-[74px] items-center gap-4 text-[40px]/none uppercase"> |
| 29 | + <div className="text-pri-base"> |
| 30 | + <GraphQLLogo className="h-12" /> |
| 31 | + </div> |
| 32 | + <span>/</span> |
| 33 | + <div> |
| 34 | + GraphQLConf{" "} |
| 35 | + <span className="text-pri-base">{speaker.year}</span> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div className="flex h-full w-[400px] flex-col justify-center"> |
| 43 | + <div className="flex items-center gap-6 border-b border-neu-300 px-6 py-[26px]"> |
| 44 | + <div className="flex items-center gap-2"> |
| 45 | + <CalendarIcon width="20" height="20" className="text-pri-base" /> |
| 46 | + <span className="font-mono text-xl font-normal uppercase leading-tight text-neu-900"> |
| 47 | + {date}, {speaker.year} |
| 48 | + </span> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + |
| 52 | + <div className="flex h-[76px] items-center gap-6 px-6 py-[26px]"> |
| 53 | + <div className="flex items-center gap-2"> |
| 54 | + <PinIcon width="20" height="20" className="text-pri-base" /> |
| 55 | + <span className="font-mono text-xl font-normal uppercase leading-tight text-neu-900"> |
| 56 | + {location} |
| 57 | + </span> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </header> |
| 62 | + |
| 63 | + <div className="flex flex-1 justify-between gap-12"> |
| 64 | + <div className="flex flex-1 flex-col justify-center"> |
| 65 | + <div className="flex flex-1 flex-col justify-center gap-10 p-16 pl-10"> |
| 66 | + <div className="flex w-[454px] flex-col gap-10"> |
| 67 | + <h3 className="m-0 font-sans text-[88px] font-normal leading-tight text-neu-900"> |
| 68 | + {speaker.name} |
| 69 | + </h3> |
| 70 | + |
| 71 | + <div className="flex items-center gap-8"> |
| 72 | + <span className="font-sans text-[32px] font-normal leading-tight text-neu-700"> |
| 73 | + {formatSpeakerPosition(speaker)} |
| 74 | + </span> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + |
| 79 | + <footer className="flex items-center border-t border-neu-300 px-16 py-8 pl-10"> |
| 80 | + <span className="font-mono text-2xl font-normal uppercase leading-none text-neu-900"> |
| 81 | + Speakers |
| 82 | + </span> |
| 83 | + </footer> |
| 84 | + </div> |
| 85 | + |
| 86 | + <img |
| 87 | + src="https://placedog.net/400/400" |
| 88 | + alt={speaker.name} |
| 89 | + className="size-full object-cover" |
| 90 | + /> |
| 91 | + </div> |
| 92 | + </article> |
| 93 | + ) |
| 94 | +} |
0 commit comments