Overhaul the blog list template

This commit is contained in:
Eryn Wells 2022-10-14 15:02:18 -07:00
parent d37069cb4b
commit 172a35e27f
2 changed files with 11 additions and 16 deletions

View file

@ -3,23 +3,18 @@
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
{{ range .Pages.ByDate.GroupByDate "2006" }} <section id="by-date">
<h2>{{ .Key }}</h2> {{- range .Pages.ByDate.GroupByDate "2006" -}}
<h6>{{ .Key | title }}</h6>
<ul class="post-list"> <ul class="post-list">
{{ range .Pages }} {{- range .Pages -}}
{{ if or (not .Draft) (and .Draft (not hugo.IsProduction)) }} {{- if or (not .Draft) (not hugo.IsProduction) -}}
<li> {{- .Render "li_grid_with_date" -}}
<h1> {{- end -}}
<a href="{{ .Permalink }}">{{ .Title }}</a> {{- end -}}
{{ 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 }}
</ul> </ul>
{{ end }} {{- end -}}
</section>
{{ end }} {{ end }}
{{ define "footer" }} {{ define "footer" }}

View file

@ -454,7 +454,7 @@ ol ol {
text-align: end; text-align: end;
} }
.post-list li h1 { .post-list li .title {
font-family: var(--font-family-body); font-family: var(--font-family-body);
grid-area: title; grid-area: title;
text-align: start; text-align: start;