add updates and fix shippy
This commit is contained in:
parent
c8cce26569
commit
3c3d596c9c
@ -4,6 +4,7 @@ export default {
|
||||
username: "haetae",
|
||||
remoteProjectPath: "/var/www/fujohost/haetae/",
|
||||
remoteDbPath: "/var/www/fujohost/haetae/guestbook.db",
|
||||
dbDriver: "astro:db"
|
||||
dbDriver: "astro:db",
|
||||
privateKeyPath: "/home/ayowaddup/.ssh/shippy.id_ed25519"
|
||||
}
|
||||
};
|
@ -1,9 +1,11 @@
|
||||
---
|
||||
import { db, desc, Guestbook } from "astro:db";
|
||||
import { desc } from "drizzle-orm";
|
||||
import { db } from "db";
|
||||
import { guestbookTable } from "db/schema";
|
||||
import formatDate from "@/utils/formatDate";
|
||||
import pikachu from "$/images/portrait-0025.png";
|
||||
|
||||
const entries = await db.select().from(Guestbook).orderBy(desc(Guestbook.published));
|
||||
const entries = await db.select().from(guestbookTable).orderBy(desc(guestbookTable.published));
|
||||
---
|
||||
<section id="entries">
|
||||
{entries.map(entry => (
|
||||
@ -16,7 +18,7 @@ const entries = await db.select().from(Guestbook).orderBy(desc(Guestbook.publish
|
||||
? <a href={entry.website} target="_blank" referrerpolicy="no-referrer">{entry.username}</a>
|
||||
: <span>{entry.username}</span>}
|
||||
</h1>
|
||||
<time datetime={entry.published.toISOString()}>
|
||||
<time datetime={entry.published}>
|
||||
{formatDate(entry.published, false, 'MMMM D, YYYY')}
|
||||
</time>
|
||||
</header>
|
||||
@ -32,7 +34,7 @@ const entries = await db.select().from(Guestbook).orderBy(desc(Guestbook.publish
|
||||
<div class="entry">
|
||||
<header>
|
||||
<h1>Reply to {entry.username}</h1>
|
||||
<time datetime={entry.updated?.toISOString()}>
|
||||
<time datetime={entry.updated}>
|
||||
{formatDate(entry.updated!, false, 'MMMM D, YYYY')}
|
||||
</time>
|
||||
</header>
|
||||
|
@ -1,5 +1,8 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import UpdateCard from "./UpdateCard.astro";
|
||||
|
||||
const updates = await getCollection("updates");
|
||||
---
|
||||
<section id="updates">
|
||||
<header>
|
||||
@ -17,6 +20,7 @@ import UpdateCard from "./UpdateCard.astro";
|
||||
</h2>
|
||||
|
||||
<UpdateCard title="redo gallery and guestbook" date="2024-05-10">
|
||||
{updates.length}
|
||||
<p>redid <a href="/gallery">gallery page</a> to make adding images easier and added alpinejs to <a href="/guestbook">guestbook</a> for fetching entries live</p>
|
||||
</UpdateCard>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user