view transition draft

This commit is contained in:
2025-02-12 10:11:23 -05:00
parent 1da3d2bc34
commit 85a04c276c
18 changed files with 137 additions and 74 deletions
+7 -7
View File
@@ -15,18 +15,18 @@ export async function getStaticPaths() {
const { post } = Astro.props;
const { data } = post;
const { data, slug } = post;
const { Content } = await post.render();
---
<Layout title={data.title}>
<BlogHeader title={data.title} date={data.pubDate} />
<article>
<article transition:name={slug}>
<BlogHeader title={data.title} date={data.pubDate} />
<Content />
<a href="https://notbyai.fyi/">
<i class="not-by-ai"></i>
</a>
<Tags tags={data.tags} />
</article>
<a href="https://notbyai.fyi/">
<i class="not-by-ai"></i>
</a>
<Tags tags={data.tags} />
</Layout>
+7 -1
View File
@@ -50,7 +50,7 @@ posts.sort(
<ul>
{
posts.map(({ slug, data }) => (
<li>
<li transition:name={slug}>
<a href={`/posts/${slug}`}>{data.title}</a> -
<span>
{format(add(new Date(data.pubDate), { hours: 6 }), 'MMM do, y')}
@@ -60,3 +60,9 @@ posts.sort(
}
</ul>
</Layout>
<style>
ul {
list-style: none;
}
</style>