Add now page!
This commit is contained in:
33
web/src/pages/now.astro
Normal file
33
web/src/pages/now.astro
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
import Base from "@layout/Base";
|
||||||
|
import { authPB } from "@utils/pocketbase";
|
||||||
|
export const prerender = false
|
||||||
|
|
||||||
|
const pb = await authPB()
|
||||||
|
|
||||||
|
const records = await pb.collection('now').getFullList({
|
||||||
|
sort: '-created'
|
||||||
|
})
|
||||||
|
---
|
||||||
|
|
||||||
|
<Base>
|
||||||
|
|
||||||
|
<div slot="sidebar" class="text-left">
|
||||||
|
<h2>The Now!</h2>
|
||||||
|
<p>Trying out a <a href="https://nownownow.com/about">Now Page</a>, inspired by some other personal sites such as <a href="https://lai.nz">this great one.</a></p><br>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
{
|
||||||
|
records.map(r => (
|
||||||
|
<>
|
||||||
|
<h3>{r.heading}</h3>
|
||||||
|
<Fragment set:html={r.content}/>
|
||||||
|
</>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Base>
|
||||||
Reference in New Issue
Block a user