Add last updated section to now page

This commit is contained in:
2025-11-18 19:21:48 +13:00
parent 64ecc338be
commit 1da77d6074

View File

@@ -1,13 +1,16 @@
---
import Base from "@layout/Base";
import { authPB } from "@utils/pocketbase";
import { getFormattedDate } from '@utils/date'
export const prerender = false
const pb = await authPB()
const records = await pb.collection('now').getFullList({
sort: '-created'
sort: '-updated'
})
const lastUpdated = getFormattedDate(records[0].updated)
---
<Base>
@@ -19,7 +22,8 @@ const records = await pb.collection('now').getFullList({
<p>I'll update this every now and then; the gist is "this is what you would tell someone that you haven't seem in a year, what you've been up to". Love that concept!</p>
</div>
<div slot="content" class="md:py-12">
<div slot="content" class="">
<p class="mb-1 md:mt-2 italic ">Last Updated: {lastUpdated}</p>
{
records.map(r => (
<>