contrast-hugo/layouts/_default/list.html

23 lines
616 B
HTML
Raw Normal View History

2019-07-15 09:04:11 -04:00
{{ define "main" }}
2019-07-18 17:01:53 -04:00
{{ $Pages := .Pages }}
{{ if .IsHome }}
2020-02-18 11:40:33 -05:00
{{ $Pages = where site.RegularPages "Type" "in" .Site.Params.mainSections }}
2019-07-18 17:01:53 -04:00
{{ end }}
2019-07-15 09:04:11 -04:00
<article>
2019-12-21 16:27:34 -05:00
<header><h1>{{ .Title | default "Posts" | humanize }}</h1></header>
2020-11-25 14:51:00 -05:00
<ul>
2019-07-18 17:01:53 -04:00
{{- range $Pages }}
2020-11-25 14:51:00 -05:00
<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 }}
2019-07-15 09:04:11 -04:00
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{- end }}
</ul>
2019-07-18 17:49:19 -04:00
{{ .Content }}
2019-07-15 09:04:11 -04:00
</article>
2019-07-18 17:01:53 -04:00
{{ end }}