@ -59,9 +59,25 @@ const NewsItemCard: Component<{ item: NewsItemType; displayLevel: number }> = (p
< ExternalLink class = "h-4 w-4 text-gray-400 flex-shrink-0" / >
< / a >
< / h3 >
< Show when = { props . item . date } >
< p class = "text-xs text-gray-400 mb-1" > { props . item . date } < / p >
< / Show >
< div class = "flex items-center justify-between mb-1" >
< Show when = { props . item . date } >
< span class = "text-xs text-gray-400" > { props . item . date } < / span >
< / Show >
< Show when = { ! props . item . date } >
< span / >
< / Show >
< a
href = { props . item . url }
target = "_blank"
rel = "noopener noreferrer"
class = "text-xs text-gray-400 hover:text-indigo-600 truncate max-w-[250px]"
title = { props . item . url }
>
{ props . item . url . replace ( /^https?:\/\// , '' ) . length > 40
? props . item . url . replace ( /^https?:\/\// , '' ) . slice ( 0 , 37 ) + '...'
: props . item . url . replace ( /^https?:\/\// , '' ) }
< / a >
< / div >
< Show when = { effectiveLevel ( ) > 1 && props . item . summary } >
< p class = "text-gray-700 leading-relaxed text-sm" >
{ truncateSummary ( props . item . summary , effectiveLevel ( ) ) }