Skip to content
Permalink
Browse files

update pages source

  • Loading branch information
nanxiaobei committed Jan 15, 2020
1 parent 35cf31b commit 2b9088cff62211e6f88a8f9b724090d7bd293fb6
Showing with 2 additions and 7 deletions.
  1. +2 −7 layouts/_default/list.html
@@ -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 @@ <h2>{{ .Title }}</h2>
<a class="entry-link" href="{{ .Permalink }}"></a>
</article>
{{ end }}
{{ end }}

{{ if gt $paginator.TotalPages 1 }}
<footer class="page-footer">

0 comments on commit 2b9088c

Please sign in to comment.
You can’t perform that action at this time.