summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/breadcrumbs.html
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
commite77051ccc4b47951bfa4fde2be436b1bb2fb113b (patch)
treef0b75ee3521da9c8cd39dac4359212348f70e4e8 /themes/blowfish/layouts/partials/breadcrumbs.html
parent4b355837824ac2422d371acef790f0f4249255c7 (diff)
use https://github.com/nunocoracao/blowfish.git
Diffstat (limited to 'themes/blowfish/layouts/partials/breadcrumbs.html')
-rw-r--r--themes/blowfish/layouts/partials/breadcrumbs.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/breadcrumbs.html b/themes/blowfish/layouts/partials/breadcrumbs.html
new file mode 100644
index 0000000..848699b
--- /dev/null
+++ b/themes/blowfish/layouts/partials/breadcrumbs.html
@@ -0,0 +1,21 @@
+<ol class="text-sm text-neutral-500 dark:text-neutral-400 print:hidden">
+ {{ template "crumb" (dict "p1" . "p2" .) }}
+</ol>
+{{ define "crumb" }}
+ {{ if .p1.Parent }}
+ {{ template "crumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
+ {{ else if not .p1.IsHome }}
+ {{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
+ {{ end }}
+ <li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
+ <a
+ class="hover:underline decoration-neutral-300 dark:underline-neutral-600"
+ href="{{ .p1.RelPermalink }}"
+ >{{ if .p1.Title }}
+ {{- .p1.Title -}}
+ {{ else }}
+ {{- .p1.Section -}}
+ {{ end }}</a
+ ><span class="px-1 text-primary-500">/</span>
+ </li>
+{{ end }}