summaryrefslogtreecommitdiff
path: root/layouts/partials/single/next-prev.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/single/next-prev.html')
-rw-r--r--layouts/partials/single/next-prev.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/layouts/partials/single/next-prev.html b/layouts/partials/single/next-prev.html
new file mode 100644
index 0000000..c938990
--- /dev/null
+++ b/layouts/partials/single/next-prev.html
@@ -0,0 +1,30 @@
+{{- /* Navigation for Next and Previous Post */ -}}
+<nav class="post__navigation" aria-label="{{ lang.Translate "post.navigation" | default "Post navigation" }}">
+ <ul class="post__navigation-list">
+ {{- with .PrevInSection }}
+ <li class="post__navigation-prev">
+ <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="prev">
+ <span class="post__navigation-label">
+ {{ lang.Translate "post.previous" | default "Previous post:" }}
+ </span>
+ <span class="post__navigation-title">
+ {{ .Title }}
+ </span>
+ </a>
+ </li>
+ {{- end }}
+
+ {{- with .NextInSection }}
+ <li class="post__navigation-next">
+ <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="next">
+ <span class="post__navigation-label">
+ {{ lang.Translate "post.next" | default "Next post:" }}
+ </span>
+ <span class="post__navigation-title">
+ {{ .Title }}
+ </span>
+ </a>
+ </li>
+ {{- end }}
+ </ul>
+</nav>