add rate limiting, CSRF, newsletter, auto-checker, /uses and /projects pages

This commit is contained in:
Blake Ridgway
2026-03-11 14:12:52 -05:00
parent 261745a5b7
commit 58831e2429
17 changed files with 913 additions and 19 deletions

View File

@@ -0,0 +1,45 @@
{{define "title"}}Newsletter — Admin{{end}}
{{define "content"}}
<div class="admin-wrap">
<div class="admin-header">
<h1>Newsletter Subscribers</h1>
<div class="admin-actions">
<a href="/admin" class="btn btn-outline">Back to Dashboard</a>
</div>
</div>
{{if .Flash}}<p class="flash-msg">{{.Flash}}</p>{{end}}
<p class="text-muted">{{.Count}} subscriber{{if ne .Count 1}}s{{end}}</p>
{{if not .Subscribers}}
<p class="empty-state">No subscribers yet.</p>
{{else}}
<table class="admin-table">
<thead>
<tr>
<th>Email</th>
<th>Subscribed</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{range .Subscribers}}
<tr>
<td>{{.Email}}</td>
<td class="text-muted mono">{{formatDate .CreatedAt}}</td>
<td class="actions-cell">
<form method="POST" action="/admin/newsletter" class="inline-form"
onsubmit="return confirm('Remove {{.Email}}?')">
<input type="hidden" name="email" value="{{.Email}}">
<button type="submit" class="btn btn-sm btn-danger">Remove</button>
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
</div>
{{end}}