themu/layouts/index.html

37 lines
1.1 KiB
HTML
Raw Normal View History

2020-04-08 21:44:29 +03:00
<!DOCTYPE html>
<html>
2020-04-22 13:14:28 +03:00
{{ partial "header.html" . }}
<body>
<div class="content">
{{ partial "head.html" . }}
2020-04-08 21:44:29 +03:00
<main class="list">
2020-04-22 13:14:28 +03:00
<div class="site-description">
{{- if isset .Site.Params "subtitle" -}}
<p>{{ .Site.Params.Subtitle | markdownify }}</p>
{{- end -}}
</div>
2020-04-08 21:44:29 +03:00
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }}
{{ range $paginator.Pages }}
<section class="list-item">
<h1 class="title"><a href="{{ .RelPermalink }}">{{.Title}}</a></h1>
<time>{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time>
2020-04-22 13:14:28 +03:00
<br><div class="description">
2020-04-08 21:44:29 +03:00
{{ if isset .Params "description" }}
{{ .Description }}
{{ else }}
{{ .Summary }}&hellip;
{{ end }}
2020-04-22 13:14:28 +03:00
</div>
2020-04-08 21:44:29 +03:00
<a href="{{ .RelPermalink }}">Read more ⟶</a>
</section>
{{ end }}
{{ template "partials/paginator.html" . }}
</main>
{{ partial "footer.html" . }}
</div>
2020-04-22 13:14:28 +03:00
</body>
</html>