From 455b5bf0a8cfba658446cc6f3fd2c5964b45d507 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 15 Apr 2026 23:39:11 +0200 Subject: Implement article type colors, reading progress bar, and optimize layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add colored type pills to article list items (overlay on thumbnails, top-right) - Add type accent corner (L-shaped) to single article headers with colored pill badge in metadata - Implement smooth reading progress bar at viewport top (violet→green gradient) - Progress bar only appears on single pages/articles, not on lists or homepage - Constrain article width to max-w-7xl for comfortable reading with side gutters - Use CSS variables for all colors to support dark/light theme switching - Add reading-progress.js with requestAnimationFrame throttling for performance - Update HANDOFF.md with current progress Co-Authored-By: Claude Haiku 4.5 --- .../danix-xyz-hacker/layouts/_default/baseof.html | 14 +++++++ .../danix-xyz-hacker/layouts/_default/single.html | 2 +- .../danix-xyz-hacker/layouts/articles/single.html | 2 +- .../layouts/partials/article-header.html | 43 ++++++++++++++++------ .../layouts/partials/article-list-item.html | 20 +++++----- 5 files changed, 57 insertions(+), 24 deletions(-) (limited to 'themes/danix-xyz-hacker/layouts') diff --git a/themes/danix-xyz-hacker/layouts/_default/baseof.html b/themes/danix-xyz-hacker/layouts/_default/baseof.html index 2849562..7e8338a 100644 --- a/themes/danix-xyz-hacker/layouts/_default/baseof.html +++ b/themes/danix-xyz-hacker/layouts/_default/baseof.html @@ -28,6 +28,14 @@ + + {{ if eq .Kind "page" }} +
+ {{ end }} {{ i18n "skipToContent" }} @@ -79,5 +87,11 @@ {{ $contactScript := resources.Get "js/contact-form.js" | minify }} + + + {{ if eq .Kind "page" }} + {{ $progressScript := resources.Get "js/reading-progress.js" | minify }} + + {{ end }} diff --git a/themes/danix-xyz-hacker/layouts/_default/single.html b/themes/danix-xyz-hacker/layouts/_default/single.html index 60cf03d..16d519f 100644 --- a/themes/danix-xyz-hacker/layouts/_default/single.html +++ b/themes/danix-xyz-hacker/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }}
-
+
diff --git a/themes/danix-xyz-hacker/layouts/articles/single.html b/themes/danix-xyz-hacker/layouts/articles/single.html index c5d51e7..93abdb6 100644 --- a/themes/danix-xyz-hacker/layouts/articles/single.html +++ b/themes/danix-xyz-hacker/layouts/articles/single.html @@ -2,7 +2,7 @@ {{ $articleType := .Params.type | default "life" }} {{ $template := printf "article-types/%s.html" $articleType }}
-