Made card grids not ass
All checks were successful
Docker Deploy / build-and-push (push) Successful in 6m7s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 6m7s
This commit is contained in:
@@ -21,9 +21,25 @@ const sortedPosts = posts.sort(
|
||||
Posts
|
||||
</h1>
|
||||
<div
|
||||
class="flex flex-row flex-wrap justify-center gap-4 sm:gap-6 max-w-6xl mx-auto"
|
||||
class:list={[
|
||||
sortedPosts.length <= 2
|
||||
? "flex flex-wrap justify-center gap-4 sm:gap-6 max-w-6xl mx-auto px-4"
|
||||
: "columns-1 sm:columns-2 lg:columns-3 gap-4 sm:gap-6 max-w-6xl mx-auto px-4",
|
||||
]}
|
||||
>
|
||||
{sortedPosts.map((post) => <PostCard post={post} />)}
|
||||
{
|
||||
sortedPosts.map((post) => (
|
||||
<div
|
||||
class:list={[
|
||||
sortedPosts.length <= 2
|
||||
? "w-full sm:w-96"
|
||||
: "inline-block break-inside-avoid w-full",
|
||||
]}
|
||||
>
|
||||
<PostCard post={post} />
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user