41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
{{ define "main" }}
|
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
|
{{ $PageContext := . }}
|
|
{{ if .IsHome }}
|
|
{{ $PageContext = .Site }}
|
|
{{ end }}
|
|
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
|
|
|
<div class="home">
|
|
{{ if $.Site.Params.showProfileSidebar }}
|
|
<div class="col col-9">
|
|
{{else}}
|
|
<div class="col col-12">
|
|
{{ end }}
|
|
{{ range .Paginator.Pages }}
|
|
<div class="col col-{{ .Params.Width }}">
|
|
<div class="block {{ .Params.Color }}">
|
|
<div class="block-body height-{{ .Params.Height }}">
|
|
<span class="post-meta white-text">{{ .Date.Format "02. January 2006" }}</span>
|
|
<h2><a class="post-link white-text" href="{{ .Permalink }}">{{ .Title }}</a> {{ if .Draft }}(Draft){{ end }}</h2>
|
|
<p class="white-text">{{ .Summary | plainify | safeHTML }} {{ if .Truncated }} … {{ end }}<a class="white-text" href="{{ .Permalink }}">read more</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="col col-12">
|
|
{{ partial "pagination.html" . }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ if $.Site.Params.showProfileSidebar }}
|
|
<div class="col col-3">
|
|
{{ partial "listSideBar.html" . }}
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ end }}
|