Back to Falco

List

layouts/blog/list.html

latest596 B
Original Source

{{ define "main" }} {{ if .Parent.IsHome }} {{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) }} {{ else }} {{ $.Scratch.Set "blog-pages" .Pages }} {{ end }}

{{ "blog_title" | T }}

{{ "blog_invite" | T | safeHTML }}

{{- if .Pages -}} {{ $pag := .Paginate (( $.Scratch.Get "blog-pages").ByDate.Reverse )}} {{ $first := index (first 1 $pag.Pages) 0 }} {{ $rest := after 1 $pag.Pages }} {{ partial "blog/card.html" $first }} {{ range $rest }} {{ partial "blog/card.html" . }} {{ end }}

{{ template "_internal/pagination.html" . }} {{ end }}

{{ end }}