BadDaemons/layouts/posts/list.html

1.7 KiB

{{ define "header" }} {{ partial "masthead.html" . }} {{ end }} {{ define "main" }}

Bad Daemons

{{ $scratch := newScratch }} {{ with (index .Site.Params.layout .Type).featured }} {{ $scratch.Add "featured" slice }} {{ range first .limit .items }} {{ $scratch.Add "featured" (site.GetPage .) }} {{ end }} {{ if ge (len ($scratch.Get "featured")) 1 }} {{ if ne $.Site.Params.hackcss.disabled true }} {{ with resources.Get "css/conditional/layouts/partials/page-thumbs.css" | minify }} {{ end }} {{ end }}
{{ $index := site.GetPage "section" $.Type }} {{ $pages := $scratch.Get "featured" }} {{ $page_count := default 1 (len $pages) }} {{ if eq $page_count 1 }} {{ partial "page-summary.html" $index }} {{ else if gt $page_count 1 }}

Featured {{ $index.Title }}

{{ $index.Description }}
{{ partial "page-thumbs.html" (dict "thumbnail_options" .thumbs "page_count" $page_count "limit" .limit "pages" $pages) }} {{ end }}
{{ end }} {{ end }} {{ range (.Paginate (collections.SymDiff .Pages (default slice ($scratch.Get "featured")))).Pages }} {{ partial "page-summary.html" . }} {{ end }} {{ end }} {{ define "footer" }}

{{ partial "pagination.html" . }}

{{ partial "copyright-notice.html" . }} {{ end }}