File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -32,23 +32,28 @@ export default function FundingPage() {
3232 { fundingData . map ( ( grant ) => (
3333 < Card key = { grant . id } className = "group transition-all hover:shadow-soft-lg" >
3434 < CardHeader >
35- < div className = "flex items-start gap-4" >
35+ < div className = "flex flex-col gap-4 sm:flex-row sm:items-start " >
3636 { /* Funder Logo */ }
37- < FunderLogo
38- name = { grant . funder . name }
39- logo = { grant . funder . logo }
40- website = { grant . funder . website }
41- size = "md"
42- />
37+ < div className = "flex w-full justify-center sm:w-auto sm:justify-start" >
38+ < div className = "w-full max-w-xs sm:w-auto" >
39+ < FunderLogo
40+ name = { grant . funder . name }
41+ logo = { grant . funder . logo }
42+ website = { grant . funder . website }
43+ size = "md"
44+ grayscale = { false }
45+ />
46+ </ div >
47+ </ div >
4348
4449 { /* Grant Content */ }
45- < div className = "min-w-0 flex-1" >
50+ < div className = "min-w-0 flex-1 overflow-hidden " >
4651 < div className = "mb-2 flex flex-wrap items-center gap-2" >
4752 < Badge variant = "outline" > { grant . period } </ Badge >
4853 < Badge variant = "secondary" > { grant . type } </ Badge >
4954 </ div >
50- < CardTitle className = "text-xl" > { grant . title } </ CardTitle >
51- < CardDescription className = "mt-2" > { grant . description } </ CardDescription >
55+ < CardTitle className = "break-words text-xl" > { grant . title } </ CardTitle >
56+ < CardDescription className = "mt-2 break-words " > { grant . description } </ CardDescription >
5257 </ div >
5358 </ div >
5459 </ CardHeader >
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ interface FunderLogoProps {
88 website ?: string
99 size ?: "sm" | "md" | "lg"
1010 className ?: string
11+ grayscale ?: boolean
1112}
1213
1314const sizeClasses = {
1415 sm : "w-36 h-20" ,
15- md : "w-48 h-28 lg :w-56 lg :h-32 " ,
16- lg : "w-64 h-36 lg :w-72 lg :h-40 " ,
16+ md : "w-full h-40 sm :w-56 sm :h-40 " ,
17+ lg : "w-full h-48 sm :w-72 sm :h-48 " ,
1718}
1819
1920const containerPadding = {
@@ -28,6 +29,7 @@ export function FunderLogo({
2829 website,
2930 size = "md" ,
3031 className,
32+ grayscale = true ,
3133} : FunderLogoProps ) {
3234 const logoElement = (
3335 < div
@@ -44,7 +46,12 @@ export function FunderLogo({
4446 < img
4547 src = { logo }
4648 alt = { `${ name } logo` }
47- className = "size-full object-contain opacity-70 mix-blend-multiply grayscale transition-all duration-500 ease-out group-hover:scale-105 group-hover:opacity-100 group-hover:grayscale-0 dark:opacity-90 dark:mix-blend-normal dark:grayscale-0"
49+ className = { cn (
50+ "size-full object-contain transition-all duration-500 ease-out group-hover:scale-105" ,
51+ grayscale
52+ ? "opacity-70 mix-blend-multiply grayscale group-hover:opacity-100 group-hover:grayscale-0 dark:opacity-90 dark:mix-blend-normal dark:grayscale-0"
53+ : "opacity-90 group-hover:opacity-100 dark:opacity-100"
54+ ) }
4855 />
4956 </ div >
5057 )
You can’t perform that action at this time.
0 commit comments