Use global paginator

This commit is contained in:
Vincent Fiduccia
2018-08-31 14:33:24 -07:00
committed by Denise Schannon
parent 10d9374510
commit 80fd16647b
2 changed files with 43 additions and 46 deletions
+2
View File
@@ -17,6 +17,8 @@ pygmentsCodeFencesGuessSyntax = true
addThis = "ra-5af1cc6793d86bfb"
### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links)
ghdocsrepo = "https://github.com/rancher/docs"
pageBy = "title"
pageLimit = 5
[outputFormats.Algolia]
baseName = "algolia"
+41 -46
View File
@@ -22,65 +22,60 @@
{{end}}
<div class="main-content">
<!-- this is a test -->
<!-- {{ partial "page-nav.html" . }} -->
<!-- end test -->
{{ .Content }}
{{ range (.Paginator 5).Pages }}
{{ $paginator := .Scratch.Get "paginator" }}
{{ range $paginator.Pages }}
<div class="box m-b-md">
<div class="p-a-sm">
<h3><a href="{{.URL}}">{{.Title}}</a></h3>
<div class="p-a-sm">
<h3><a href="{{.URL}}">{{.Title}}</a></h3>
{{ if .Params.Image }}
<div class="thumbnail"><img src="{{ .Params.Image }}" alt="{{ .Params.Title }}"></div>
{{ if .Params.Image }}
<div class="thumbnail"><img src="{{ .Params.Image }}" alt="{{ .Params.Title }}"></div>
{{end}}
<p>{{ .Summary | safeHTML }}</p>
{{ if .Truncated }}
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
<div class="bg-default">
<div class="row">
{{ with .Params.Author }}
<div class="p-h-sm p-v-xs"><i class="material-icons">person_outline</i> By: {{ . }}</div>
{{end}}
<p>{{ .Summary | safeHTML }}</p>
{{ if .Truncated }}
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
<div class="bg-default">
<div class="row">
{{ with .Params.Author }}
<div class="p-h-sm p-v-xs"><i class="material-icons">person_outline</i> By: {{ . }}</div>
{{end}}
{{ if eq .Section "events" }}
{{ with .Params.EventDate }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ . }}</div>
{{end}}
{{ else }}
{{ with .Params.Date }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ .Format "January 2, 2006" }}</div>
{{end}}
{{end}}
{{ if eq .Section "blog" }}
<div class="p-h-sm p-v-xs"><i class="material-icons">timer</i> Read Time: {{.ReadingTime}} minutes</div>
{{end}}
{{ with .Params.Location }}
<div class="p-h-sm p-v-xs"><i class="material-icons">location_on</i> {{ . }}</div>
{{end}}
</div>
{{ if eq .Section "events" }}
{{ with .Params.EventDate }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ . }}</div>
{{end}}
{{ else }}
{{ with .Params.Date }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ .Format "January 2, 2006" }}</div>
{{end}}
{{end}}
{{ if eq .Section "blog" }}
<div class="p-h-sm p-v-xs"><i class="material-icons">timer</i> Read Time: {{.ReadingTime}} minutes</div>
{{end}}
{{ with .Params.Location }}
<div class="p-h-sm p-v-xs"><i class="material-icons">location_on</i> {{ . }}</div>
{{end}}
</div>
</div>
</div>
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
<div class="p-v-xs">{{ partial "page-edit.html" . }}</div>
</article>
<!-- {{ with .TableOfContents }}
<div class="offset-watch invisible"></div>