@@ -43,44 +43,47 @@ export const LandingFeaturedProjects = <Name extends string>({
43
43
heading : string ;
44
44
projects : {
45
45
name : FeaturedBadgeName | Name ;
46
+ color ?: string ;
46
47
link : string ;
47
48
description : string ;
48
49
title ?: string ;
49
50
} [ ] ;
50
51
showDivider ?: boolean ;
51
52
} ) => (
52
- < div className = "flex flex-col text-left mx-16 lg:mx-32 xl:mx-64 mt-12 py-12" >
53
+ < div className = "flex flex-col gap-6 text-center md: text-left mx-16 lg:mx-32 xl:mx-64 mt-12 py-12" >
53
54
{ showDivider && < Divider /> }
54
55
< h2 className = "my-8 text-4xl font-semibold" > { heading } </ h2 >
55
- < div className = "grid grid-cols-2 gap-8 " >
56
- { projects . map ( ( { name, link, description, title } ) => {
56
+ < div className = "grid grid-cols-2 gap-12 " >
57
+ { projects . map ( ( { name, link, description, title, color } ) => {
57
58
const lowerCaseName = name . toLocaleLowerCase ( ) ;
58
59
return (
59
60
< a
60
61
href = { link }
61
62
key = { link }
62
- className = "col-span-2 sm:col-span-1 block grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 align-center items-center text-theme-2 hover:text-theme-2 dark:text-white dark:hover:text-white" >
63
+ className = "col-span-2 sm:col-span-1 flex flex-col lg:flex-row gap-6 align-center items-center text-theme-2 hover:text-theme-2 dark:text-white dark:hover:text-white" >
63
64
{ isFeaturedBadgeName ( lowerCaseName ) ? (
64
65
< FeaturedBadge
65
66
name = { lowerCaseName }
66
67
isHoverable
67
- className = "col-span-1 "
68
+ className = "lg:basis-1/3 max-w-xs md:justify-self-end "
68
69
/>
69
70
) : (
70
71
< ProjectBadge
71
72
color = {
73
+ color ||
72
74
DEFAULT_BADGE_COLOR_OPTIONS [ Math . floor ( Math . random ( ) * 5 ) + 1 ]
73
75
}
74
76
isHoverable
75
77
abbreviation = { name . charAt ( 0 ) . toUpperCase ( ) + name . slice ( 1 , 2 ) }
76
78
description = { name }
79
+ className = "lg:basis-1/3 max-w-xs md:justify-self-end"
77
80
/>
78
81
) }
79
- < span className = "flex flex-col col-span-1 lg:col-span-2 " >
82
+ < span className = "flex flex-col lg:basis-2/3 text-center md:text-left " >
80
83
< span className = "text-xl font-semibold capitalize" >
81
84
{ title || name }
82
85
</ span >
83
- < span className = "text-sm " > { description } </ span >
86
+ < span className = "text-sm max-w-md " > { description } </ span >
84
87
</ span >
85
88
</ a >
86
89
) ;
0 commit comments