summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-11-12 08:25:50 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-11-12 08:25:50 +0900
commit519c427dc81d178b1018a7ee32c4543e354a7401 (patch)
treeebb465506d6c378abe5c1c3c7d18f213be4286e4
parent7d9303835efcbb63a6fa0ca2adf8f788b76ff5a3 (diff)
modified recordings/single.html
-rw-r--r--layouts/recordings/single.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/layouts/recordings/single.html b/layouts/recordings/single.html
index 96ddd42..1cd0e51 100644
--- a/layouts/recordings/single.html
+++ b/layouts/recordings/single.html
@@ -44,12 +44,25 @@
{{ .Content }}
</main>
+ {{ $pages := .CurrentSection.Pages.ByDate.Reverse }}
+ {{ $.Scratch.Set "older" nil }}
+ {{ $.Scratch.Set "newer" nil }}
+ {{ range $i, $p := $pages }}
+ {{ if eq $p.File.Path $.File.Path }}
+ {{ if lt (add $i 1) (len $pages) }}
+ {{ $.Scratch.Set "older" (index $pages (add $i 1)) }}
+ {{ end }}
+ {{ if gt $i 0 }}
+ {{ $.Scratch.Set "newer" (index $pages (sub $i 1)) }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
<footer>
<div class="nav">
- {{ with .NextInSection }}
+ {{ with $.Scratch.Get "older" }}
<a class="btn" href="{{ .RelPermalink }}">← Before</a>
{{ end }}
- {{ with .PrevInSection }}
+ {{ with $.Scratch.Get "newer" }}
<a class="btn" href="{{ .RelPermalink }}">Next →</a>
{{ end }}
</div>