From: Danilo M. Date: Tue, 21 Apr 2026 16:28:55 +0000 (+0200) Subject: fix: hide post-type badge and accents on static pages X-Git-Tag: release_22042026-1342~35 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=8e16e9f4665f2537225f1d21668c6a8002745770;p=danix.xyz-2.git fix: hide post-type badge and accents on static pages Only show type badge, vertical accent line, and horizontal accent line on articles with explicit type front matter. Static pages (is/ section) no longer display the "Life" default badge. Updated badge styling to use inline background-color with full type color variable, matching card overlay appearance. Co-Authored-By: Claude Haiku 4.5 --- diff --git a/TODO.md b/TODO.md index 1707a09..41698e1 100644 --- a/TODO.md +++ b/TODO.md @@ -18,6 +18,7 @@ - [✅] add back-to-top button - [✅] Lazy loading articles in list view - [✅] modify articles list view to be more of a timeline (line in middle, articles on sides) +- [✅] remove article type labels from static pages - [ ] Progressive enhancement (offline support) - [⏳] Create accessibility badges component (WCAG 2.1 AA, Keyboard Accessible, Screen Reader Compatible) - [ ] Add badges to footer with links to A11Y-AUDIT-REPORT.md diff --git a/themes/danix-xyz-hacker/layouts/partials/article-header.html b/themes/danix-xyz-hacker/layouts/partials/article-header.html index 16ebb8c..63b2a97 100644 --- a/themes/danix-xyz-hacker/layouts/partials/article-header.html +++ b/themes/danix-xyz-hacker/layouts/partials/article-header.html @@ -1,12 +1,13 @@ {{ $articleType := .Params.type | default "life" }} {{ $typeConfig := .Site.Params.articleTypes }} {{ $typeData := index $typeConfig $articleType }} +{{ $hasType := .Params.type }}
- {{ if $typeData }} + {{ if and $typeData $hasType }}
- {{ if $typeData }} + {{ if and $typeData $hasType }}
- {{ if $typeData }} - + {{ if and $typeData $hasType }} + {{ i18n $articleType }} {{ end }}