bunteshaus.de/themes/buha/layouts/partials/layout/archive.html
2022-04-28 14:53:58 +02:00

20 lines
870 B
HTML

{{ if ne .context.Content "" }}
{{ partial "snippets/content" (dict "content" .context.Content) }}
{{ end }}
<section>
{{ partial "debug" (dict "context" . "caller" "archive.html" )}}
{{ $prev := 3000}}
{{range where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2 style="margin-bottom: 0;">{{ $date.Format "2006" }}</h2>
{{end}}
<div class="frow" style="margin-bottom: .2rem; margin-left: .2rem;">
<div class="underline"><a href="{{.Permalink}}">{{ .Title }}</a></div>
<div style="margin-left: .2rem;">{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006" }}</div>
</div>
{{ $prev = $date.Format "2006"}}
{{end}}
</section>