@@ -9,6 +9,7 @@ import { Slot } from "@radix-ui/react-slot";
99import { cva } from "class-variance-authority" ;
1010import { cn } from "@/lib/utils" ;
1111
12+
1213// Data
1314import { useTranslation } from "react-i18next" ;
1415import { researchlines } from "@/constants/researchlines" ;
@@ -104,49 +105,49 @@ const Card = React.forwardRef(
104105 < CardHeader className = "flex flex-wrap" >
105106 { Array . isArray ( researchLine )
106107 ? researchLine . map ( ( researchline , index ) => {
107- let backgroundColorResearchLine ;
108- let textColorResearchLine ;
108+ let researchLineColorStyles ;
109109 let backgroundIcon ;
110+ let iconSpacing ;
110111 // coge solo la primera researchline para ponerle el fondo
111112 switch ( deleteSpaces ( researchline ) ) {
112113 case "data" :
113- backgroundColorResearchLine = "bg-data-500/40" ; // Para la categoría ' data'
114+ researchLineColorStyles = "bg-data-500/40 text- data-300" ;
114115 backgroundIcon = "assets/img/icons/data_icon.svg" ;
115- textColorResearchLine = "text-data-300" ;
116+ iconSpacing = "mb-[2px]"
116117 break ;
117118 case "videoconference" :
118- backgroundColorResearchLine = "bg-videoconference-600/60" ; // Para la categoría 'videoconference'
119+ researchLineColorStyles = "bg-videoconference-600/60 text-videoconference-200 " ;
119120 backgroundIcon =
120121 "assets/img/icons/videoconference_icon.svg" ;
121- textColorResearchLine = "text-videoconference-200" ;
122122 break ;
123123 case "ai" :
124- backgroundColorResearchLine = "bg-ai-700/40" ; // Para la categoría 'ai'
124+ researchLineColorStyles = "bg-ai-700/40 text-ai-400" ;
125125 backgroundIcon = "assets/img/icons/ai_icon.svg" ;
126- textColorResearchLine = "text-ai-400" ;
126+ iconSpacing = "mb-.5"
127127 break ;
128128 case "computing" :
129- backgroundColorResearchLine = "bg-networks-600/60" ;
129+ researchLineColorStyles = "bg-networks-600/60 text-networks-200 " ;
130130 backgroundIcon = "assets/img/icons/networks_icon.svg" ;
131- textColorResearchLine = "text-networks-200" ; // Para la categoría 'ai'
131+ iconSpacing = "mb-.5"
132132 break ;
133133 case "e-learning" :
134- backgroundColorResearchLine = "bg-eLearning-600/60" ;
134+ researchLineColorStyles = "bg-eLearning-600/60 text-eLearning-200 " ;
135135 backgroundIcon = "assets/img/icons/e-learning_icon.svg" ;
136- textColorResearchLine = "text-eLearning-200" ; // Para la categoría 'ai'
136+ iconSpacing = "mb-1"
137137 break ;
138138 default :
139- backgroundColorResearchLine = "bg-gray-500" ; // Valor por defecto si no hay coincidencia
139+ researchLineColorStyles = "bg-gray-500" ; // Valor por defecto si no hay coincidencia
140+ iconSpacing = "mb-1"
140141 break ;
141142 }
142143
143144 return (
144145 < Mybadge
145146 key = { index }
146- className = { `pt-1.5 ${ backgroundColorResearchLine } text-white ${ textColorResearchLine } border-none tracking-widest` }
147+ className = { `pt-1.5 ${ researchLineColorStyles } text-white border-none tracking-widest` }
147148 >
148149 < Image
149- className = { "h-[16px] pr-2 mb-[2px]" }
150+ className = { ` pr-2 mb- ${ iconSpacing } ` }
150151 src = { backgroundIcon }
151152 alt = { "Research line icon" }
152153 fit = "contain"
@@ -163,15 +164,15 @@ const Card = React.forwardRef(
163164 </ CardHeader >
164165 < CardBody >
165166 < CardContent className = "gap-1" >
166- < CardTitle level = "h5" className = "text-pretty xl:pr-4 " > { title } </ CardTitle >
167+ < CardTitle level = "h5" className = "text-pretty" > { title } </ CardTitle >
167168 < div className = "flex" >
168- < Text type = "small" className = "font-bold" >
169+ < Text type = "small" className = "font-bold text-sm " >
169170 { t ( `research.filter.${ category } ` ) }
170171 </ Text >
171172 < span className = "mx-2 mb-2" > ·</ span >
172173 < Text type = "small" > { date && date [ 0 ] } </ Text >
173174 </ div >
174- < Text className = "text-gray-300/90 mb-4 lg:pr-16" type = "p " >
175+ < Text className = "text-gray-300/90 mb-4 lg:pr-16" type = "small " >
175176 { author }
176177 </ Text >
177178 < div className = "flex flex-wrap gap-1.5" >
@@ -180,11 +181,10 @@ const Card = React.forwardRef(
180181 return (
181182 < Mybadge
182183 key = { index }
183- size = "xs "
184- className = "bg-[#000000] border-none text-gray-300"
184+ size = "sm "
185+ className = "bg-[#000000] border-none text-gray-300 capitalize "
185186 >
186- { " " }
187- { keyword } { " " }
187+ { keyword }
188188 </ Mybadge >
189189 ) ;
190190 } )
0 commit comments