summaryrefslogtreecommitdiff
path: root/templates/partials
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-05-04 18:10:31 -0400
committersowgro <tpoke.ferrari@gmail.com>2024-05-04 18:10:31 -0400
commitacdde303b41ed742681d2fde96507940e1c4dc87 (patch)
tree6ee14dc3cf4dc75afa969581e8246e00c37d54bf /templates/partials
parent64b925be9d9817642a4f15c067b0d2ed917f0d14 (diff)
downloadgrav-sowtheme-acdde303b41ed742681d2fde96507940e1c4dc87.tar.gz
grav-sowtheme-acdde303b41ed742681d2fde96507940e1c4dc87.tar.bz2
grav-sowtheme-acdde303b41ed742681d2fde96507940e1c4dc87.zip
Add next and previous buttons
Diffstat (limited to 'templates/partials')
-rw-r--r--templates/partials/navigation.html.twig10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/partials/navigation.html.twig b/templates/partials/navigation.html.twig
index f1f6223..0c61b1d 100644
--- a/templates/partials/navigation.html.twig
+++ b/templates/partials/navigation.html.twig
@@ -1,9 +1,9 @@
{% if page.parent.parent.url == "/" %}
-<div class="links" id="nextback">
- {% set prevPage = page.adjacentSibling(-1) %}
+<div class="links" id="nextprev">
+ {% set prevPage = page.prevSibling() %}
{% if prevPage %}
- <a class="anim2" id="next" href="{{ prevPage.url }}">
+ <a class="anim2" id="prev" href="{{ prevPage.url }}">
<div class="roundedButton">
<span class="icon">arrow_back</span>
<div class="stack">
@@ -14,9 +14,9 @@
</a>
{% endif %}
- {% set nextPage = page.adjacentSibling(1) %}
+ {% set nextPage = page.nextSibling() %}
{% if nextPage %}
- <a class="anim3" id="back" href="{{ nextPage.url }}">
+ <a class="anim3" id="next" href="{{ nextPage.url }}">
<div class="roundedButton">
<span class="icon">arrow_forward</span>
<div class="stack">