post-to-post pagination and a few spacing tweaks

This commit is contained in:
2026-02-19 17:22:15 -08:00
parent 3249c8305f
commit 94716d8e63
4 changed files with 38 additions and 7 deletions

View File

@ -34,4 +34,13 @@ layout: base.njk
{{ content | safe }} {{ content | safe }}
</article> </article>
{% set olderPost = collections.posts | getPreviousCollectionItem %}
{% set newerPost = collections.posts | getNextCollectionItem %}
{% set olderHref = olderPost.url %}
{% set newerHref = newerPost.url %}
{% set olderTitle = olderPost.data.title %}
{% set newerTitle = newerPost.data.title %}
{% set inPost = true %}
{% include "pagination.njk" %}
</heading-anchors> </heading-anchors>

View File

@ -1,17 +1,17 @@
{% if olderHref or newerHref %} {% if olderHref or newerHref %}
<nav aria-label="pagination"> <nav aria-label="pagination">
<ol class="pagination"> <ol class="pagination {% if inPost %}post-pagination{% endif %}">
{% if olderHref %} {% if olderHref %}
<li class="older"> <li class="older">
<a href="{{ olderHref }}"> <a href="{{ olderHref }}">
<i class="fa-solid fa-hand-point-left" aria-hidden="true"></i> older <i class="fa-solid fa-hand-point-left" aria-hidden="true"></i> {{ olderTitle or "older" }}
</a> </a>
</li> </li>
{% endif %} {% endif %}
{% if newerHref %} {% if newerHref %}
<li class="newer"> <li class="newer">
<a href="{{ newerHref }}"> <a href="{{ newerHref }}">
newer <i class="fa-solid fa-hand-point-right" aria-hidden="true"></i> {{ newerTitle or "newer" }} <i class="fa-solid fa-hand-point-right" aria-hidden="true"></i>
</a> </a>
</li> </li>
{% endif %} {% endif %}

View File

@ -109,6 +109,12 @@ h3 {
font-size: 1.6rem; font-size: 1.6rem;
} }
@media (max-width: 650px) {
h1 { font-size: 2.8rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; }
}
h4, h5, h6 { h4, h5, h6 {
margin-top: 1rem; margin-top: 1rem;
font-size: 1.2rem; font-size: 1.2rem;
@ -200,7 +206,7 @@ dd {
/* Blockquotes */ /* Blockquotes */
blockquote { blockquote {
margin: .5rem 1rem; margin: .5rem 0;
padding: 0 1rem; padding: 0 1rem;
border-radius: .25rem 1rem 1rem .25rem; border-radius: .25rem 1rem 1rem .25rem;
line-height: 1.25; line-height: 1.25;
@ -232,6 +238,10 @@ th {
background-color: var(--color-pink); background-color: var(--color-pink);
} }
th code {
color: var(--color-text); /* Yes, I actually do this somewhere */
}
th, td { th, td {
padding: .5rem; padding: .5rem;
text-align: left; text-align: left;

View File

@ -205,6 +205,7 @@ footer ul {
list-style: none; list-style: none;
gap: .5rem; gap: .5rem;
justify-content: center; justify-content: center;
margin: 0;
} }
footer li { footer li {
@ -238,16 +239,27 @@ footer a:focus-visible {
} }
/* Pagination */ /* Pagination */
.pagination,
.pagination li {
margin: 0;
}
.pagination { .pagination {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
grid-template-areas: "older newer"; grid-template-areas: "older newer";
list-style: none; list-style: none;
margin-top: 3rem;
} }
.pagination, @media (max-width: 650px) {
.pagination li { .post-pagination {
margin: 0; grid-template-columns: 1fr;
grid-template-areas:
"older"
"newer";
gap: .75rem;
}
} }
.pagination .older { .pagination .older {