mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
---
|
|
import type { CollectionEntry } from "astro:content";
|
|
import { getPostUrlBySlug } from "@utils/url-utils";
|
|
import PostCard from "./PostCard.astro";
|
|
|
|
const { page } = Astro.props;
|
|
|
|
let delay = 0;
|
|
const interval = 50;
|
|
---
|
|
<div class="transition flex flex-col rounded-[var(--radius-large)] bg-[var(--card-bg)] py-1 md:py-0 md:bg-transparent md:gap-4 mb-4">
|
|
{page.data.map((entry: CollectionEntry<"posts">) => (
|
|
<PostCard
|
|
entry={entry}
|
|
title={entry.data.title}
|
|
tags={entry.data.tags}
|
|
category={entry.data.category}
|
|
published={entry.data.published}
|
|
updated={entry.data.updated}
|
|
url={getPostUrlBySlug(entry.id)}
|
|
image={entry.data.image}
|
|
description={entry.data.description}
|
|
draft={entry.data.draft}
|
|
class:list="onload-animation"
|
|
style={`animation-delay: calc(var(--content-delay) + ${delay++ * interval}ms);`}
|
|
></PostCard>
|
|
))}
|
|
</div> |