16 lines
653 B
HTML
16 lines
653 B
HTML
{{ $pages := slice }}
|
|
{{ if eq .Section "apps" }}
|
|
{{ $pages = (site.GetPage "/apps").Pages.ByTitle }}
|
|
{{ else }}
|
|
{{ with .CurrentSection }}{{ $pages = .Pages.ByWeight }}{{ end }}
|
|
{{ end }}
|
|
{{ if and $pages (not .IsSection) }}
|
|
{{ $prev := $pages.Prev . }}
|
|
{{ $next := $pages.Next . }}
|
|
{{/* Pages.Next/Prev are reversed relative to reading order */}}
|
|
<nav class="pager" aria-label="Previous and next">
|
|
{{ with $next }}<a class="pager-prev" href="{{ .RelPermalink }}"><span>Previous</span>{{ .LinkTitle }}</a>{{ end }}
|
|
{{ with $prev }}<a class="pager-next" href="{{ .RelPermalink }}"><span>Next</span>{{ .LinkTitle }}</a>{{ end }}
|
|
</nav>
|
|
{{ end }}
|