Add links to older/newer sections of archive.

This commit is contained in:
Sergio Martínez Portela 2023-09-17 17:17:30 +02:00
parent f1781bb1ae
commit 7d1524e270
3 changed files with 44 additions and 1 deletions

View file

@ -48,5 +48,18 @@
</div>
{% endfor %}
</div>
<div class="index-pages">
{% if prev_index_num != None %}
{% if prev_index_num == 0 %}
<a class="newer-posts" href="index.html">Newer posts</a>
{% else %}
<a class="newer-posts" href="index-{{ prev_index_num }}.html">Newer posts</a>
{% endif %}
{% endif %}
{% if next_index_num %}
<a class="older-posts" href="index-{{ next_index_num }}.html">Older posts</a>
{% endif %}
</div>
</body>
</html>

View file

@ -466,6 +466,24 @@ article.post {
margin-bottom: 1em;
padding-bottom: 1em;
border-bottom: #000 1px dashed;
.index-pages {
display: block;
margin: 0 auto;
width: fit-content;
}
.index-pages a {
padding: 1ex;
display: inline-block;
background-color: #024;
color: #fff;
border-radius: 4px;
}
.older-posts::after {
content: ' >';
}
.newer-posts::before {
content: '< ';
}
/* Tables. */
@ -485,6 +503,7 @@ tr.__table-separator {
height: auto;
}
.connections svg #graph0 > polygon {
/* Main box */
fill: transparent;