i have flu

This commit is contained in:
2026-06-28 09:50:02 +03:00
parent 14e8a23dbb
commit 35191db4fb
6 changed files with 348 additions and 220 deletions

25
blog/templates/main.html Normal file
View File

@@ -0,0 +1,25 @@
{{define "main-content"}}
{{if .Post.HTML}}
<article class="article">
<h1>{{.Post.Title}}</h1>
<time class="post-date">{{.Post.Date.Format "January 2, 2006"}}</time>
{{.Post.HTML | safehtml}}
</article>
{{else if .PostList}}
<h1>Field Notes</h1>
{{if .Posts}}
<ul class="post-list">
{{range .Posts}}
<li>
<a href="/blog/posts/{{.Slug}}" hx-get="/blog/posts/{{.Slug}}" hx-target="main" hx-push-url="true">{{.Title}}</a>
<span class="post-date-inline">{{.Date.Format "Jan 2, 2006"}}</span>
</li>
{{end}}
</ul>
{{else}}
<p style="color: var(--text-dim);">No posts yet.</p>
{{end}}
{{else}}
{{template "landing-content" .}}
{{end}}
{{end}}