commit 60570338783f0fe6056842d590f56b5b60b1c9b0
parent 03cabfb0b78266efb4409f5d589b3a8d1ce5fcad
Author: lash <dev@holbrook.no>
Date: Thu, 27 Jun 2024 19:24:51 +0100
Fix display bug in pagination
Diffstat:
4 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/content/20220112_clortho.rst b/content/20220112_clortho.rst
@@ -175,7 +175,7 @@ But for now it illustrates the point.
.. _ccrypt: https://ccrypt.sourceforge.net/
-.. _Clortho: https://holbrook.no/src/clortho
+.. _Clortho: https://holbrook.no/src/clortho/file/clortho.sh.html#l10
.. _5 Dollar Wrench Problem: https://xkcd.com/538/
diff --git a/lash/static/css/style.css b/lash/static/css/style.css
@@ -9,6 +9,15 @@ nav#menu a:visited {
color: #0000ff;
}
+nav#pages {
+ padding-top:2em;
+}
+
+nav#pages ul li {
+ list-style-type: none;
+ display: inline;
+}
+
section.body a:visited {
color: #30303f;
}
diff --git a/lash/templates/base.html b/lash/templates/base.html
@@ -35,7 +35,7 @@
<footer id="contentinfo" class="body">
<hr/>
<address id="about" class="vcard body">
- Powered by <a title="Pelican is a static site generator" href="https://getpelican.com/">Pelican</a> | <a title="manbytesgnu.com is licensed under Creative Commons Attribution-ShareAlike 4.0 International" href="https://holbrook.no/share/licenses/cc/cc-by-sa-4.0.txt">CC-BY-SA 4.0</a> | <a title="GIT site history since jan 15th 2022" href="https://holbrook.no/src/manbytesgnu_site/log.html">Site history</a> | <a href="./feeds/all.atom.xml" title="Atom feed of all posts">Atom feed</a> | ETH <a href="./images/donate_eth_qr.png" title="Ethereum address for tipping">0x98d0D0a1992d9A0c3C84ccb92182A05c852972d1</a> | BTC <a href="./images/donate_btc_qr.png" title="Bitcoin address for tipping">12DnRH9HpJ6cfET2LKHrURn2yZBDfDEwHv</a>
+ Powered by <a title="Pelican is a static site generator" href="https://getpelican.com/">Pelican</a> | <a title="manbytesgnu.com is licensed under Creative Commons Attribution-ShareAlike 4.0 International" href="https://holbrook.no/share/licenses/cc/cc-by-sa-4.0.txt">CC-BY-SA 4.0</a> | <a title="GIT site history since jan 15th 2022" href="https://holbrook.no/src/manbytesgnu_site/log.html">Site history</a> | <a href="./feeds/all.atom.xml" title="Atom feed of all posts">Atom feed</a> | ETH <a href="./images/donate_eth_qr.png" title="Ethereum address for tipping">0x98d0D0a1992d9A0c3C84ccb92182A05c852972d1</a> | BTC <a href="./images/donate_btc_qr.png" title="Bitcoin address for tipping">1PfFbhKd32W6GfR6MLVifCrgqw47czA5LV</a>
</address><!-- /#about -->
</footer><!-- /#contentinfo -->
</body>
diff --git a/lash/templates/pagination.html b/lash/templates/pagination.html
@@ -0,0 +1,17 @@
+{% if DEFAULT_PAGINATION %}
+ {% set first_page = articles_paginator.page(1) %}
+ {% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
+ <nav id="pages">
+ <ul>
+ {% if articles_page.has_previous() %}
+ <li><a href="{{ SITEURL }}/{{ first_page.url }}">⟪</a></li>
+ <li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">⟨</a></li>
+ {% endif %}
+ <li>Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</li>
+ {% if articles_page.has_next() %}
+ <li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">⟩</a></li>
+ <li><a href="{{ SITEURL }}/{{ last_page.url }}">⟫</a></li>
+ {% endif %}
+ </ul>
+ </nav>
+{% endif %}