additional formatting of archives partial

This commit is contained in:
John Bowdre 2024-01-18 22:08:45 -06:00
parent ce322837e9
commit 422d73e16c

View file

@ -6,8 +6,9 @@
{{ if .IsHome }}
<h1>{{ site.Params.indexTitle | markdownify }}</h1>
{{ else }}
<h1>{{ .Title | markdownify }}{{ if eq .Kind "term" }}&nbsp;<a target="_blank" href="feed.xml" aria-label="Category RSS"><i class="fa-solid fa-square-rss"></i></a>&nbsp;</h1>{{ end }}
{{ end }}
<h1>{{ .Title | markdownify }}{{ if eq .Kind "term" }}&nbsp;<a target="_blank" href="feed.xml" aria-label="Category RSS"><i class="fa-solid fa-square-rss"></i></a>&nbsp;</h1>
{{ with .Description }}<i>{{ . }}</i><hr>{{ else }}<br>{{ end }}
{{ end }}{{ end }}
{{ .Content }}
</header>
@ -24,8 +25,21 @@
{{- end }}
</div>
{{- else }}
{{- range .Pages }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a><br>
{{- range .Pages.ByDate.Reverse }}
{{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
<article class="post">
<header class="post__header">
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<p class="post__meta">
<span class="date">["{{- $postDate }}"{{- if ne $postDate $updateDate }}, "{{ $updateDate }}"{{ end }}]</span>
</p>
</header>
<section class="post__summary">
{{ .Description }}
</section>
<hr>
</article>
{{ end }}
{{- end }}
{{- else }}
@ -39,11 +53,10 @@
<span class="date">["{{- $postDate }}"{{- if ne $postDate $updateDate }}, "{{ $updateDate }}"{{ end }}]</span>
</p>
</header>
<section class="post__summary">
{{ .Summary }}
</section>
<br>
<hr>
</article>
{{- end }}
{{- template "_internal/pagination.html" . }}