contrast-hugo/layouts/_default/list.html
Niklas Buschmann 80ab8e36c3 simplify
2020-11-25 20:51:00 +01:00

23 lines
616 B
HTML

{{ define "main" }}
{{ $Pages := .Pages }}
{{ if .IsHome }}
{{ $Pages = where site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ end }}
<article>
<header><h1>{{ .Title | default "Posts" | humanize }}</h1></header>
<ul>
{{- range $Pages }}
<li style="font-size: 1.1em;">
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" style="display: inline-block; min-width: 10ch; margin: 0 .2em;">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{- end }}
</ul>
{{ .Content }}
</article>
{{ end }}