48 lines
1.7 KiB
HTML
48 lines
1.7 KiB
HTML
{{ define "main" }}
|
|
{{ $titleWrap := .Params.titleWrap }}
|
|
|
|
<header class="header">
|
|
<h3 class="h3 terms__title">
|
|
{{ .Title }}
|
|
</h3>
|
|
<div>
|
|
{{ .Content }}
|
|
</div>
|
|
</header>
|
|
<main class="main archive">
|
|
<div class="archive__container">
|
|
{{ $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 }}
|
|
|
|
{{ range ($paginator).PageGroups }}
|
|
<span class="archive__key">{{ .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">
|
|
{{ 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 }}
|
|
</div>
|
|
<div class="grow"></div>
|
|
{{ partial "pagination/pagination" . }}
|
|
<div class="hide">
|
|
{{ partial "search/site-search" . }}
|
|
</div>
|
|
{{ partial "script/archive-script" . }}
|
|
</main>
|
|
{{ end }} |