archie-shades-of-purple/layouts/index.html
Patrick Georgi d8819d5eee
Use locale-aware alias for date formatting (#115)
":date_medium" matches "Jan 2, 2006" in english locales while adapting
to hugo's configured locale.
2024-08-05 23:40:42 +05:30

31 lines
1,007 B
HTML

<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="content">
{{ partial "head.html" . }}
<main class="list">
<div class="site-description">
{{- if isset .Site.Params "subtitle" -}}
<p>{{ .Site.Params.Subtitle | .Page.RenderString }}</p>
{{- end -}}
</div>
{{ $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 ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time>
<br>{{ template "partials/pagedescription.html" . }}
<a class="readmore" href="{{ .RelPermalink }}">Read more ⟶</a>
</section>
{{ end }}
{{ template "partials/paginator.html" . }}
</main>
{{ partial "footer.html" . }}
</div>
</body>
</html>