@@ -9,6 +9,8 @@ import { SchedSpeaker } from "../../2023/types"
9
9
import { StripesDecoration } from "../../_design-system/stripes-decoration"
10
10
import { SocialIcon , SocialIconType } from "../../_design-system/social-icon"
11
11
12
+ import styles from "./speaker-card.module.css"
13
+
12
14
export interface SpeakerCardProps extends React . HTMLAttributes < HTMLDivElement > {
13
15
tags ?: string [ ]
14
16
isReturning ?: boolean
@@ -30,6 +32,7 @@ export function SpeakerCard({
30
32
< article
31
33
className = { clsx (
32
34
"group relative overflow-hidden border border-neu-200 bg-neu-0 @container dark:border-neu-100" ,
35
+ styles . speakerCard ,
33
36
className ,
34
37
) }
35
38
{ ...props }
@@ -38,23 +41,33 @@ export function SpeakerCard({
38
41
{ showSocials && (
39
42
< SpeakerLinks speaker = { speaker } className = "absolute right-6 top-6" />
40
43
) }
41
- { speaker . avatar && (
42
- < div className = "relative aspect-square shrink-0 overflow-hidden" >
43
- < div className = "absolute inset-0 z-[1] bg-sec-light mix-blend-multiply" />
44
+
45
+ < div className = "relative aspect-square shrink-0 overflow-hidden @[420px]:basis-[176px]" >
46
+ < div className = "absolute inset-0 z-[1] bg-sec-light mix-blend-multiply" />
47
+ { speaker . avatar ? (
44
48
< Image
45
49
src = { speaker . avatar }
46
50
alt = ""
47
51
width = { 176 }
48
52
height = { 176 }
49
53
className = "size-full object-cover saturate-[.1] transition-transform"
50
54
/>
51
- < Stripes mask = "radial-gradient(ellipse at top left, hsl(var(--color-pri-base)) 0%, hsl(var(--color-pri-base)) 5%, transparent 40%, transparent, transparent 85%, black 100%)" />
52
- </ div >
53
- ) }
55
+ ) : (
56
+ < div
57
+ className = "size-full"
58
+ style = { {
59
+ backgroundImage :
60
+ "linear-gradient(163deg, #759236 0%, hsl(var(--color-sec-lighter)) 100%)" ,
61
+ } }
62
+ />
63
+ ) }
64
+ < Stripes />
65
+ </ div >
66
+
54
67
< div className = "flex flex-1 flex-col gap-2" >
55
68
< div className = "flex flex-col gap-1" >
56
69
< h3 className = "typography-body-lg" > { speaker . name } </ h3 >
57
- < p className = "typography-body-sm text-neu-800" >
70
+ < p className = "text-neu-800 typography-body-sm " >
58
71
{ [
59
72
speaker . position ,
60
73
speaker . company === "-" ? "" : speaker . company ,
@@ -64,7 +77,7 @@ export function SpeakerCard({
64
77
</ p >
65
78
</ div >
66
79
{ speaker . about && (
67
- < p className = "typography-body-sm line-clamp-3 text-neu-800" >
80
+ < p className = "line-clamp-3 text-neu-800 typography-body-sm " >
68
81
{ speaker . about }
69
82
</ p >
70
83
) }
@@ -124,17 +137,16 @@ function SpeakerLinks({
124
137
)
125
138
}
126
139
127
- function Stripes ( { mask } : { mask ?: string } ) {
140
+ function Stripes ( ) {
128
141
return (
129
142
< div
130
143
role = "presentation"
131
- className = "pointer-events-none absolute inset-0 inset-y-[-20px]"
132
- style = { {
133
- maskImage : mask ,
134
- WebkitMaskImage : mask ,
135
- } }
144
+ className = { clsx (
145
+ "pointer-events-none absolute inset-0 inset-y-[-20px]" ,
146
+ styles . stripes ,
147
+ ) }
136
148
>
137
- < StripesDecoration oddClassName = "absolute inset-0 bg-gradient-to-b from-sec-dark to-sec-light " />
149
+ < StripesDecoration oddClassName = "absolute inset-0 bg-gradient-to-b from-sec-dark to-[var(--end-color)] " />
138
150
</ div >
139
151
)
140
152
}
0 commit comments