mirror of
https://github.com/caty21/forex-dashboard.git
synced 2026-08-08 18:27:45 +00:00
fix: move timestamp + Analyse button inline with article title
This commit is contained in:
+19
-20
@@ -351,13 +351,25 @@ function NewsCard({ item, secondary = false }: { item: NewsItem; secondary?: boo
|
||||
)}
|
||||
</div>
|
||||
|
||||
<a href={item.url} target="_blank" rel="noopener noreferrer"
|
||||
className="group flex items-start gap-1.5 mb-1.5">
|
||||
<span className={`text-[12px] leading-snug font-medium group-hover:text-white transition-colors ${secondary ? "text-slate-400" : "text-slate-200"}`}>
|
||||
{item.title}
|
||||
</span>
|
||||
<ExternalLink size={10} className="text-slate-600 group-hover:text-slate-400 shrink-0 mt-0.5" />
|
||||
</a>
|
||||
{/* Titre + heure + Analyse sur la même ligne */}
|
||||
<div className="flex items-start gap-2 mb-1.5">
|
||||
<a href={item.url} target="_blank" rel="noopener noreferrer"
|
||||
className="group flex items-start gap-1 flex-1 min-w-0">
|
||||
<span className={`text-[12px] leading-snug font-medium group-hover:text-white transition-colors ${secondary ? "text-slate-400" : "text-slate-200"}`}>
|
||||
{item.title}
|
||||
</span>
|
||||
<ExternalLink size={10} className="text-slate-600 group-hover:text-slate-400 shrink-0 mt-0.5" />
|
||||
</a>
|
||||
<div className="flex items-center gap-1 shrink-0 mt-0.5">
|
||||
<span className="text-[9px] text-slate-600 whitespace-nowrap">{formatRelativeTime(item.publishedAt)}</span>
|
||||
{!secondary && (
|
||||
<button onClick={() => setExpanded(e => !e)}
|
||||
className="text-[9px] text-slate-500 hover:text-slate-300 px-1.5 py-0.5 rounded-full border border-slate-700/30 transition-colors whitespace-nowrap">
|
||||
{expanded ? "▲" : "▼ Analyse"}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{item.summary && !secondary && (
|
||||
<p className="text-[11px] text-slate-500 mb-1.5 leading-relaxed line-clamp-2">
|
||||
@@ -380,22 +392,9 @@ function NewsCard({ item, secondary = false }: { item: NewsItem; secondary?: boo
|
||||
<Minus size={9} />}
|
||||
</div>
|
||||
))}
|
||||
<div className="ml-auto flex items-center gap-1.5 shrink-0">
|
||||
<span className="text-[10px] text-slate-600">{formatRelativeTime(item.publishedAt)}</span>
|
||||
{!secondary && (
|
||||
<button onClick={() => setExpanded(e => !e)}
|
||||
className="text-[9px] text-slate-500 hover:text-slate-300 px-1.5 py-0.5 rounded-full border border-slate-700/30 transition-colors">
|
||||
{expanded ? "▲" : "▼ Analyse"}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!secondary && item.impacts.length === 0 && (
|
||||
<span className="text-[10px] text-slate-600">{formatRelativeTime(item.publishedAt)}</span>
|
||||
)}
|
||||
|
||||
{expanded && item.impacts.length > 0 && (
|
||||
<div className="mt-2 space-y-1.5 border-t border-slate-700/30 pt-2">
|
||||
{item.impacts.map(imp => (
|
||||
|
||||
Reference in New Issue
Block a user