2019-11-04 13:09:44 +00:00
|
|
|
{{ define "main" }}
|
2020-01-31 06:06:30 +00:00
|
|
|
{{ $titleWrap := $.Param "titleWrap" }}
|
2020-01-20 06:14:36 +00:00
|
|
|
|
2020-02-13 11:44:18 +00:00
|
|
|
<header class="header basicflex-column">
|
2019-11-04 13:09:44 +00:00
|
|
|
<h3 class="h3 terms__title">
|
|
|
|
{{ .Title }}
|
|
|
|
</h3>
|
2020-03-08 12:31:58 +00:00
|
|
|
<div class="px py p2 single__contents">
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ .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 }}
|
2020-01-31 06:06:30 +00:00
|
|
|
{{ range $.Param "notAllowedTypesInArchive" }}
|
2020-01-20 06:14:36 +00:00
|
|
|
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
|
|
|
{{ end }}
|
|
|
|
|
2020-10-29 13:27:37 +00:00
|
|
|
{{ if gt (len $filteredPages) 0 }}
|
2020-01-31 06:06:30 +00:00
|
|
|
{{ $paginator := .Paginate ($filteredPages.GroupByDate ($.Param "archiveGroupByDate" | default "2006")) ($.Param "archivePaginate") }}
|
2019-11-17 11:01:09 +00:00
|
|
|
{{ range ($paginator).PageGroups }}
|
2020-10-29 13:27:37 +00:00
|
|
|
<span class="archive__key" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ .Key }}</span>
|
|
|
|
<ul class="archive__ul" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
|
|
|
{{ range .Pages }}
|
|
|
|
<li class="archive__li" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
|
|
|
|
<span class="archive__meta" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
|
|
|
|
{{ 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 }}
|
|
|
|
</span>
|
|
|
|
<a href="{{ .Permalink }}" class="archive__title" data-title-wrap="{{ $titleWrap | default "wrap"}}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">{{ .Title }}</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
{{ i18n "no-contents" | default "There is nothing to display" }}
|
|
|
|
{{ 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 }}
|