diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2024-05-04 17:25:13 -0400 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2024-05-04 17:25:13 -0400 |
commit | 52d0643222d3b555ca8328faf7b0b001663da2a0 (patch) | |
tree | 7b17998241761ad1087b69bb6c81261244521b4f /templates/partials/navigation.html.twig | |
parent | d733546b672f2b6c58f3f0e0af20663fd1aa6d11 (diff) | |
download | grav-sowtheme-52d0643222d3b555ca8328faf7b0b001663da2a0.tar.gz grav-sowtheme-52d0643222d3b555ca8328faf7b0b001663da2a0.tar.bz2 grav-sowtheme-52d0643222d3b555ca8328faf7b0b001663da2a0.zip |
new layout 10
Diffstat (limited to 'templates/partials/navigation.html.twig')
-rw-r--r-- | templates/partials/navigation.html.twig | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/templates/partials/navigation.html.twig b/templates/partials/navigation.html.twig index be351e0..feb0684 100644 --- a/templates/partials/navigation.html.twig +++ b/templates/partials/navigation.html.twig @@ -1,25 +1,29 @@ + +{% if page.parent.parent.url == "/" %} <div class="links" id="nextback"> - {# {% if $prevPage = page.prevSibling %} #} - <a class="anim2" id="next" href="{{ page.parent.url }}"> + {% set prevPage = page.adjacentSibling(-1) %} + {% if prevPage %} + <a class="anim2" id="next" href="{{ prevPage.url }}"> <div class="roundedButton"> <span class="icon">arrow_back</span> <div class="stack"> <span>Previous</span> - <span>Sample last article name that is super long and will require me to clip it</span> + <span>{{ prevPage.title }}</span> </div> </div> </a> - {# {% endif %} #} + {% endif %} - {# {% if $nextPage = page.nextSibling %} #} - <a class="anim3" id="back" href="{{ page.parent.url }}"> + {% set nextPage = page.adjacentSibling(1) %} + {% if nextPage %} + <a class="anim3" id="back" href="{{ nextPage.url }}"> <div class="roundedButton"> <span class="icon">arrow_forward</span> <div class="stack"> <span>Next</span> - <span>Sample next article name</span> + <span>{{ nextPage.title }}</span> </div> </div> </a> - {# {% endif %} #} + {% endif %} </div> |