From: Kai Moritz Date: Sun, 14 Jun 2026 10:18:43 +0000 (+0000) Subject: BlogNav: Categories/Tags-Unterseiten auch auf Index-Seite anzeigen X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=9dc1fb149d0d30d6ef984827ecbe90d3470cd45f;p=website BlogNav: Categories/Tags-Unterseiten auch auf Index-Seite anzeigen sub-Klasse und aktive ul wurden nur bei onCategoryTerm/onTagTerm gesetzt, nicht auf /blog/categories/ bzw. /blog/tags/ selbst. Fix: categoriesSelected bzw. tagsSelected als einheitliche Bedingung (Index || Term). Co-Authored-By: Claude Sonnet 4.6 --- diff --git a/src/components/BlogNav.astro b/src/components/BlogNav.astro index f6d2022a..c489209c 100644 --- a/src/components/BlogNav.astro +++ b/src/components/BlogNav.astro @@ -210,11 +210,11 @@ const activeTagSlug = onTagTerm ? currentUrl.replace(/^\/tags\//, '').repl {/* Categories subtree */} {categories.length > 0 && ( -
  • +
  • {categoriesSelected ? Categories : 'Categories'} - {onCategoryTerm && ( + {categoriesSelected ? (
      {categories.map(cat => { const active = cat.name === activeCatSlug; @@ -227,8 +227,7 @@ const activeTagSlug = onTagTerm ? currentUrl.replace(/^\/tags\//, '').repl ); })}
    - )} - {!onCategoriesIndex && !onCategoryTerm && ( + ) : (
      {categories.map(cat => (
    • +
    • {tagsSelected ? Tags : 'Tags'} - {onTagTerm && ( + {tagsSelected ? (
        {tags.map(tag => { const active = tag.name === activeTagSlug; @@ -258,8 +257,7 @@ const activeTagSlug = onTagTerm ? currentUrl.replace(/^\/tags\//, '').repl ); })}
      - )} - {!onTagsIndex && !onTagTerm && ( + ) : (
        {tags.map(tag => (