1import Link from "next/link";
3export default function EventPreview({ event, className, title }) {
4 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
5 const grayText = event.extra?.dark ? "text-midWhite" : "text-gray";
6 const blackText = event.extra?.dark ? "text-white" : "text-black";
9 <div className={`cursor-pointer ${className}`}>
10 {title ? <h3 className="mb-2">{title}</h3> : null}
13 className={`bg-wall rounded-xl h-96 bg-cover bg-center bg-no-repeat`}
14 style={{ backgroundImage: `url(${event.extra?.image})` || "" }}
16 <Link href={`/events/${event.slug}`}>
17 <div className="flex flex-col p-4 justify-between items-between h-full relative">
18 <div className="flex-grow-1 flex flex-col justify-center h-full">
19 <h4 className={`mb-4 ${blackText}`}>{event.title}</h4>
20 <p className={grayText}>{event?.type}</p>
22 <div className="absolute p-4 left-0 bottom-0 w-full">
23 <p className={`${grayText} type-ui-small`}>{event.extra.host}</p>
24 <p className={`${grayText} type-ui-small`}>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list