hugo-theme-zzo/layouts/archive/list.html

38 lines
1.2 KiB
HTML
Raw Normal View History

2019-11-04 13:09:44 +00:00
{{ define "main" }}
<header class="header">
<h3 class="h3 terms__title">
{{ .Title }}
</h3>
<div>
{{ .Content }}
</div>
</header>
</span>
<main class="main archive">
<div class="archive__container">
{{ $pages := (where (where .Site.RegularPages "Type" "!=" "about") "Section" "!=" "talks") }}
2020-01-01 05:23:11 +00:00
{{ $paginator := .Paginate ($pages.GroupByDate (.Site.Params.archiveGroupByDate | default "2006")) .Site.Params.archivePaginate }}
{{ range ($paginator).PageGroups }}
2019-11-04 13:09:44 +00:00
<span class="archive__key">{{ .Key }}</span>
<ul class="archive__ul">
{{ range .Pages }}
<li class="archive__li">
<span class="archive__meta">
<span class="archive__type">{{ .Type }}</span>
<span class="archive__date">{{ .Date.Format (i18n "archive-dateformat") }}</span>
</span>
<a href="{{ .Permalink }}" class="archive__title">{{ .Title }}</a>
2019-11-04 13:09:44 +00:00
</li>
{{ end }}
</ul>
2019-11-17 16:44:04 +00:00
{{ end }}
2019-11-04 13:09:44 +00:00
</div>
2019-11-17 16:44:04 +00:00
<div class="grow"></div>
{{ partial "pagination/pagination" . }}
<div class="hide">
{{ partial "search/site-search" . }}
</div>
{{ partial "script/archive-script" . }}
2019-11-04 13:09:44 +00:00
</main>
{{ end }}