update pages source
This commit is contained in:
parent
35cf31b81f
commit
2b9088cff6
1 changed files with 2 additions and 7 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue