1
1
import { clsx } from "clsx"
2
2
import { ScheduleSession } from "@/app/conf/2023/types"
3
- import { Tag } from "@/app/conf/_design-system/tag"
4
3
import { Button } from "@/app/conf/_design-system/button"
5
4
import { Anchor } from "@/app/conf/_design-system/anchor"
6
5
import { CalendarIcon } from "@/app/conf/_design-system/pixelarticons/calendar-icon"
@@ -9,7 +8,7 @@ import ClockIcon from "@/app/conf/_design-system/pixelarticons/clock.svg?svgr"
9
8
import PlusIcon from "@/app/conf/_design-system/pixelarticons/plus.svg?svgr"
10
9
import PlayIcon from "@/app/conf/_design-system/pixelarticons/play.svg?svgr"
11
10
import { findVideo } from "../../schedule/[id]/session-video"
12
- import { eventsColors , getEventTitle } from "../../utils"
11
+ import { getEventTitle } from "../../utils"
13
12
import React from "react"
14
13
import { SessionTags } from "../../components/session-tags"
15
14
@@ -57,15 +56,14 @@ export function LongSessionCard({
57
56
return (
58
57
< div
59
58
className = { clsx (
60
- "group relative border border-neu-200 bg-neu-0" ,
61
- ! ! video && "flex flex-col gap-6 backdrop-blur-md" ,
59
+ "group relative border border-neu-200 bg-neu-0 dark:border-neu-100" ,
62
60
className ,
63
61
) }
64
62
{ ...props }
65
63
>
66
64
< Anchor
67
65
href = { `/conf/${ year } /schedule/${ session . id } ?name=${ session . name } ` }
68
- className = "absolute inset-0 z-[1] ring-inset ring-neu-400 hover:ring-1 dark:ring-neu-100"
66
+ className = "absolute inset-0 z-[1] ring-inset ring-neu-400 hover:bg-sec-base/[.035] hover: ring-1 dark:ring-neu-100"
69
67
aria-label = { `Read more about "${ eventTitle } " by ${ session . speakers ?. [ 0 ] ?. name || "Speaker" } ` }
70
68
/>
71
69
@@ -83,12 +81,9 @@ export function LongSessionCard({
83
81
</ div >
84
82
85
83
< div className = "flex flex-col gap-4" >
86
- < div className = "min-h-[120px]" >
87
- < h3 className = "typography-body-lg text-neu-900" >
88
- { getEventTitle (
89
- session ,
90
- speakers . map ( s => s . name ) ,
91
- ) }
84
+ < div className = "min-h-[60px]" >
85
+ < h3 className = "typography-body-lg text-neu-900 2xl:text-2xl" >
86
+ { eventTitle }
92
87
</ h3 >
93
88
</ div >
94
89
< div className = "flex items-center justify-between gap-2" >
@@ -126,36 +121,39 @@ export function LongSessionCard({
126
121
{ /* todo: past session no recording variant */ }
127
122
128
123
{ video ? (
129
- < Button
130
- href = { `https://youtube.com/embed/${ video . id } ` }
131
- variant = "primary"
132
- className = "relative z-[2] w-full"
133
- >
134
- Watch
135
- < PlayIcon className = "size-6" />
136
- </ Button >
124
+ < footer className = "px-6 pb-6 pt-0" >
125
+ < Button
126
+ href = { `https://youtube.com/embed/${ video . id } ` }
127
+ variant = "primary"
128
+ className = "relative z-[2] w-full"
129
+ >
130
+ Watch
131
+ < PlayIcon className = "size-6" />
132
+ </ Button >
133
+ </ footer >
137
134
) : (
138
- < footer className = "flex items-center border-t border-neu-200 text-neu-800" >
139
- < div className = "flex flex-1 items-center gap-6 border-r border-neu-200 px-6 py-4" >
140
- < div className = "flex items-center gap-0.5" >
141
- < CalendarIcon className = "size-4 text-sec-dark" />
142
- < span className = "typography-body-xs" > { formattedDate } </ span >
143
- </ div >
144
- < div className = "flex items-center gap-0.5" >
145
- < ClockIcon className = "size-4 text-sec-dark" />
146
- < span className = "typography-body-xs" > { formattedTime } </ span >
135
+ < footer className = "flex items-center border-t border-neu-200 text-neu-800 dark:border-neu-100" >
136
+ < div className = "flex flex-1 items-center gap-6 border-r border-neu-200 p-6" >
137
+ < div className = "contents flex-col md:max-xl:flex" >
138
+ < div className = "flex items-center gap-0.5 whitespace-pre" >
139
+ < CalendarIcon className = "size-4 shrink-0 -translate-y-px text-sec-dark" />
140
+ < span className = "typography-body-xs" > { formattedDate } </ span >
141
+ </ div >
142
+ < div className = "flex items-center gap-0.5" >
143
+ < ClockIcon className = "size-4 shrink-0 text-sec-dark" />
144
+ < span className = "typography-body-xs" > { formattedTime } </ span >
145
+ </ div >
147
146
</ div >
148
147
< div className = "flex items-center gap-0.5" >
149
- < PinIcon className = "size-4 text-sec-dark" />
148
+ < PinIcon className = "size-4 shrink-0 text-sec-dark" />
150
149
< span className = "typography-body-xs" > { session . venue } </ span >
151
150
</ div >
152
151
</ div >
153
- < div className = "flex flex-col items-center justify-center gap-6 px-6 py-4" >
154
- < button className = "relative z-[2] flex items-center gap-0.5 text-neu-800" >
155
- < PlusIcon className = "size-4 text-sec-dark" />
156
- < span className = "typography-body-xs" > Add to calendar</ span >
157
- </ button >
158
- </ div >
152
+ { /* TODO: Actually add to calendar. Ensure we show this only on this year's events. */ }
153
+ < button className = "relative z-[2] flex h-full flex-row items-center justify-center gap-0.5 px-6 py-4 text-neu-800 ring-inset ring-neu-400 hover:bg-sec-base/[.035] hover:ring-1 dark:ring-neu-100" >
154
+ < PlusIcon className = "size-4 shrink-0 text-sec-dark" />
155
+ < span className = "typography-body-xs" > Add to calendar</ span >
156
+ </ button >
159
157
</ footer >
160
158
) }
161
159
</ div >
0 commit comments