2019-01-28 00:11:02 +00:00
|
|
|
{{ define "main" }}
|
2019-03-31 17:18:08 +00:00
|
|
|
<div class="posts">
|
|
|
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
|
|
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
|
|
|
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
2019-01-28 00:11:02 +00:00
|
|
|
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ range $paginator.Pages }}
|
|
|
|
<div class="post on-list">
|
|
|
|
<h1 class="post-title">
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
|
|
|
<div class="post-meta">
|
|
|
|
<span class="post-date">
|
|
|
|
{{ .Date.Format "2006-01-02" }}
|
|
|
|
</span>
|
|
|
|
{{ with .Params.Author }}<span class="post-author">::
|
|
|
|
{{ . }}</span>{{ end }}
|
|
|
|
</div>
|
2019-01-28 00:11:02 +00:00
|
|
|
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ if .Params.tags }}
|
2019-03-31 17:28:38 +00:00
|
|
|
<span class="post-tags">
|
|
|
|
{{ range .Params.tags }}
|
2019-04-05 06:18:21 +00:00
|
|
|
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
2019-03-31 17:28:38 +00:00
|
|
|
{{- . -}}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ end }}
|
2019-01-28 00:11:02 +00:00
|
|
|
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ with .Params.Cover }}
|
2019-03-31 17:28:38 +00:00
|
|
|
<img src="{{ . | absURL }}" class="post-cover" />
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ end }}
|
2019-01-28 00:11:02 +00:00
|
|
|
|
2019-03-31 17:18:08 +00:00
|
|
|
<div class="post-content">
|
|
|
|
{{ if .Params.showFullContent }}
|
2019-03-31 17:28:38 +00:00
|
|
|
{{ .Content | markdownify }}
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ else if .Description }}
|
2019-03-31 17:28:38 +00:00
|
|
|
{{ .Description | markdownify }}
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ else }}
|
2019-03-31 17:28:38 +00:00
|
|
|
{{ if .Truncated }}
|
|
|
|
{{ .Summary | markdownify }}
|
|
|
|
{{ end }}
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ end }}
|
2019-01-28 00:11:02 +00:00
|
|
|
</div>
|
2019-03-31 17:18:08 +00:00
|
|
|
|
|
|
|
{{ if not .Params.showFullContent }}
|
2019-03-31 17:28:38 +00:00
|
|
|
<div>
|
|
|
|
<a class="read-more button"
|
|
|
|
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
|
|
|
</div>
|
2019-01-28 00:11:02 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2019-03-31 17:18:08 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ partial "pagination.html" . }}
|
|
|
|
</div>
|
2019-01-28 00:11:02 +00:00
|
|
|
{{ end }}
|