|
| 1 | +import clsx from "clsx" |
| 2 | +import { HTMLAttributes } from "react" |
| 3 | +import Image from "next-image-export-optimizer" |
| 4 | +import type { StaticImageData } from "next/image" |
| 5 | + |
| 6 | +import elizabethStone from "./speakers/elizabeth-stone.webp" |
| 7 | +import kamilKisiela from "./speakers/kamil-kisiela.webp" |
| 8 | +import rajeevRajan from "./speakers/rajeev-rajan.webp" |
| 9 | +import tenmaiGopal from "./speakers/tenmai-gopal.webp" |
| 10 | +import uriGoldshtein from "./speakers/uri-goldshtein.webp" |
| 11 | +import TwitterIcon from "@/icons/twitter.svg" |
| 12 | + |
| 13 | +interface TopMindsSectionProps extends HTMLAttributes<HTMLElement> {} |
| 14 | + |
| 15 | +export default function TopMindsSection({ |
| 16 | + className, |
| 17 | + ...rest |
| 18 | +}: TopMindsSectionProps) { |
| 19 | + return ( |
| 20 | + <section |
| 21 | + className={clsx( |
| 22 | + "flex gap-6 px-4 py-8 text-neu-900 max-md:flex-col lg:px-12 xl:gap-x-24 xl:px-24", |
| 23 | + className, |
| 24 | + )} |
| 25 | + {...rest} |
| 26 | + > |
| 27 | + <h3 className="typography-h2">Meet the top industry minds</h3> |
| 28 | + <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3"> |
| 29 | + <SpeakerCard |
| 30 | + name="Uri Goldshtein" |
| 31 | + title="The Guild — Founder" |
| 32 | + src={uriGoldshtein} |
| 33 | + twitterHref="UriGoldshtein" |
| 34 | + linkedinHref="uri-goldshtein-88986749" |
| 35 | + /> |
| 36 | + <SpeakerCard |
| 37 | + name="Elizabeth Stone" |
| 38 | + title="Netflix — CTO" |
| 39 | + src={elizabethStone} |
| 40 | + linkedinHref="https://www.linkedin.com/in/elizabeth-stone-608a754/" |
| 41 | + /> |
| 42 | + <SpeakerCard |
| 43 | + name="Kamil Kisiela" |
| 44 | + title="The Guild — Developer" |
| 45 | + src={kamilKisiela} |
| 46 | + twitterHref="kamilkisiela" |
| 47 | + linkedinHref="kamilkisiela" |
| 48 | + /> |
| 49 | + <SpeakerCard |
| 50 | + name="Rajeev Rajan" |
| 51 | + title="Atlassian — CTO" |
| 52 | + src={rajeevRajan} |
| 53 | + twitterHref="rajeevrajango" |
| 54 | + linkedinHref="rajeev-rajan" |
| 55 | + /> |
| 56 | + <SpeakerCard |
| 57 | + name="Tenmai Gopal" |
| 58 | + title="Hasura — CEO & Co-Founder" |
| 59 | + src={tenmaiGopal} |
| 60 | + twitterHref="tenmaigopal" |
| 61 | + linkedinHref="tenmai" |
| 62 | + /> |
| 63 | + </div> |
| 64 | + </section> |
| 65 | + ) |
| 66 | +} |
| 67 | + |
| 68 | +function SpeakerCard({ |
| 69 | + name, |
| 70 | + title, |
| 71 | + src, |
| 72 | + twitterHref, |
| 73 | + linkedinHref, |
| 74 | +}: { |
| 75 | + name: string |
| 76 | + title: string |
| 77 | + src: string | StaticImageData |
| 78 | + twitterHref?: string |
| 79 | + linkedinHref?: string |
| 80 | +}) { |
| 81 | + return ( |
| 82 | + <article className="group flex flex-col"> |
| 83 | + <div className="relative aspect-square w-full overflow-hidden border border-[#83BD02]"> |
| 84 | + <Image |
| 85 | + src={src} |
| 86 | + alt="" |
| 87 | + width={236} |
| 88 | + height={236} |
| 89 | + className="size-full object-cover transition-transform duration-300" |
| 90 | + /> |
| 91 | + </div> |
| 92 | + <div className="flex items-center justify-between border border-t-0 border-[#83BD02] p-3"> |
| 93 | + <div className="flex flex-col gap-1"> |
| 94 | + <h4 className="font-medium typography-body-md">{name}</h4> |
| 95 | + <p className="text-neu-700 typography-body-sm">{title}</p> |
| 96 | + </div> |
| 97 | + <div className="flex gap-3"> |
| 98 | + {twitterHref && ( |
| 99 | + <a |
| 100 | + href={twitterHref} |
| 101 | + target="_blank" |
| 102 | + rel="noopener noreferrer" |
| 103 | + className="text-neu-700 transition-colors hover:text-neu-900" |
| 104 | + > |
| 105 | + <TwitterIcon className="size-6" /> |
| 106 | + </a> |
| 107 | + )} |
| 108 | + {linkedinHref && ( |
| 109 | + <a |
| 110 | + href={linkedinHref} |
| 111 | + target="_blank" |
| 112 | + rel="noopener noreferrer" |
| 113 | + className="text-neu-700 transition-colors hover:text-neu-900" |
| 114 | + > |
| 115 | + <LinkedInIcon /> |
| 116 | + </a> |
| 117 | + )} |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + </article> |
| 121 | + ) |
| 122 | +} |
| 123 | + |
| 124 | +function LinkedInIcon(props: HTMLAttributes<SVGElement>) { |
| 125 | + return ( |
| 126 | + <svg |
| 127 | + width="24" |
| 128 | + height="24" |
| 129 | + viewBox="0 0 24 24" |
| 130 | + fill="currentColor" |
| 131 | + {...props} |
| 132 | + > |
| 133 | + <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" /> |
| 134 | + </svg> |
| 135 | + ) |
| 136 | +} |
0 commit comments