Skip to content

Commit 78e7a91

Browse files
chore(website): use large stacked blog cards in single-column list
1 parent 364baaf commit 78e7a91

1 file changed

Lines changed: 29 additions & 25 deletions

File tree

website/src/pages/blog/index.astro

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -116,37 +116,41 @@ for (const entry of changelogPosts) {
116116
</aside>
117117

118118
<!-- Blog posts -->
119-
<div class="order-first flex flex-col gap-6 lg:order-none">
119+
<div class="order-first grid grid-cols-1 gap-6 lg:order-none">
120120
{blogPosts.map((article) => (
121-
<a href={`/blog/${article.slug}/`} class="block">
122-
<article class="flex flex-col gap-4 rounded-md border border-white/10 p-4 transition-colors hover:border-white/20 sm:flex-row sm:gap-5">
123-
{article.image && (
124-
<div class="w-full sm:w-64 sm:shrink-0">
125-
<img
126-
src={article.image.src}
127-
alt={article.title}
128-
width={600}
129-
height={300}
130-
class="aspect-[2/1] w-full rounded-md border border-white/10 object-cover"
131-
loading="lazy"
132-
decoding="async"
133-
/>
134-
</div>
135-
)}
136-
<div class="flex min-w-0 flex-1 flex-col">
137-
<div class="flex items-center gap-x-3 text-xs">
121+
<a href={`/blog/${article.slug}/`} class="size-full">
122+
<article class="flex size-full flex-col items-start justify-between rounded-md border border-white/10 p-4 transition-colors hover:border-white/20">
123+
<div class="w-full">
124+
{article.image && (
125+
<div class="relative w-full">
126+
<img
127+
src={article.image.src}
128+
alt={article.title}
129+
width={1200}
130+
height={600}
131+
class="aspect-[2/1] w-full rounded-md border border-white/10 object-cover"
132+
loading="lazy"
133+
decoding="async"
134+
/>
135+
</div>
136+
)}
137+
<div class="mt-4 flex items-center gap-x-3 text-xs">
138138
<time datetime={article.data.published.toISOString()} class="text-zinc-500">
139139
{formatTimestamp(article.data.published)}
140140
</time>
141141
<span class="rounded-full border border-white/10 px-2 py-0.5 text-xs text-zinc-400">{article.category.name}</span>
142142
</div>
143-
<h3 class="mt-2 text-base font-normal leading-6 text-white">
144-
{article.title}
145-
</h3>
146-
<p class="mt-2 line-clamp-2 text-sm leading-relaxed text-zinc-500">
147-
{article.description}
148-
</p>
149-
<div class="mt-auto flex items-center gap-x-3 pt-4">
143+
<div class="group relative">
144+
<h3 class="mt-2 text-xl font-normal leading-7 text-white">
145+
{article.title}
146+
</h3>
147+
<p class="mt-2 line-clamp-2 text-sm leading-relaxed text-zinc-500">
148+
{article.description}
149+
</p>
150+
</div>
151+
</div>
152+
<div class="max-w-xl">
153+
<div class="relative mt-4 flex items-center gap-x-3">
150154
<AuthorAvatar name={article.author.name} avatarSrc={article.author.avatar.src} client:load />
151155
<div class="text-sm text-zinc-400">
152156
{article.author.name}

0 commit comments

Comments
 (0)