hugo-theme-zzo/layouts/index.html

34 lines
1.6 KiB
HTML
Raw Normal View History

2019-11-07 18:09:15 +00:00
{{ define "title" }}{{ .Site.Title }}{{ end }}
2019-11-04 13:09:44 +00:00
{{ define "main" }}
2020-01-23 17:46:03 +00:00
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
2020-01-31 06:06:30 +00:00
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
<div class="summary__container" data-display="block">
{{ $filteredPages := .Site.RegularPages }}
2020-01-31 06:06:30 +00:00
{{ range $.Param "notAllowedTypesInHome" }}
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
{{ end }}
2020-05-18 16:55:16 +00:00
{{ $filteredPagesPinned := slice }}
{{ if .Site.Params.enablePinnedPosts }}
{{ $filteredPagesPinned = (where $filteredPages "Params.pinned" "==" true) }}
{{ end }}
{{ $filteredPages := $filteredPages | intersect (where $filteredPages "Params.pinned" "!=" true) }}
{{ $filteredPages := $filteredPages | union ($filteredPagesPinned) }}
{{ $paginator := .Paginate $filteredPages }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination/pagination" . }}
2019-11-04 13:09:44 +00:00
</div>
{{ partial "search/search-result-desktop" . }}
</div>
{{ if $.Param "enableSidebar" }}
2020-01-31 06:06:30 +00:00
<aside class="list__sidebar {{ if eq ($.Param "sidebarPosition") "left" }}l{{ else }}r{{ end }}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
{{ partial "sidebar/sidebar-home" . }}
</aside>
{{ end }}
</main>
2020-03-06 22:52:49 +00:00
{{ partial "script/sidebar-script" . }}
{{ partial "script/home-script" . }}
{{ end }}