2019-04-16 16:55:53 +02:00
|
|
|
{{ define "main" }}
|
2020-09-09 22:56:54 +02:00
|
|
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
|
|
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
2019-04-16 16:55:53 +02:00
|
|
|
|
2020-09-09 22:56:54 +02:00
|
|
|
<div class="archive">
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
{{ range .Site.RegularPages.GroupByPublishDate "2006" }}
|
|
|
|
{{ if ne .Key "0001" }}
|
|
|
|
<div class="archive__group-year">
|
|
|
|
<h2 class="archive__group-year-header">{{ replace .Key "0001" "" }}</h2>
|
|
|
|
{{ range .Pages.GroupByDate "January" }}
|
|
|
|
<div class="archive__group-month">
|
|
|
|
<h3 class="archive__group-month-header">{{ .Key }}</h3>
|
|
|
|
<div class="archive__group-posts">
|
|
|
|
{{ range where .Pages "Type" $contentTypeName }}
|
|
|
|
{{ if eq .Kind "page" }}
|
2022-10-23 11:16:46 +02:00
|
|
|
<article class="archive__post">
|
2020-09-09 22:56:54 +02:00
|
|
|
<h3 class="archive__post-title">
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
|
|
</h3>
|
|
|
|
<div class="archive__post-meta">
|
2022-10-23 11:16:46 +02:00
|
|
|
<time class="archive__post-date">
|
2020-09-09 22:56:54 +02:00
|
|
|
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
2022-10-23 11:16:46 +02:00
|
|
|
</time>
|
2020-09-09 22:56:54 +02:00
|
|
|
{{ with .Params.Author }}
|
|
|
|
<span class="archive__post-author"
|
|
|
|
>—
|
|
|
|
{{ $.Site.Params.WrittenBy | default "Written by" }}
|
|
|
|
{{ . }}
|
|
|
|
</span>
|
|
|
|
{{ end }}
|
|
|
|
{{ if $.Site.Params.ShowReadingTime }}
|
|
|
|
<span class="archive__post-read-time"
|
|
|
|
>— {{ .ReadingTime }}
|
|
|
|
{{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-10-23 11:16:46 +02:00
|
|
|
</article>
|
2020-09-09 22:56:54 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2019-04-16 16:55:53 +02:00
|
|
|
</div>
|
2020-09-09 22:56:54 +02:00
|
|
|
{{ end }}
|
2019-04-16 16:55:53 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|