diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-10 12:27:42 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-10 12:27:42 +0200 |
| commit | 1f9cc1d578de130ca9433e00422bded017a75f29 (patch) | |
| tree | 7968ba5b92a22e3ac5d20c59238e7ab2ae155b4b | |
| parent | 9ba44135fb03e90e495bbe1190282016c391bd63 (diff) | |
| download | danixxyz-theme-1f9cc1d578de130ca9433e00422bded017a75f29.tar.gz danixxyz-theme-1f9cc1d578de130ca9433e00422bded017a75f29.zip | |
feat: conditionally show progress-bar only on single articles and pages
Hide progress-bar from:
- Homepage (.IsHome)
- Taxonomy/term pages (.Kind == "term" or "taxonomy")
- Section/list pages (.Kind == "section")
Show progress-bar only on:
- Single articles
- Single pages
This removes visual clutter from list pages while keeping the reading progress indicator for long-form content.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
| -rw-r--r-- | layouts/baseof.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/baseof.html b/layouts/baseof.html index 2e4d6c7..cdbb1e3 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -13,7 +13,9 @@ </head> <body> <a href="#main-content" class="skip-link">Skip to content</a> - <div class="progress-bar" id="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> + {{ if and (not .IsHome) (ne .Kind "term") (ne .Kind "taxonomy") (ne .Kind "section") }} + <div class="progress-bar" id="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> + {{ end }} {{ partial "header.html" . }} <main id="main-content">{{ block "main" . }}{{ end }}</main> <footer>{{ partial "footer.html" . }}</footer> |
