hugo-theme-paradox/layouts/partials/breadcrumbs.html

16 lines
464 B
HTML
Raw Normal View History

2022-10-14 08:36:35 +00:00
<ul class="breadcrumbs">
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
</ul>
{{ define "breadcrumb" }}
{{ if .p1.Parent }}
{{ template "breadcrumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
2022-12-19 15:10:26 +00:00
{{ if not .p1.IsHome }}
2022-10-14 08:36:35 +00:00
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
<a href="{{ .p1.RelPermalink }}">{{ .p1.Title }}</a>
</li>
2022-12-19 15:10:26 +00:00
{{ end }}
2022-10-14 08:36:35 +00:00
{{ end }}