Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
remove stray curly brace
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebaskervil committed May 24, 2024
1 parent 0ac7b21 commit ceecc3b
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -87,35 +87,36 @@ const posts = (await getCollection("posts")).sort(function (
</section>
</article>

<article class="flex flex-col gap-3">
<article class="flex flex-col gap-3">
<header class="flex w-full flex-row justify-between gap-2">
<h3 class="text-lg pb-2 text-text">Latest posts:</h3>
<a href="/posts" class="text-sm text-purple-500 no-underline hover:underline" rel="noreferrer">
See all posts
</a>
<h3 class="text-lg pb-2 text-text">Latest posts:</h3>
<a href="/posts" class="text-sm text-purple-500 no-underline hover:underline" rel="noreferrer">
See all posts
</a>
</header>
<section class="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
{
posts.slice(0, 4).map((post: any) => (
<div class="p-4 rounded-lg border border-neutral shadow-md hover:scale-105 transition-transform duration-300">
<h4 class="text-lg font-medium text-text">{post.data.title}</h4>
<p class="mt-2 text-text">
{post.data.publishedAt.toLocaleDateString("en-us", {
year: "numeric",
month: "short",
day: "numeric",
})}
</p>
<p class="mt-2 text-text">
{post.data.description}
<a href={"/posts/" + post.slug} class="text-purple-500 mt-4 no-underline hover:underline">
Read post
</a>
</div>
))
}
</section>
}
{
posts.slice(0, 4).map((post: any) => (
<div class="p-4 rounded-lg border border-neutral shadow-md hover:scale-105 transition-transform duration-300">
<h4 class="text-lg font-medium text-text">{post.data.title}</h4>
<p class="mt-2 text-text">
{post.data.publishedAt.toLocaleDateString("en-us", {
year: "numeric",
month: "short",
day: "numeric",
})}
</p>
<p class="mt-2 text-text">
{post.data.description}
<a href={"/posts/" + post.slug} class="text-purple-500 mt-4 no-underline hover:underline">
Read post
</a>
</p>
</div>
))
}
</section>
</article>
</article>
<article class="flex flex-col gap-3">
<header class="flex w-full flex-row justify-between gap-2">
Expand Down

0 comments on commit ceecc3b

Please sign in to comment.