@@ -13,10 +13,16 @@ interface InitiativeCardProps {
1313}
1414
1515export default function InitiativeCard ( { initiative } : InitiativeCardProps ) {
16+ const isChiusa = initiative . idDecStatoIniziativa ?. nome ?. includes ( 'CHIUSA' ) ;
17+
1618 return (
1719 < a
1820 href = { createPath ( `/initiative/${ initiative . id } /` ) }
19- className = "card-shadow bg-white rounded-lg p-6 hover:scale-[1.02] transition-all duration-200 cursor-pointer border border-gray-200 block no-underline"
21+ className = { `card-shadow rounded-lg p-6 hover:scale-[1.02] transition-all duration-200 cursor-pointer border block no-underline ${
22+ isChiusa
23+ ? 'bg-gray-50 border-gray-300 opacity-75'
24+ : 'bg-white border-gray-200'
25+ } `}
2026 >
2127 { /* Header con categoria e stato */ }
2228 < div className = "flex flex-wrap gap-2 mb-4" >
@@ -27,6 +33,8 @@ export default function InitiativeCard({ initiative }: InitiativeCardProps) {
2733 < span className = { `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${
2834 initiative . idDecStatoIniziativa ?. nome ?. includes ( 'RACCOLTA' )
2935 ? 'bg-green-100 text-green-800'
36+ : isChiusa
37+ ? 'bg-gray-200 text-gray-600'
3038 : 'bg-gray-100 text-gray-800'
3139 } `} >
3240 < ClockIcon className = "w-3 h-3 mr-1" />
@@ -35,13 +43,17 @@ export default function InitiativeCard({ initiative }: InitiativeCardProps) {
3543 </ div >
3644
3745 { /* Titolo */ }
38- < h3 className = "text-lg font-semibold text-gray-900 mb-3 line-clamp-2" title = { initiative . titolo } >
46+ < h3 className = { `text-lg font-semibold mb-3 line-clamp-2 ${
47+ isChiusa ? 'text-gray-500' : 'text-gray-900'
48+ } `} title = { initiative . titolo } >
3949 { initiative . titolo }
4050 </ h3 >
4151
4252 { /* Descrizione breve */ }
4353 { initiative . descrizioneBreve && (
44- < p className = "text-gray-600 text-sm mb-4 line-clamp-3" >
54+ < p className = { `text-sm mb-4 line-clamp-3 ${
55+ isChiusa ? 'text-gray-500' : 'text-gray-600'
56+ } `} >
4557 { initiative . descrizioneBreve }
4658 </ p >
4759 ) }
@@ -63,7 +75,11 @@ export default function InitiativeCard({ initiative }: InitiativeCardProps) {
6375
6476 { /* Footer */ }
6577 < div className = "mt-4 pt-4 border-t border-gray-100" >
66- < span className = "text-blue-600 text-sm font-medium hover:text-blue-700" >
78+ < span className = { `text-sm font-medium ${
79+ isChiusa
80+ ? 'text-gray-500 hover:text-gray-600'
81+ : 'text-blue-600 hover:text-blue-700'
82+ } `} >
6783 Visualizza dettagli →
6884 </ span >
6985 </ div >
0 commit comments