1
0
Fork 0

update pages source

This commit is contained in:
nanxiaobei 2020-01-16 03:24:22 +08:00
parent 35cf31b81f
commit 2b9088cff6

View file

@ -1,18 +1,14 @@
{{ partial "header.html" . }}
{{ $pctx := . }}
{{ if .IsHome }}
{{ $pctx = .Site }}
{{ else }}
{{ if not .IsHome }}
<header class="page-header">
<h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1>
</header>
{{ end }}
{{ $paginator := .Paginate (where $pctx.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ $paginator := .Paginate (where .Site.RegularPages ".Params.type" "!=" "page") }}
{{ if gt $paginator.TotalPages 0 }}
{{ range $index, $page := $paginator.Pages }}
<article class="{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}first-entry{{ else }}post-entry{{ end }}">
<header class="entry-header">
@ -27,7 +23,6 @@
<a class="entry-link" href="{{ .Permalink }}"></a>
</article>
{{ end }}
{{ end }}
{{ if gt $paginator.TotalPages 1 }}
<footer class="page-footer">