feat: add basic blog features

This commit is contained in:
2026-03-09 22:17:39 +01:00
commit c16657f996
29 changed files with 3095 additions and 0 deletions

8
views/conclave.pug Normal file
View File

@@ -0,0 +1,8 @@
extends layout
block content
h1 Conclave
form(method="POST" action="/conclave/new")
input(type="text" name="title" placeholder="Title")
textarea(name="content")
button(type="submit") Publish

6
views/error.pug Normal file
View File

@@ -0,0 +1,6 @@
extends layout
block content
h1= message
h2= error.status
pre #{error.stack}

9
views/index.pug Normal file
View File

@@ -0,0 +1,9 @@
extends layout
block content
section
ul
each post in posts
li
a(href=`/posts/${post.id}`)
h2= post.title

16
views/layout.pug Normal file
View File

@@ -0,0 +1,16 @@
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
block head
body
header
h1
a(href="/") Pathtoglory.quest
p I'm on a quest to learn and understand things.
block content
footer
p Pathtoglory.quest No copyright. Copy and paste me.

6
views/post.pug Normal file
View File

@@ -0,0 +1,6 @@
extends layout
block content
article
h1= post.title
div!= html

12
views/users/login.pug Normal file
View File

@@ -0,0 +1,12 @@
extends ../layout
block head
script(defer src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js")
script(defer src="/javascripts/user-login.js")
block content
h2 Login
form
label(for="username") Username
input(type="text" name="username" autocomplete="webauth" placeholder="Username")
input(type="submit" value="Login with passkey")

13
views/users/register.pug Normal file
View File

@@ -0,0 +1,13 @@
extends ../layout
block head
script(defer src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js")
script(defer src="/javascripts/users.js")
block content
h2 Register new user
form
label(for="username") Username
input(type="text" name="username" autocomplete="username webauth" placeholder="Username")
button(id="register") Register