2022-08-18 14:17:23 +02:00
|
|
|
{{ define "main" }}
|
|
|
|
{{ .Content -}}
|
|
|
|
<div class="posts">
|
2022-08-18 14:52:42 +02:00
|
|
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "rambles") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
|
|
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "rambles" }}
|
2022-08-18 14:17:23 +02:00
|
|
|
|
|
|
|
{{ $PageContext := . }}
|
|
|
|
{{ if .IsHome }}
|
|
|
|
{{ $PageContext = .Site }}
|
|
|
|
{{ end }}
|
|
|
|
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
|
|
|
|
|
|
|
{{ range $paginator.Pages }}
|
|
|
|
<article class="post on-list">
|
|
|
|
<div class="post-meta">
|
|
|
|
{{ if .Params.Date }}
|
|
|
|
<span>
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
|
|
<span> - </span>
|
|
|
|
<span class="post-date">
|
|
|
|
{{ .Date.Format "2006-01-02" }}
|
|
|
|
{{ if $.Site.Params.showLastUpdated }}
|
|
|
|
{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ with .Params.Author }}
|
|
|
|
<span> - </span>
|
|
|
|
<span class="post-author">{{ . }}</span>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
|
|
|
<span class="post-reading-time">- {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
{{ if .Params.tags }}
|
|
|
|
<span class="post-tags">
|
|
|
|
{{ range .Params.tags }}
|
|
|
|
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
{{ partial "pagination.html" . }}
|
|
|
|
{{ partial "stickers.html" . }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|