From: Kai Moritz
Date: Sun, 14 Jun 2026 08:57:10 +0000 (+0000)
Subject: Navigation für About-Seiten ergänzt; off-Klassen-Logik korrigiert
X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=28e367915f43780a9c15a986445fee0cf5abf837;p=website
Navigation für About-Seiten ergänzt; off-Klassen-Logik korrigiert
BlogNav.astro: About-Eintrag in #submenu hinzugefügt. off-Logik der
Blog- und About-Sektion basiert jetzt auf den Hugo-Template-Quellen
(frontend-Branch):
- blogSectionOff = onAbout (aus tree.html: section-index blendet andere Sections aus)
- aboutOff = blogSelected (aus blog.html: alle Non-Blog-Sections immer off)
Auf Homepage und regulären Root-Seiten (Impressum, Datenschutz) sind
beide Sections sichtbar — wie in Hugo (Kind-/Geschwister-Logik).
about.html.astro, impressum.html.astro, datenschutz.html.astro:
menu-Slot mit BlogNav befüllt.
Co-Authored-By: Claude Sonnet 4.6
---
diff --git a/src/components/BlogNav.astro b/src/components/BlogNav.astro
index a4df2f6e..a75a4631 100644
--- a/src/components/BlogNav.astro
+++ b/src/components/BlogNav.astro
@@ -62,6 +62,7 @@ const onTagsIndex = currentUrl === '/blog/tags/';
const onTagTerm = currentUrl.startsWith('/tags/');
const blogSelected = onBlog || onArchive || onCategoriesIndex || onCategoryTerm || onTagsIndex || onTagTerm;
+const onAbout = currentUrl === '/about.html';
// Active state flags
const categoriesSelected = onCategoriesIndex || onCategoryTerm;
@@ -81,6 +82,13 @@ const activeSection = mainSections.find(s => {
return currentUrl.startsWith(s.url);
})?.name ?? '';
+// Hugo blog.html: Blog always visible on blog pages, all other sections always off.
+// Hugo default.html + tree.html: on Homepage/regular-root-pages all sections visible
+// (child/sibling logic); on About section-index only About visible, Blog off.
+// When Projects is implemented, extend both: blogSectionOff |= onProjects, aboutOff |= onProjects.
+const blogSectionOff = onAbout;
+const aboutOff = blogSelected;
+
// Determine active year from currentUrl
function isActiveYear(year: string) {
return currentUrl === `/blog/archive/${year}/` ||
@@ -109,7 +117,7 @@ const activeTagSlug = onTagTerm ? currentUrl.replace(/^\/tags\//, '').replace(/\
+ {/* About entry */}
+
+
+ {onAbout ? About : 'About'}
+
+
diff --git a/src/pages/about.html.astro b/src/pages/about.html.astro
index aeb3904e..8b9f125b 100644
--- a/src/pages/about.html.astro
+++ b/src/pages/about.html.astro
@@ -1,6 +1,7 @@
---
import BaseLayout from '../layouts/BaseLayout.astro';
import Breadcrumb from '../components/Breadcrumb.astro';
+import BlogNav from '../components/BlogNav.astro';
const crumbs = [
{ title: 'Home', url: '/' },
@@ -53,6 +54,10 @@ const crumbs = [
+
+
+
+
+
+
+
+
Impressum
Datenschutz
diff --git a/src/pages/impressum.html.astro b/src/pages/impressum.html.astro
index ed9c01b9..c762d42e 100644
--- a/src/pages/impressum.html.astro
+++ b/src/pages/impressum.html.astro
@@ -1,6 +1,7 @@
---
import BaseLayout from '../layouts/BaseLayout.astro';
import Breadcrumb from '../components/Breadcrumb.astro';
+import BlogNav from '../components/BlogNav.astro';
const crumbs = [
{ title: 'Home', url: '/' },
@@ -35,6 +36,10 @@ const crumbs = [
+
+
+
+
Impressum
Datenschutz