@@ -3,7 +3,8 @@ import { clsx } from "clsx"
33
44import { CalendarIcon } from "@/app/conf/_design-system/pixelarticons/calendar-icon"
55import { PinIcon } from "@/app/conf/_design-system/pixelarticons/pin-icon"
6- import { Tag } from "../../app/conf/_design-system/tag"
6+ import { Tag } from "@/app/conf/_design-system/tag"
7+ import { eventTagColors } from "./event-filter-tag"
78
89const dateFormatter = new Intl . DateTimeFormat ( "en" , {
910 day : "numeric" ,
@@ -55,6 +56,7 @@ export interface EventCardProps {
5556 name : ReactNode
5657 meta ?: ReactNode
5758 official ?: boolean
59+ kind : "meetup" | "conference" | "working-group"
5860}
5961
6062export function EventCard ( {
@@ -64,43 +66,43 @@ export function EventCard({
6466 name,
6567 meta,
6668 official,
69+ kind,
6770} : EventCardProps ) {
6871 const dateLabel = formatDateLabel ( date )
6972 const parsedDate = normaliseDate ( date )
70-
7173 return (
7274 < a
7375 href = { href }
7476 className = { clsx (
75- "gql-focus-visible group flex min-w-[260px] flex-col overflow-hidden border border-neu-200 bg-neu-0 text-left text-current no-underline ring-neu-400 hover:bg-sec-base/[.035] hover:ring-1 hover:ring-offset-1 hover:ring-offset-neu-0 dark:border-neu-100 dark:ring-neu-100 xs:min-w-[352px]" ,
77+ "gql-focus-visible group flex min-h-[214px] min-w-[260px] flex-col overflow-hidden border border-neu-200 text-left text-current no-underline ring-neu-400 hover:ring-1 hover:ring-offset-1 hover:ring-offset-neu-0 dark:border-neu-50 dark:ring-neu-100 xs:min-w-[352px]" ,
78+ "[--bg-opacity:0.05] hover:[--bg-opacity:0.07] dark:[--bg-opacity:0.03] hover:dark:[--bg-opacity:0.06]" ,
79+
80+ "z-[4]" ,
81+ kind === "meetup" &&
82+ "bg-[hsl(var(--color-sec-base)/var(--bg-opacity))]" ,
83+ kind === "conference" &&
84+ "bg-[hsl(var(--color-pri-base)/var(--bg-opacity))] dark:bg-white/5" ,
85+ kind === "working-group" &&
86+ "bg-[hsl(229deg_100%_70.4%_/_var(--bg-opacity))]" ,
7687 ) }
7788 target = "_blank"
7889 rel = "noreferrer"
7990 >
8091 < div className = "flex flex-1 flex-col" >
8192 < div
8293 className = { clsx (
83- "flex items-center justify-between gap-2 px-2 text-neu-700 dark:text-neu-600 xs:px-4" ,
94+ "flex h-[45px] items-center justify-between gap-2 px-2 text-neu-800 dark:text-neu-600 xs:px-4" ,
8495 meta
85- ? "border-b border-neu-200 py-2.5 dark:border-neu-100 "
96+ ? "border-b border-neu-200 py-2.5 dark:border-neu-50 "
8697 : "-mb-2 pt-2 xs:-mb-4 xs:pt-3" ,
8798 ) }
8899 >
100+ < Tag color = { eventTagColors [ kind ] } > { kind } </ Tag >
89101 { meta ? (
90- < span className = "typography-body-md font-medium " > { meta } </ span >
102+ < span className = "typography-body-md" > { meta } </ span >
91103 ) : (
92104 < span className = "sr-only" > Official GraphQL Local</ span >
93105 ) }
94- { official ? (
95- < Tag color = "hsl(var(--color-pri-base))" className = "*:gap-1" >
96- < span className = "font-sans" aria-hidden >
97- ★
98- </ span >
99- Official
100- </ Tag >
101- ) : meta ? null : (
102- < div className = "h-[22px]" />
103- ) }
104106 </ div >
105107
106108 < div className = "typography-h3 flex min-h-[100px] flex-1 flex-col justify-center px-2 py-3 text-neu-900 xs:min-h-[124px] xs:px-4 xs:py-6" >
@@ -109,15 +111,15 @@ export function EventCard({
109111
110112 < div
111113 className = { clsx (
112- "flex flex-wrap border-t border-neu-200 text-neu-700 dark:border-neu-100 " ,
114+ "flex flex-wrap border-t border-neu-200 text-neu-800 dark:border-neu-50 " ,
113115 dateLabel && city
114- ? "grid grid-cols-2 divide-x divide-neu-200 dark:divide-neu-100 "
116+ ? "grid grid-cols-2 divide-x divide-neu-200 dark:divide-neu-50 "
115117 : "" ,
116118 ) }
117119 >
118120 { dateLabel && (
119- < div className = "typography-body-sm flex items-center gap-1 px-2 py-1.5 text-neu-700 dark:text-neu-600 xs:gap-1.5 xs:px-4 xs:py-2.5" >
120- < CalendarIcon className = "size-4 shrink-0 translate-y-[-.5px] text-neu-600 dark:text-neu-500 xs:size-5" />
121+ < div className = "typography-body-sm flex items-center gap-1 px-2 py-1.5 text-neu-800 dark:text-neu-600 xs:gap-1.5 xs:px-4 xs:py-2.5" >
122+ < CalendarIcon className = "size-4 shrink-0 translate-y-[-.5px] text-neu-800 dark:text-neu-500 xs:size-5" />
121123 { parsedDate ? (
122124 < time dateTime = { parsedDate . toISOString ( ) } > { dateLabel } </ time >
123125 ) : (
@@ -126,8 +128,8 @@ export function EventCard({
126128 </ div >
127129 ) }
128130 { city && (
129- < div className = "typography-body-sm flex items-center gap-1.5 whitespace-pre px-2 py-1.5 text-neu-700 dark:text-neu-600 xs:px-4 xs:py-2.5" >
130- < PinIcon className = "size-4 shrink-0 translate-y-[-.5px] text-neu-600 dark:text-neu-500 xs:size-5" />
131+ < div className = "typography-body-sm flex items-center gap-1.5 whitespace-pre px-2 py-1.5 text-neu-800 dark:text-neu-600 xs:px-4 xs:py-2.5" >
132+ < PinIcon className = "size-4 shrink-0 translate-y-[-.5px] text-neu-800 dark:text-neu-500 xs:size-5" />
131133 { city }
132134 </ div >
133135 ) }
0 commit comments