diff --git a/web/src/components/index/recentPosts.astro b/web/src/components/index/recentPosts.astro new file mode 100644 index 0000000..b0f1038 --- /dev/null +++ b/web/src/components/index/recentPosts.astro @@ -0,0 +1,39 @@ +--- +import SummaryCard from "./summaryCard.astro"; +import { authPB } from "@utils/pocketbase"; +import { getFormattedDate } from "@utils/date"; + +const pb = await authPB() + +const posts = await pb.collection('posts').getList(1, 3, { + sort: '-publishDate', + filter: 'published=true', +}) + +const postImages = await Promise.all( posts.items.map(p => pb.files.getURL(p, p.headerImage)) ) + +--- + +
+ { + posts.items.map((p, i) => ( +
+ + + {p.title}/ + + +
+ + {p.title} + + +
+
+ )) + } +
+
\ No newline at end of file diff --git a/web/src/components/index/summaryCard.astro b/web/src/components/index/summaryCard.astro new file mode 100644 index 0000000..98c5666 --- /dev/null +++ b/web/src/components/index/summaryCard.astro @@ -0,0 +1,14 @@ +--- + +const { title, titleLink } = Astro.props + +--- + +
+ +

{title}

+
+
+ +
+
\ No newline at end of file diff --git a/web/src/pages/index.astro b/web/src/pages/index.astro index 383c7df..60dad96 100644 --- a/web/src/pages/index.astro +++ b/web/src/pages/index.astro @@ -1,13 +1,21 @@ --- import Base from "src/layout/Base.astro" +import RecentPosts from "@components/index/recentPosts" + +export const prerender = false + --- -
- sidebar stuff +
+

New website new me!


+

Check out some of the photos and posts I've added recently, as well as the new design.


+ + +

If you're interested, I actually wrote a post about the new design and all that went into it.

-
- ya +
+