add pagination and first after examples wip
This commit is contained in:
parent
91984fee72
commit
664f5fc3f5
|
@ -1,13 +1,23 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $section := where .Data.Pages "Section" "article" }}
|
|
||||||
<main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray">
|
<main class="cf ph3 ph5-l pv3 pv4-l f4 tc center measure-wide lh-copy mid-gray">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</main>
|
</main>
|
||||||
<div class="pa3 pa4-ns">
|
<div class="pa3 pa4-ns">
|
||||||
|
{{ $section := where .Data.Pages "Section" "article" }}
|
||||||
|
|
||||||
<section class="flex-ns flex-wrap justify-around">
|
<section class="flex-ns flex-wrap justify-around">
|
||||||
{{ range sort $section "Date" "desc" }}
|
{{ range sort (first 1 $section) "Date" "desc" }}
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="flex-ns flex-wrap justify-around">
|
||||||
|
{{ range sort (first 2 (after 1 $section)) "Date" "desc" }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $section := where .Data.Pages "Section" .Section }}
|
|
||||||
<article class="pa3 pa4-ns nested-copy-line-height nested-img">
|
<article class="pa3 pa4-ns nested-copy-line-height nested-img">
|
||||||
|
|
||||||
<div class="{{ .Site.Params.copyClass }}">
|
<div class="{{ .Site.Params.copyClass }}">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ $section := .Paginate (where .Data.Pages "Section" .Section) 5 }}
|
||||||
<section class="flex-ns flex-wrap justify-around mt5">
|
<section class="flex-ns flex-wrap justify-around mt5">
|
||||||
{{ range sort $section "Date" "desc" }}
|
{{ range sort $section.Pages "Date" "desc" }}
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue