Add prev, next page links

master
Will Faught 1 year ago
parent a1008ae0b8
commit 99c439860d

@ -917,12 +917,18 @@ Page identifiers:
<dd>The menu.</dd>
<dt><code>#paige-metadata</code></dt>
<dd>The metadata.</dd>
<dt><code>#paige-next</code></dt>
<dd>The next page link.</dd>
<dt><code>#paige-pages</code></dt>
<dd>The pages.</dd>
<dt><code>#paige-pages-header</code></dt>
<dd>The pages header.</dd>
<dt><code>#paige-pagination</code></dt>
<dd>The sub-page pagination links.</dd>
<dt><code>#paige-prev</code></dt>
<dd>The previous page link.</dd>
<dt><code>#paige-prev-next</code></dt>
<dd>The container of the previous and next page links.</dd>
<dt><code>#paige-reading-time</code></dt>
<dd>The reading time.</dd>
<dt><code>#paige-root</code></dt>

@ -3,6 +3,7 @@
#paige-credit,
#paige-date,
#paige-keywords,
#paige-prev-next,
#paige-reading-time,
#paige-series,
#paige-toc,

@ -15,6 +15,22 @@
{{ partial "paige/footer-first.html" . }}
{{ end }}
{{ if or $page.PrevInSection $page.NextInSection }}
<div class="mb-3" id="paige-prev-next">
{{ if $page.PrevInSection }}
<p class="mb-0 text-center text-secondary" id="paige-prev">
<a class="link-secondary" href="{{ $page.Prev.Permalink }}">&larr; {{ $page.PrevInSection.Title }}</a>
</p>
{{ end }}
{{ if $page.NextInSection }}
<p class="mb-0 text-center text-secondary" id="paige-next">
<a class="link-secondary" href="{{ $page.Next.Permalink }}">{{ $page.NextInSection.Title }} &rarr;</a>
</p>
{{ end }}
</div>
{{ end }}
{{ if and $linkcontent $linkurl (not ($page.Param "paige.file_link.disable")) }}
<p class="text-center" id="paige-file-link">
<a class="link-secondary" href="{{ $linkurl }}">{{ $linkcontent }}</a>

Loading…
Cancel
Save