before push commit
This commit is contained in:
parent
bd920f1731
commit
5217bba8f9
15 changed files with 125 additions and 59 deletions
|
@ -8,5 +8,6 @@ import BlogPostList from "~/components/lists/BlogPostList.astro";
|
|||
description="A list of all my blog posts."
|
||||
icon="fa-solid fa-blog"
|
||||
>
|
||||
|
||||
<BlogPostList collection="blog" />
|
||||
</Page>
|
||||
|
|
|
@ -8,7 +8,6 @@ import NoteList from "~/components/lists/NoteList.astro";
|
|||
import StyledLink from "~/components/util/StyledLink.astro";
|
||||
import { Content as Bio } from "~/content/bio.md";
|
||||
import Prose from "~/components/ui/Prose.astro";
|
||||
import { getClacks } from "~/lib/fun";
|
||||
---
|
||||
|
||||
<Layout>
|
||||
|
@ -21,13 +20,11 @@ import { getClacks } from "~/lib/fun";
|
|||
Hi! I'm Ivy, welcome to my website!
|
||||
</h1>
|
||||
|
||||
{getClacks()}
|
||||
|
||||
<Prose>
|
||||
<Bio />
|
||||
</Prose>
|
||||
|
||||
<div class="md:flex md:flex-column gap-2">
|
||||
<div class="md:flex md:flex-column gap-6">
|
||||
<Box title="latest blog posts" icon="fa-solid fa-blog">
|
||||
<CollectionList collection="blog" limit={5} />
|
||||
<hr class="h-px my-8 bg-light-pu dark:bg-dark-pu" />
|
||||
|
@ -40,5 +37,6 @@ import { getClacks } from "~/lib/fun";
|
|||
</Box>
|
||||
</div>
|
||||
</main>
|
||||
<Footer />
|
||||
</Layout>
|
||||
<Footer />
|
||||
|
||||
|
|
|
@ -1,15 +1,36 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import Page from "~/layouts/Page.astro";
|
||||
import { Content } from "~/content/now.md";
|
||||
import Prose from "~/components/ui/Prose.astro"
|
||||
// import { Content } from "~/content/now.md";
|
||||
import Prose from "~/components/ui/Prose.astro";
|
||||
|
||||
async function getLatestNowPost() {
|
||||
const allPosts = await getCollection("blog");
|
||||
const nowPosts = allPosts.filter(
|
||||
(post: { data: { tags?: string[] } }) =>
|
||||
post.data.tags && post.data.tags.includes("now")
|
||||
);
|
||||
return nowPosts[0]; // Return only the first post
|
||||
}
|
||||
|
||||
const latestPost = await getLatestNowPost(); // Fetch the first post at build time
|
||||
---
|
||||
|
||||
<Page title="/now" icon="fa-solid fa-calendar-days" date="2025-03-17">
|
||||
<Prose>
|
||||
<Content />
|
||||
</Prose>
|
||||
<p class="text-light-tx-2 dark:text-dark-tx-2 mt-2">
|
||||
This is a <a href="https://sive.rs/nowff">/now page</a> and
|
||||
This is a <a href="https://sive.rs/nowff">/now page</a> and
|
||||
<a href="https://nownownow.com/about">you should make one</a>, too.
|
||||
</p>
|
||||
<Prose>
|
||||
{
|
||||
latestPost ? (
|
||||
<div>
|
||||
<h2>{latestPost.data.title}</h2>
|
||||
<p>{latestPost.data.description}</p>
|
||||
</div>
|
||||
) : (
|
||||
<p>nae now</p>
|
||||
)
|
||||
}
|
||||
</Prose>
|
||||
</Page>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue