diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-12-28 20:58:09 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-12-28 20:58:09 +0200 |
| commit | a8e90254b6f2637e4a44908787d8c948d4eb2b38 (patch) | |
| tree | 7954708c784bd5a86d1c1f07219c400644748374 | |
| parent | f6215e55d7499d6cc3a3737cfb753f08ce1d4b45 (diff) | |
Improve post links
| -rw-r--r-- | main.scm | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -102,26 +102,10 @@ "</a>")) (define (nav-html prev next) - ;; `prev` and `next` here refer to chronological neighbors: - ;; - prev = older post - ;; - next = newer post - ;; Render with chevrons and align prev to the left, next to the right. - (define prev-html - (if prev - (nav-link "post-nav-prev" "‹" #f prev) - "")) - (define next-html - (if next - (nav-link "post-nav-next" #f "›" next) - "")) (string-append "<nav class=\"post-nav\" aria-label=\"Post navigation\">" - "<div class=\"post-nav-left\">" - prev-html - "</div>" - "<div class=\"post-nav-right\">" - next-html - "</div>" + (if prev (string-append "<div class=\"post-nav-left\">" (nav-link "post-nav-prev" "‹" #f prev) "</div>") "") + (if next (string-append "<div class=\"post-nav-right\">" (nav-link "post-nav-next" "›" #f next) "</div>") "") "</nav>")) (define (patch-file path nav) |
