Clean up the blog list template

This commit is contained in:
Eryn Wells 2022-10-15 10:02:45 -07:00
parent 9e72b74200
commit 28a547ea92

View file

@ -4,28 +4,24 @@
{{ define "main" }}
{{ range .Pages.ByDate.GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<ul class="post-list">
<h2>{{ .Key }}</h2>
<ul class="post-list">
{{ range .Pages }}
{{ if or (not .Draft) (and .Draft (not hugo.IsProduction)) }}
<li>
<h1>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ partial "development/draft_tag.html" . }}
</h1>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "January" }}</time>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "2" }}</time>
</li>
{{ if or (not .Draft) (and .Draft (not hugo.IsProduction)) }}
<li>
<h1>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ partial "development/draft_tag.html" . }}
</h1>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "January" }}</time>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "2" }}</time>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</ul>
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "footer.html" . }}
{{ end }}
{{ define "styles" }}
<link rel="preload stylesheet" as="style" href="{{ `/styles/main.css` | absURL }}">
{{ end }}