projects
/
kengrimes.com
/
theme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f65fd18
)
paginator chrono ordering, propogating to listed pages
author
ken
<ken@mihrtec.com>
Mon, 2 Apr 2018 10:00:30 +0000
(
03:00
-0700)
committer
ken
<ken@mihrtec.com>
Mon, 2 Apr 2018 10:00:30 +0000
(
03:00
-0700)
layouts/_default/list.html
patch
|
blob
|
history
diff --git
a/layouts/_default/list.html
b/layouts/_default/list.html
index
33555c4
..
aad3e96
100644
(file)
--- a/
layouts/_default/list.html
+++ b/
layouts/_default/list.html
@@
-1,5
+1,5
@@
{{- define "main" -}}
{{- define "main" -}}
-{{ $paginator := .Paginate (where .Data.Pages.By
Dat
e "Section" .Section) 5 }}
+{{ $paginator := .Paginate (where .Data.Pages.By
Lastmod.Revers
e "Section" .Section) 5 }}
{{- if (gt (len (findRE "<h1" .Content)) 0) -}}
{{ replaceRE "(<h1.*</h1>)" "</article>\n$1\n<article>" .Content | strings.TrimLeft "\n " | strings.TrimPrefix "</article>" | replaceRE "\n" "\n " | safeHTML }}</article>
{{- else -}}
{{- if (gt (len (findRE "<h1" .Content)) 0) -}}
{{ replaceRE "(<h1.*</h1>)" "</article>\n$1\n<article>" .Content | strings.TrimLeft "\n " | strings.TrimPrefix "</article>" | replaceRE "\n" "\n " | safeHTML }}</article>
{{- else -}}
@@
-7,7
+7,7
@@
{{- end -}}
<div class="speedy-cards">
{{- $rsc := .Resources }}
{{- end -}}
<div class="speedy-cards">
{{- $rsc := .Resources }}
- {{- range $paginator.Pages
.ByLastmod.Reverse
}}
+ {{- range $paginator.Pages }}
{{- $secHead := cond (not .Params.header) ($rsc.GetMatch "header.png") (string .Params.header | $rsc.GetMatch) }}
{{- $secHead := cond (not $secHead) (relURL "/img/speedy.png") $secHead.RelPermalink }}
<a href="{{ .RelPermalink }}">
{{- $secHead := cond (not .Params.header) ($rsc.GetMatch "header.png") (string .Params.header | $rsc.GetMatch) }}
{{- $secHead := cond (not $secHead) (relURL "/img/speedy.png") $secHead.RelPermalink }}
<a href="{{ .RelPermalink }}">