aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/documentation.html4
-rw-r--r--templates/partials/doc/page_toc.html6
-rw-r--r--templates/partials/doc/pagination.html63
3 files changed, 32 insertions, 41 deletions
diff --git a/templates/documentation.html b/templates/documentation.html
index 154df5f..d22d9e6 100644
--- a/templates/documentation.html
+++ b/templates/documentation.html
@@ -39,7 +39,9 @@
{% include "partials/doc/page_toc.html" %}
</div>
<div class="2xl:hidden">
- {% if page.earlier or page.later or page.lighter or page.heavier %}
+ {% if page.earlier or page.later or page.lighter or page.heavier or page.pages %}
+ {% include "partials/doc/pagination.html" %}
+ {% elif page.ancestors and page.ancestors | length == 3 %}
{% include "partials/doc/pagination.html" %}
{% endif %}
</div>
diff --git a/templates/partials/doc/page_toc.html b/templates/partials/doc/page_toc.html
index 238d8c3..b874b4b 100644
--- a/templates/partials/doc/page_toc.html
+++ b/templates/partials/doc/page_toc.html
@@ -26,8 +26,10 @@
</ol>
{% endif %}
<div class="bg-gray-100 rounded-bl-lg">
- {% if page.earlier or page.later or page.lighter or page.heavier %}
+ {% if page.earlier or page.later or page.lighter or page.heavier or page.pages %}
+ {% include "partials/doc/pagination.html" %}
+ {% elif page.ancestors and page.ancestors | length == 3 %}
{% include "partials/doc/pagination.html" %}
{% endif %}
</div>
-</aside> \ No newline at end of file
+</aside>
diff --git a/templates/partials/doc/pagination.html b/templates/partials/doc/pagination.html
index 0170a77..167669e 100644
--- a/templates/partials/doc/pagination.html
+++ b/templates/partials/doc/pagination.html
@@ -7,64 +7,51 @@
</div>
<nav class="flex space-x-4 items-center justify-center p-4">
{% if page.earlier %}
+ {% set left = page.earlier %}
+ {% elif page.lighter %}
+ {% set left = page.lighter %}
+ {% elif page.ancestors and page.ancestors | length == 3 %}
+ {% set left_path = page.ancestors | last %}
+ {% set left = get_section(path=left_path) %}
+ {% endif %}
+
+ {% if left %}
<div>
<a class="flex items-center space-x-1 hover:text-garage-orange text-garage-gray text-sm bg-white transform hover:scale-110 transition border border-garage-orange p-2.5 rounded-full"
- href="{{ page.earlier.permalink }}"
- title="{{ page.earlier.title }}">
+ href="{{ left.permalink }}"
+ title="{{ left.title }}">
<span class="icon">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
</svg>
+ <span class="mt-0.5 2xl:hidden">{{ left.title }}</span>
</span>
</a>
</div>
{% endif %}
+
{% if page.later %}
- <div>
- <a class="flex items-center space-x-1 hover:text-garage-orange text-garage-gray text-sm bg-white transform hover:scale-110 transition border border-garage-orange p-2.5 rounded-full"
- href="{{ page.later.permalink }}"
- title="{{ page.later.title }}">
- <span class="icon">
- <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
- xmlns="http://www.w3.org/2000/svg">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
- d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
- </svg>
- </span>
- </a>
- </div>
+ {% set right = page.later %}
+ {% elif page.heavier %}
+ {% set right = page.heavier %}
+ {% elif page.pages %}
+ {% set right = page.pages | first %}
{% endif %}
-
- {% if page.lighter %}
+
+ {% if right %}
<div>
<a class="flex items-center space-x-1 hover:text-garage-orange text-garage-gray text-sm bg-white transform hover:scale-110 transition border border-garage-orange p-2.5 rounded-full"
- href="{{ page.lighter.permalink }}"
- title="{{ page.lighter.title }}">
- <span class="icon flex space-x-1.5 2xl:inline 2xl:space-x-0">
- <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
- xmlns="http://www.w3.org/2000/svg">
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
- d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
- </svg>
- <span class="mt-0.5 2xl:hidden">{{ page.lighter.title }}</span>
- </span>
- </a>
- </div>
- {% endif %}
- {% if page.heavier %}
- <div>
- <a class="flex items-center space-x-1 hover:text-garage-orange text-garage-gray text-sm bg-white transform hover:scale-110 transition border border-garage-orange p-2.5 rounded-full"
- href="{{ page.heavier.permalink }}"
- title="{{ page.heavier.title }}">
- <span class="icon flex space-x-1.5 2xl:inline 2xl:space-x-0">
- <span class="mt-0.5 2xl:hidden">{{ page.heavier.title }}</span>
+ href="{{ right.permalink }}"
+ title="{{ right.title }}">
+ <span class="icon">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
</svg>
+ <span class="mt-0.5 2xl:hidden">{{ right.title }}</span>
</span>
</a>
</div>
@@ -73,4 +60,4 @@
</div>
</div>
</div>
-</section> \ No newline at end of file
+</section>