Collapse the Articles page to a simple ordered list

This commit is contained in:
2024-08-04 23:31:13 +02:00
parent 60deef883f
commit 03364c0aa9

View File

@ -3,34 +3,7 @@
<h1 class="page-title">{{ .Title }}</h1> <h1 class="page-title">{{ .Title }}</h1>
{{ if default true .Site.Params.showTaxonomyLinks }} Heres a sitemap of informational articles and papers in reversed chronological order:
<div class="taxonomy-links">
<ul>
{{- /* code for figuring out where to archives page is, if anywhere */ -}}
{{ $archivesExists := false }}
{{ $archivesPageTitle := "" }}
{{ $archivesPagePermalink := "" }}
{{ range .Site.AllPages }}
{{ if eq .Layout "archives" }}
{{ $archivesExists = true }}
{{ $archivesPagePermalink = .Permalink }}
{{ with .Title }}
{{ $archivesPageTitle = . }}
{{ end }}
{{ end }}
{{ end }}
{{ if $archivesExists }}
<li><a href="{{ $archivesPagePermalink }}">{{ default "Archives" $archivesPageTitle }}</a></li>
{{ end }}
{{ range $taxonomyName, $taxonomy := .Site.Taxonomies }}
{{ if or (in $taxonomyName "categ") (in $taxonomyName "tag") }}
<li><a href="{{ $taxonomyName | relURL }}">{{ $taxonomyName }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
{{- if .Pages -}} {{- if .Pages -}}
{{- $pages := (where .Pages ".Draft" false) -}} {{- $pages := (where .Pages ".Draft" false) -}}
@ -42,9 +15,11 @@
{{- $pages = .Paginate $pages -}} {{- $pages = .Paginate $pages -}}
{{- end -}} {{- end -}}
<ul>
{{- range $pages.Pages -}} {{- range $pages.Pages -}}
{{ partial "blog-entry-summary.html" . }} <li><a href="{{ .Permalink }}">{{.Title}} (<time>{{ .Date.Format "2006-01-02"}}</time>)</a></li>
{{- end -}} {{- end -}}
</ul>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
{{- end -}} {{- end -}}