@@ -47,84 +47,106 @@ export function FeaturedTaskCarousel({
4747
4848 return (
4949 < >
50- < div className = "relative tb-frame bg-[#fffdf9] px-6 py-8 " >
50+ < div className = "relative mx-auto w-full max-w-[590px] " >
5151 < button
5252 type = "button"
53- className = "tb-focus-ring absolute left-3 top-1/2 z-10 -translate-y-1/2 rounded-full border-2 border-[#25314d] bg-white p-3 shadow-[0_4px_0_#25314d] lg:- left-5 "
53+ className = "tb-focus-ring absolute left-3 top-1/2 z-10 -translate-y-1/2 rounded-full border-2 border-[#25314d] bg-white p-3 shadow-[0_4px_0_#25314d] sm: left-0 sm:-translate-x-1/2 "
5454 onClick = { ( ) => goTo ( activeIndex - 1 ) }
5555 aria-label = "Show previous featured task"
5656 >
5757 < IconChevronLeft className = "size-4" />
5858 </ button >
5959 < button
6060 type = "button"
61- className = "tb-focus-ring absolute right-3 top-1/2 z-10 -translate-y-1/2 rounded-full border-2 border-[#25314d] bg-white p-3 shadow-[0_4px_0_#25314d] lg:- right-5 "
61+ className = "tb-focus-ring absolute right-3 top-1/2 z-10 -translate-y-1/2 rounded-full border-2 border-[#25314d] bg-white p-3 shadow-[0_4px_0_#25314d] sm: right-0 sm:translate-x-1/2 "
6262 onClick = { ( ) => goTo ( activeIndex + 1 ) }
6363 aria-label = "Show next featured task"
6464 >
6565 < IconChevronRight className = "size-4" />
6666 </ button >
67+ < div className = "tb-frame h-[410px] overflow-visible bg-[#fffdf9] px-6 py-7 sm:h-[450px] sm:px-8" >
68+ < div className = "flex h-full flex-col" >
69+ < div className = "flex flex-wrap justify-center gap-2" >
70+ { tasks . map ( ( task , index ) => (
71+ < button
72+ key = { task . repo }
73+ type = "button"
74+ className = {
75+ index === activeIndex
76+ ? "tb-focus-ring rounded-full border-2 border-[#25314d] bg-[#d7ebf6] px-3 py-1.5 text-sm font-bold text-[#25314d] shadow-[0_4px_0_#25314d]"
77+ : "tb-focus-ring rounded-full border-2 border-[#25314d] bg-white px-3 py-1.5 text-sm font-bold text-[#25314d]"
78+ }
79+ onClick = { ( ) => setActiveIndex ( index ) }
80+ >
81+ { task . tags ?. paradigm ?. [ 0 ] ?? taskHandle ( task ) }
82+ </ button >
83+ ) ) }
84+ </ div >
6785
68- < div className = "flex flex-wrap justify-center gap-2" >
69- { tasks . map ( ( task , index ) => (
70- < button
71- key = { task . repo }
72- type = "button"
73- className = {
74- index === activeIndex
75- ? "tb-focus-ring rounded-full border-2 border-[#25314d] bg-[#d7ebf6] px-3 py-1.5 text-sm font-bold text-[#25314d] shadow-[0_4px_0_#25314d]"
76- : "tb-focus-ring rounded-full border-2 border-[#25314d] bg-white px-3 py-1.5 text-sm font-bold text-[#25314d]"
77- }
78- onClick = { ( ) => setActiveIndex ( index ) }
79- >
80- { task . tags ?. paradigm ?. [ 0 ] ?? taskHandle ( task ) }
81- </ button >
82- ) ) }
83- </ div >
84-
85- < div className = "mt-5 tb-frame-soft bg-[#f8fcff] p-5 sm:px-8" >
86- < div className = "flex flex-wrap items-center gap-2 text-xs text-slate-600" >
87- < code className = "rounded-full border-2 border-[#25314d] bg-white px-2.5 py-1 font-mono text-[11px] font-semibold text-[#25314d]" >
88- { taskHandle ( activeTask ) }
89- </ code >
90- { activeTask . maturity ? < MaturityBadge maturity = { activeTask . maturity } /> : null }
91- { preview ? (
92- < span className = "rounded-full bg-[#ecffe5] px-3 py-1 text-[11px] font-bold text-[#25314d]" >
93- Preview ready
94- </ span >
95- ) : null }
96- < span className = "rounded-full bg-[#e2f3fb] px-3 py-1 text-[11px] font-bold text-[#25314d]" >
97- { formatShortDate ( activeTask . last_updated ) }
98- </ span >
99- </ div >
86+ < div className = "mt-6 flex-1" >
87+ < div className = "tb-frame-soft flex h-full flex-col bg-[#f8fcff] p-5 sm:p-6" >
88+ < div className = "flex flex-wrap items-center gap-2 text-xs text-slate-600" >
89+ < code className = "rounded-full border-2 border-[#25314d] bg-white px-2.5 py-1 font-mono text-[11px] font-semibold text-[#25314d]" >
90+ { taskHandle ( activeTask ) }
91+ </ code >
92+ { activeTask . maturity ? < MaturityBadge maturity = { activeTask . maturity } /> : null }
93+ { preview ? (
94+ < span className = "rounded-full bg-[#ecffe5] px-3 py-1 text-[11px] font-bold text-[#25314d]" >
95+ Preview ready
96+ </ span >
97+ ) : null }
98+ < span className = "rounded-full bg-[#e2f3fb] px-3 py-1 text-[11px] font-bold text-[#25314d]" >
99+ { formatShortDate ( activeTask . last_updated ) }
100+ </ span >
101+ </ div >
100102
101- < div className = "mt-4 font-heading text-3xl font-bold leading-tight text-[#25314d]" >
102- { taskTitle ( activeTask ) }
103- </ div >
103+ < div className = "mt-4 min-h-[6.1rem] font-heading text-3xl font-bold leading-tight text-[#25314d] sm:text-[2.65rem]" >
104+ < span
105+ style = { {
106+ display : "-webkit-box" ,
107+ WebkitLineClamp : 2 ,
108+ WebkitBoxOrient : "vertical" ,
109+ overflow : "hidden"
110+ } }
111+ >
112+ { taskTitle ( activeTask ) }
113+ </ span >
114+ </ div >
104115
105- < p className = "mt-3 max-w-2xl text-sm leading-7 text-slate-700 sm:text-base" >
106- { activeTask . short_description }
107- </ p >
116+ < p
117+ className = "mt-3 min-h-[4.8rem] max-w-[36ch] text-sm leading-7 text-slate-700 sm:text-base"
118+ style = { {
119+ display : "-webkit-box" ,
120+ WebkitLineClamp : 3 ,
121+ WebkitBoxOrient : "vertical" ,
122+ overflow : "hidden"
123+ } }
124+ >
125+ { activeTask . short_description }
126+ </ p >
108127
109- < div className = "mt-6 flex flex-wrap gap-3" >
110- < button
111- type = "button"
112- className = "tb-focus-ring tb-button-primary"
113- onClick = { ( ) => setDrawerRepo ( activeTask . repo ) }
114- >
115- Expand details
116- </ button >
117- { preview ? (
118- < a
119- className = "tb-focus-ring tb-button-secondary bg-[#d7ebf6]"
120- href = { preview . run_url }
121- target = "_blank"
122- rel = "noreferrer"
123- >
124- < IconPlay className = "size-4" />
125- Run Preview
126- </ a >
127- ) : null }
128+ < div className = "mt-auto flex flex-wrap gap-3" >
129+ < button
130+ type = "button"
131+ className = "tb-focus-ring tb-button-primary"
132+ onClick = { ( ) => setDrawerRepo ( activeTask . repo ) }
133+ >
134+ Expand details
135+ </ button >
136+ { preview ? (
137+ < a
138+ className = "tb-focus-ring tb-button-secondary bg-[#d7ebf6]"
139+ href = { preview . run_url }
140+ target = "_blank"
141+ rel = "noreferrer"
142+ >
143+ < IconPlay className = "size-4" />
144+ Run Preview
145+ </ a >
146+ ) : null }
147+ </ div >
148+ </ div >
149+ </ div >
128150 </ div >
129151 </ div >
130152 </ div >
0 commit comments