pi-www-theme-soho/layouts/index.html

37 lines
1.1 KiB
HTML

{{ define "main" -}}
<div class="posts">
{{- $regularPages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
{{- $pagesNotHidden := where $regularPages ".Params.hidden" "==" false -}}
{{- $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil -}}
{{- $pages := $pagesNotHidden | union $pagesHiddenUnset -}}
{{- $paginator := .Paginate $pages -}}
{{ range $paginator.Pages }}
<article class="post">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
<div class="post-date">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
</div>
{{ if .Description }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
{{ if .Truncated }}
<div class="read-more-link">
<a href="{{ .RelPermalink }}">Read More</a>
</div>
{{ end }}
</article>
{{- end }}
</div>
{{ template "_internal/pagination.html" . }}
{{- end }}