hydden/layouts/index.html

46 lines
1.2 KiB
HTML
Raw Normal View History

2019-06-10 19:35:13 +00:00
{{ 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 }}
2019-06-10 20:01:30 +00:00
{{ define "note" -}}
<nav class="sections">
{{ partial "sections.html" . }}
</nav>
{{- end }}