accessible.tips/themes/hugo-xmin/layouts/_default/list.html
2023-03-19 09:48:44 -04:00

33 lines
738 B
HTML

{{ partial "header.html" . }}
{{if not .IsHome }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}
{{ .Content }}
{{ if not .IsHome }}
<ul>
{{ $pages := .Pages }}
{{ $paginator := .Paginate (where $pages "Section" "!=" "") }}
{{ if (eq .Type "posts") }}
{{ range sort $paginator.Pages ".Date" "desc"}}
<li>
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ else }}
{{ range sort $paginator.Pages ".Title" }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ template "_internal/pagination.html" . }}
{{ end }}
{{ partial "footer.html" . }}