Started working on pages

This commit is contained in:
Leon Mika 2025-02-16 11:43:22 +11:00
parent e2f159e980
commit ba12398d2f
30 changed files with 1391 additions and 145 deletions

13
templates/pages/edit.html Normal file
View file

@ -0,0 +1,13 @@
{{- $postTarget := printf "/sites/%v/pages" .site.ID -}}
{{- if (ne .page.ID 0) -}}
{{- $postTarget = printf "/sites/%v/pages/%v" .site.ID .page.ID -}}
{{- end -}}
<form method="post" action="{{$postTarget}}" class="post-form">
<input name="title" placeholder="Title" value="{{.page.Title}}">
<textarea name="body">{{.page.Body}}</textarea>
<div class="bottom-bar">
<input type="submit" value="Post">
</div>
</form>