From 05f33a6e1059e84c309c5f674e094ed3b1105134 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 18 Apr 2026 20:54:50 +0200 Subject: feat: add prev/next article navigation with shell prompt style Add top and bottom navigation between sequential articles with hacker aesthetic: - Top nav: [visitor@danix.xyz articles]$ cd - Bottom nav: [visitor@danix.xyz articles]$ ls ../ - Missing link shows dimmed placeholder (beginning/end) - Only renders on articles, not static pages - New partial: article-nav.html - Styling: monospace prompt in accent color, hover links with transition Co-Authored-By: Claude Haiku 4.5 --- .../layouts/partials/article-nav.html | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 themes/danix-xyz-hacker/layouts/partials/article-nav.html (limited to 'themes/danix-xyz-hacker/layouts/partials/article-nav.html') diff --git a/themes/danix-xyz-hacker/layouts/partials/article-nav.html b/themes/danix-xyz-hacker/layouts/partials/article-nav.html new file mode 100644 index 0000000..d7f8ca3 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/partials/article-nav.html @@ -0,0 +1,46 @@ +{{ $page := .page }} +{{ $variant := .variant | default "bottom" }} +{{ $prev := $page.PrevInSection }} +{{ $next := $page.NextInSection }} + +{{/* Shell prompt command varies by position */}} +{{ $cmd := "ls ../" }} +{{ if eq $variant "top" }} + {{ $cmd = "cd" }} +{{ end }} + + -- cgit v1.2.3