From 525bf8c56a3cdc4d5ec548f3b3b804a34d7dcc85 Mon Sep 17 00:00:00 2001 From: fukunee Date: Thu, 14 May 2026 02:40:30 +0800 Subject: [PATCH] Add breadcrumb partial for page navigation --- assets/css/custom.css | 2 ++ layouts/_partials/breadcrumb.html | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 layouts/_partials/breadcrumb.html diff --git a/assets/css/custom.css b/assets/css/custom.css index 497e910..1429647 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -101,3 +101,5 @@ html.dark .theme-toggle-light { .dark #typewriter-text::after { background: #ccc; } + +/* Hide current page title in breadcrumb */ diff --git a/layouts/_partials/breadcrumb.html b/layouts/_partials/breadcrumb.html new file mode 100644 index 0000000..0931ff4 --- /dev/null +++ b/layouts/_partials/breadcrumb.html @@ -0,0 +1,14 @@ +{{- $page := .page -}} +{{- $enable := .enable -}} +{{- if (default $enable $page.Params.breadcrumbs) -}} +
+ {{- range $page.Ancestors.Reverse }} + {{- if not .IsHome }} + + {{- partial "utils/icon.html" (dict "name" "chevron-right" "attributes" "class=\"hx:w-3.5 hx:shrink-0 hx:rtl:-rotate-180\"") -}} + {{ end -}} + {{ end -}} +
+{{ end -}}