diff options
| author | Dennis Fink | 2026-11-06 18:26:38 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-06 18:26:38 +0100 |
| commit | 2fc37fa4e2930e7c8603660301b1b0fe80a6c5a8 (patch) | |
| tree | ea4161a44bf0f12258f2fb8b84e28b5e28a330ff /assets | |
| parent | 3ccac9a70669db5cd9d83a1d05b02e0c43cf58c6 (diff) | |
| download | dennisfink.me-2fc37fa4e2930e7c8603660301b1b0fe80a6c5a8.tar.gz dennisfink.me-2fc37fa4e2930e7c8603660301b1b0fe80a6c5a8.zip | |
Add previous and next post navigation
This adds navigation links between adjacent blog posts, allowing readers
to continue browsing without returning to the blog index. The navigation
uses a responsive two-column layout and is excluded from Pagefind
indexing.
Diffstat (limited to '')
| -rw-r--r-- | assets/static/css/style.css | 59 |
1 files changed, 55 insertions, 4 deletions
diff --git a/assets/static/css/style.css b/assets/static/css/style.css index ec1318d..beb9cc3 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -687,7 +687,7 @@ article { clear: both; color: var(--dim-foreground); font-style: italic; - font-size: 1.2rem; + font-size: 0.75rem; line-height: 1.5; margin-top: 1.5rem; @@ -706,16 +706,20 @@ article { display: inline; max-inline-size: none; } + li:not(:first-child) { white-space: nowrap; } - .changelog { - font-size: 0.85rem; + li, + p { + font-size: 1.2rem; + } + .changelog { & > h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); - margin: 0 0 0.75rem; + margin: 1.5rem 0 0.75rem; } & > ul { @@ -727,6 +731,7 @@ article { display: grid; grid-template-columns: max-content 1fr; gap: 1rem; + font-size: 1.2rem; & + li { margin-top: 0.4rem; @@ -734,6 +739,7 @@ article { & > time { color: var(--dim-blue); + min-width: 11rem; } } } @@ -831,6 +837,51 @@ nav:is( /* ============================================================================= +POST NAVIGATION +============================================================================= +*/ +nav[aria-label="Post navigation"] { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 1.5rem; + margin-top: 1.5rem; + + a { + display: flex; + flex-direction: column; + gap: 0.25rem; + overflow-wrap: anywhere; + + &[rel="prev"] { + grid-column: 1; + } + + &[rel="next"] { + grid-column: 2; + text-align: right; + } + + small { + color: var(--dim-foreground); + font-size: 0.85rem; + } + + span { + font-size: clamp(1rem, 1.5vw, 1.2rem); + } + } + + @media (max-width: 500px) { + grid-template-columns: 1fr; + + a[rel="next"] { + grid-column: 1; + } + } +} + +/* +============================================================================= IMAGES ============================================================================= */ |
