Skip to content

Commit f5ce0ef

Browse files
Add description and date to sample cards on overview page (#23)
* Initial plan * Add description and date to sample cards on overview page Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
1 parent eef9c4d commit f5ce0ef

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/components/SampleGallery.astro

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,23 @@ const { samples } = Astro.props;
4949
</div>
5050
)}
5151
<div class="p-6 flex flex-col flex-1">
52-
<h3 class="text-lg font-semibold mb-4 group-hover:text-purple-400 transition-colors leading-snug">{sample.data.title}</h3>
52+
<h3 class="text-lg font-semibold mb-2 group-hover:text-purple-400 transition-colors leading-snug">{sample.data.title}</h3>
53+
<p class="text-sm leading-relaxed mb-4 line-clamp-2" style="color: var(--text-muted);">{sample.data.shortDescription}</p>
5354
<div class="flex items-center justify-between mt-auto pt-4 border-t" style="border-color: var(--border-primary);">
54-
<div class="flex -space-x-2">
55-
{sample.data.authors.map((author) => (
56-
<img
57-
src={author.pictureUrl}
58-
alt={author.name}
59-
title={author.name}
60-
class="w-7 h-7 rounded-full border-2 transition-transform duration-200 hover:scale-110"
61-
style="border-color: var(--bg-secondary);"
62-
loading="lazy"
63-
/>
64-
))}
55+
<div class="flex items-center gap-3">
56+
<div class="flex -space-x-2">
57+
{sample.data.authors.map((author) => (
58+
<img
59+
src={author.pictureUrl}
60+
alt={author.name}
61+
title={author.name}
62+
class="w-7 h-7 rounded-full border-2 transition-transform duration-200 hover:scale-110"
63+
style="border-color: var(--bg-secondary);"
64+
loading="lazy"
65+
/>
66+
))}
67+
</div>
68+
<span class="text-xs" style="color: var(--text-faint);">{new Date(sample.data.updateDateTime).toLocaleDateString('en-GB', { year: 'numeric', month: 'long', day: 'numeric' })}</span>
6569
</div>
6670
<span class="text-purple-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300 text-sm">&rarr;</span>
6771
</div>

0 commit comments

Comments
 (0)