summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-16 15:29:38 +0200
committerDanilo M. <danix@danix.xyz>2026-04-16 15:29:38 +0200
commit3e686b23a364be655eda344940e7455cbce379e9 (patch)
treee63d9fca34097a43c3f82587ee912abe5848566b /themes/danix-xyz-hacker/layouts
parent15471cdd66966ec394f3b4c1614cac00b0261e59 (diff)
downloaddanixxyz-3e686b23a364be655eda344940e7455cbce379e9.tar.gz
danixxyz-3e686b23a364be655eda344940e7455cbce379e9.zip
feat: add breadcrumb navigation component
- Create breadcrumb.html partial with Home > Articles > Title structure - Support both English and Italian language versions - Add breadcrumb and breadcrumb-separator CSS classes - Integrate breadcrumb into article detail pages - Rebuild CSS: main.min.css updated Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes/danix-xyz-hacker/layouts')
-rw-r--r--themes/danix-xyz-hacker/layouts/articles/single.html3
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/breadcrumb.html20
2 files changed, 23 insertions, 0 deletions
diff --git a/themes/danix-xyz-hacker/layouts/articles/single.html b/themes/danix-xyz-hacker/layouts/articles/single.html
index fe2ff6e..4e97fb3 100644
--- a/themes/danix-xyz-hacker/layouts/articles/single.html
+++ b/themes/danix-xyz-hacker/layouts/articles/single.html
@@ -5,6 +5,9 @@
<div class="grid md:grid-cols-3 gap-8 max-w-7xl mx-auto content-grid">
<!-- Article section -->
<div class="md:col-span-2">
+ <!-- Breadcrumb -->
+ {{ partial "breadcrumb.html" . }}
+
<!-- Article header -->
{{ partial "article-header.html" . }}
diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
new file mode 100644
index 0000000..f2f794f
--- /dev/null
+++ b/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
@@ -0,0 +1,20 @@
+<nav class="breadcrumb mb-6" aria-label="Breadcrumb">
+ {{ $currentLang := .Page.Language }}
+
+ <!-- Home link -->
+ <a href="/">Home</a>
+ <span class="breadcrumb-separator">/</span>
+
+ <!-- Articles section -->
+ {{ if eq .Page.Type "article" }}
+ {{ if eq $currentLang "it" }}
+ <a href="/it/articles/">{{ i18n "articles" }}</a>
+ {{ else }}
+ <a href="/articles/">{{ i18n "articles" }}</a>
+ {{ end }}
+ <span class="breadcrumb-separator">/</span>
+
+ <!-- Current article title -->
+ <span>{{ .Page.Title }}</span>
+ {{ end }}
+</nav>