@@ -18,13 +18,10 @@ const PostItem = ({ slug, title, date, updatedDate, category }) => {
1818 } ) : null ;
1919
2020 const categoryBadgeColorStyle = { backgroundColor : category === 'dev' ? 'var(--color-dev-badge)' : 'var(--color-takes-badge)' } ;
21- const postBackgroundColorStyle = {
22- backgroundColor : category === 'dev' ? 'var(--color-dev-card-bg)' : 'var(--color-takes-card-bg)' ,
23- '--hover-bg' : category === 'dev' ? 'var(--color-dev-card-bg-hover)' : 'var(--color-takes-card-bg-hover)' ,
24- } ;
21+ const postBackgroundColorClass = category === 'dev' ? 'bg-dev-card-bg' : 'bg-takes-card-bg' ;
2522
2623 return (
27- < Link to = { `/blog/${ slug } ` } className = { `block p-8 my-4 border border-gray-700/50 rounded-lg shadow-lg cursor-pointer transition-colors group` } style = { postBackgroundColorStyle } >
24+ < Link to = { `/blog/${ slug } ` } className = { `block p-8 my-4 border border-gray-700/50 rounded-lg shadow-lg cursor-pointer transition-colors group ${ postBackgroundColorClass } hover:bg-red-500/10` } >
2825 < article >
2926 < div className = "flex items-center" >
3027 < p className = "text-sm text-gray-400" > { formattedDate } </ p >
@@ -34,14 +31,14 @@ const PostItem = ({ slug, title, date, updatedDate, category }) => {
3431 { category }
3532 </ span >
3633 ) }
37- < h2 className = "text-xl font-semibold text-white group-hover:text-primary-400 transition-colors" >
34+ < h2 className = "text-xl font-semibold text-white group-hover:text-title-hover group-hover:underline transition-colors" >
3835 { title }
3936 </ h2 >
4037 </ div >
4138 { formattedUpdatedDate && updatedDate !== date && (
4239 < span className = "hidden sm:inline-block ml-4 px-2 py-1 text-xs font-medium text-orange-400 bg-orange-400/10 rounded-full" > Updated: { formattedUpdatedDate } </ span >
4340 ) }
44- < span className = "ml-4 flex-shrink-0 text-sm font-medium text-primary-400 hover:text-primary-500 transition-colors" >
41+ < span className = "ml-4 flex-shrink-0 text-sm font-medium text-primary-400 group- hover:text-title-hover group-hover:underline transition-colors" >
4542 < span className = "hidden sm:inline" > Read post</ span > →
4643 </ span >
4744 </ div >
0 commit comments