2019-11-04 13:09:44 +00:00
|
|
|
{{ define "main" }}
|
2020-01-20 06:14:36 +00:00
|
|
|
{{ $titleWrap := .Params.titleWrap }}
|
|
|
|
|
2019-11-04 13:09:44 +00:00
|
|
|
<header class="header">
|
|
|
|
<h3 class="h3 terms__title">
|
|
|
|
{{ .Title }}
|
|
|
|
</h3>
|
|
|
|
<div>
|
|
|
|
{{ .Content }}
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<main class="main archive">
|
2019-11-17 11:01:09 +00:00
|
|
|
<div class="archive__container">
|
2020-01-20 06:14:36 +00:00
|
|
|
{{ $filteredPages := .Site.RegularPages }}
|
|
|
|
{{ range .Site.Params.notAllowedTypesInArchive }}
|
|
|
|
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ $paginator := .Paginate ($filteredPages.GroupByDate (.Site.Params.archiveGroupByDate | default "2006")) .Site.Params.archivePaginate }}
|
2019-11-17 11:01:09 +00:00
|
|
|
|
|
|
|
{{ range ($paginator).PageGroups }}
|
2019-11-04 13:09:44 +00:00
|
|
|
<span class="archive__key">{{ .Key }}</span>
|
2020-01-28 04:37:42 +00:00
|
|
|
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ range .Pages }}
|
2020-01-28 04:37:42 +00:00
|
|
|
<li class="archive__li" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
2019-11-20 17:45:46 +00:00
|
|
|
<span class="archive__meta">
|
2020-01-28 04:37:42 +00:00
|
|
|
{{ if ne ($.Param "languagedir") "rtl" }}
|
|
|
|
<span class="archive__type">{{ .Type }}</span>
|
|
|
|
<span class="archive__date">{{ .Date.Format (i18n "archive-dateformat") }}</span>
|
|
|
|
{{ else }}
|
|
|
|
<span class="archive__date">{{ .Date.Format (i18n "archive-dateformat") }}</span>
|
|
|
|
<span class="archive__type">{{ .Type }}</span>
|
|
|
|
{{ end }}
|
2020-01-20 06:14:36 +00:00
|
|
|
</span>
|
2020-01-28 04:37:42 +00:00
|
|
|
<a href="{{ .Permalink }}" class="archive__title" data-title-wrap="{{ $titleWrap | default "wrap"}}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">{{ .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>
|
2019-11-20 17:45:46 +00:00
|
|
|
{{ partial "pagination/pagination" . }}
|
|
|
|
<div class="hide">
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "search/site-search" . }}
|
2019-11-20 17:45:46 +00:00
|
|
|
</div>
|
2019-11-24 14:31:28 +00:00
|
|
|
{{ partial "script/archive-script" . }}
|
2019-11-04 13:09:44 +00:00
|
|
|
</main>
|
|
|
|
{{ end }}
|