contrast-hugo/layouts/_default/list.html

41 lines
959 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 }}
2021-02-28 15:34:43 -05:00
{{ if .Site.Params.excerpts }}
{{- range $Pages }}
<article>
<header>
<h1>{{ .Title }}</h1>
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
</header>
{{ .Summary }}
{{- if .Truncated }}
<div class="more"><a href="{{ .RelPermalink }}">read more</a></div>
{{- end }}
</article>
{{- end }}
{{ else }}
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>
2021-02-28 15:34:43 -05:00
<ul class="archive">
2019-07-18 17:01:53 -04:00
{{- range $Pages }}
2021-02-28 15:34:43 -05:00
<li>
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .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 }}
2021-02-28 15:34:43 -05:00
{{ end }}