Clean up the terms template a bit

This commit is contained in:
Eryn Wells 2024-01-08 13:16:53 -08:00
parent 8b7e70dc81
commit ee9382b7a9

View file

@ -6,35 +6,18 @@
<header class="page">
<h1>{{ .Title }}</h1>
</header>
<article>
{{ .Content }}
{{- range .Data.Terms.Alphabetical -}}
<h2>{{ .Name | title }}</h2>
{{ .Content }}
{{- range .WeightedPages -}}
<article class="post">
<header>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "Jan 2, 2006" }}</time>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
{{- range .Data.Terms.Alphabetical -}}
<h2>{{ .Name | title }}</h2>
{{ if .Description }}
<p>{{ .Description }}</p>
{{ else if lt .WordCount 110 }}
{{ .Content }}
{{ else }}
{{ warnf "Post \"%s\" doesn't have a description or content suitable for the blog list" .Title }}
<p>{{ .WordCount }} words</p>
{{ end }}
{{ partial "footer_tags.html" . }}
{{ partial "development/draft_tag.html" . }}
</article>
{{- end -}}
{{- range .WeightedPages -}}
{{ if or (not .Draft) (not hugo.IsProduction) }}
{{ .Render "li_grid_with_date" }}
{{ end }}
{{- end -}}
</article>
{{- end -}}
{{ end }}
{{ define "footer" }}