mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 20:11:37 +01:00
update pages source
This commit is contained in:
parent
35cf31b81f
commit
2b9088cff6
@ -1,18 +1,14 @@
|
|||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
{{ $pctx := . }}
|
|
||||||
|
|
||||||
{{ if .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ $pctx = .Site }}
|
|
||||||
{{ else }}
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1>
|
<h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1>
|
||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{ 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 }}
|
{{ range $index, $page := $paginator.Pages }}
|
||||||
<article class="{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}first-entry{{ else }}post-entry{{ end }}">
|
<article class="{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}first-entry{{ else }}post-entry{{ end }}">
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
@ -27,7 +23,6 @@
|
|||||||
<a class="entry-link" href="{{ .Permalink }}"></a>
|
<a class="entry-link" href="{{ .Permalink }}"></a>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if gt $paginator.TotalPages 1 }}
|
{{ if gt $paginator.TotalPages 1 }}
|
||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
|
Loading…
Reference in New Issue
Block a user