feat: show source URL next to date in synthesis article cards

Date aligned left, source URL aligned right. URL stripped of protocol
and truncated to 40 chars with "..." if too long. Full URL on hover.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
master
oabrivard 2 months ago
parent 48cad8144b
commit 598211167d

@ -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())}

Loading…
Cancel
Save