update timeline

This commit is contained in:
ClovertaTheTrilobita 2026-03-29 23:35:27 +03:00
parent f1dd997c9a
commit 67a574e8d9

View file

@ -43,18 +43,25 @@ const groupedPosts = filteredPosts.reduce((acc: any[], post: any) => {
<p class="post-date">{group.month}</p>
<div class="month-posts">
{group.posts.map((post: any) => (
<a
href={`/${lang}/posts/${post.id}/`}
class="timeline-card"
data-astro-reload
>
<h2 class="post-title">{post.data.title}</h2>
<p class="post-description">
{post.data.description}
</p>
</a>
))}
{group.posts.map((post: any) => {
const [postLang, ...slugParts] = post.id.split("/");
const slug = slugParts.join("/");
return (
<a
href={`/${lang}/posts/${slug}/`}
class="timeline-card"
data-astro-reload
>
<h2 class="post-title">
{post.data.title}
</h2>
<p class="post-description">
{post.data.description}
</p>
</a>
);
})}
</div>
</div>
</li>