add blog index to admin dashboard

This commit is contained in:
ari melody 2025-11-07 01:04:10 +00:00
parent ee8bf6543e
commit 65366032fd
Signed by: ari
GPG key ID: CF99829C92678188
10 changed files with 603 additions and 91 deletions

View file

@ -0,0 +1,14 @@
{{define "blogpost"}}
<div class="blogpost">
<h3 class="title"><a href="/admin/blogs/{{.ID}}">{{.Title}}</a>{{if not .Visible}} <small>(Not published)</small>{{end}}</h3>
<p class="meta">
<span class="author"><img src="/img/favicon.png" alt="{{.Author.Username}}'s avatar" width="32" height="32"/> {{.Author.Username}}</span>
<span class="date">&bull; {{.PrintDate}}</span>
</p>
<p class="description">{{.Description}}</p>
<div class="actions">
<a href="/admin/blogs/{{.ID}}">Edit</a>
<a href="/blog/{{.ID}}">View</a>
</div>
</div>
{{end}}