31 lines
1.5 KiB
HTML
31 lines
1.5 KiB
HTML
{{/* get pages from the current page's section */}}
|
|
{{- $sections := site.Params.mainSections }}
|
|
{{- if .Section }}
|
|
{{- $sections = slice .Section }}
|
|
{{- end }}
|
|
{{- $pages := where (where site.RegularPages "Section" "in" $sections) "Params.hidden" "!=" true }}
|
|
|
|
{{- if and (gt (len $pages) 1) (in $pages . ) }}
|
|
<nav class="paginav">
|
|
{{- with $pages.Next . }}
|
|
<a class="prev" href="{{ .Permalink }}">
|
|
<span class="title">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left" style="user-select: text;"><line x1="19" y1="12" x2="5" y2="12" style="user-select: text;"></line><polyline points="12 19 5 12 12 5" style="user-select: text;"></polyline></svg>
|
|
{{- i18n "prev_page" }}</span>
|
|
<br>
|
|
<span>{{- .Name -}}</span>
|
|
</a>
|
|
{{- end }}
|
|
{{- with $pages.Prev . }}
|
|
<a class="next" href="{{ .Permalink }}">
|
|
<span class="title">
|
|
{{- i18n "next_page" -}}
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right" style="user-select: text;"><line x1="5" y1="12" x2="19" y2="12" style="user-select: text;"></line><polyline points="12 5 19 12 12 19" style="user-select: text;"></polyline></svg>
|
|
</span>
|
|
<br>
|
|
<span>{{- .Name -}}</span>
|
|
</a>
|
|
{{- end }}
|
|
</nav>
|
|
{{- end }}
|