i have flu
This commit is contained in:
25
blog/templates/main.html
Normal file
25
blog/templates/main.html
Normal 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}}
|
||||
Reference in New Issue
Block a user