congo/layouts/partials/breadcrumbs.html

18 lines
618 B
HTML
Raw Permalink Normal View History

<ol class="text-sm text-neutral-500 dark:text-neutral-400">
2021-08-18 00:08:06 +00:00
{{ 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
2021-08-20 07:02:08 +00:00
class="hover:underline hover:underline-neutral-300 dark:underline-neutral-600"
href="{{ .p1.RelPermalink }}"
>{{ .p1.Title }}</a
><span class="px-1 text-primary-500">/</span>
2021-08-18 00:08:06 +00:00
</li>
{{ end }}