mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
cbdaa59bae
Integrate ViewTransitions API from Astro v3. resolve #96
23 lines
528 B
Plaintext
23 lines
528 B
Plaintext
---
|
|
import Datetime from "@components/Datetime";
|
|
import type { BlogFrontmatter } from "@content/_schemas";
|
|
|
|
export interface Props {
|
|
href?: string;
|
|
frontmatter: BlogFrontmatter;
|
|
secHeading?: boolean;
|
|
}
|
|
|
|
const { href, frontmatter, secHeading = true } = Astro.props;
|
|
|
|
const { title, pubDatetime, description } = frontmatter;
|
|
---
|
|
|
|
<li class="list-card">
|
|
<a href={href} transition:name={title}>
|
|
{secHeading ? <h2>{title}</h2> : <h3>{title}</h3>}
|
|
</a>
|
|
<Datetime datetime={pubDatetime} />
|
|
<p>{description}</p>
|
|
</li>
|