41 lines
1.1 KiB
HTML
41 lines
1.1 KiB
HTML
|
{{ define "main" -}}
|
|||
|
<div class="posts">
|
|||
|
{{ $paginator := .Paginate (where .Data.Pages ".Params.unlisted" "!=" "true") }}
|
|||
|
{{ range $paginator.Pages -}}
|
|||
|
<article class="post">
|
|||
|
<h1 class="post-title">
|
|||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|||
|
</h1>
|
|||
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700"| safeHTML }}" class="post-infos">
|
|||
|
{{ i18n "publish" }} {{ .Date.Format "02-01-2006" }}
|
|||
|
|
|||
|
{{ with .Params.categories }}
|
|||
|
{{ $total := len . }}
|
|||
|
{{ if gt $total 0 }}
|
|||
|
{{ i18n "in" }}
|
|||
|
{{ $total := sub $total 1 }}
|
|||
|
{{ range $i, $cat := sort . }}
|
|||
|
<a href="{{ "/categories/" | absLangURL }}{{ $cat | urlize }}">{{ $cat }}</a>
|
|||
|
{{ if lt $i $total }}•{{ end }}
|
|||
|
{{ end }}
|
|||
|
{{ end }}
|
|||
|
{{ end }}
|
|||
|
– {{ .ReadingTime }}min
|
|||
|
</time>
|
|||
|
|
|||
|
{{ partial "meta.html" . }}
|
|||
|
|
|||
|
<div class="post-content">
|
|||
|
{{ .Summary }}
|
|||
|
</div>
|
|||
|
{{ if .Truncated }}
|
|||
|
<div class="read-more-link">
|
|||
|
<a href="{{ .RelPermalink }}">{{ i18n "read-more" }}</a>
|
|||
|
</div>
|
|||
|
{{ end }}
|
|||
|
</article>
|
|||
|
{{- end }}
|
|||
|
{{ partial "pagination.html" . }}
|
|||
|
</div>
|
|||
|
{{- end }}
|