mirror of
https://gitlab.com/EternalWanderer/vugo.git
synced 2024-11-29 05:23:50 +01:00
54 lines
1.5 KiB
HTML
54 lines
1.5 KiB
HTML
{{ define "main" }}
|
|
{{ .Content -}}
|
|
<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" }}
|
|
|
|
{{ $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 }}
|