mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
{{- if (gt (len .Ancestors.Reverse) 1) | and (eq .Site.Params.breadcrumb.enable true) -}}
|
|
<nav aria-label="breadcrumb" class="breadcrumb-container{{ if .Site.Params.breadcrumb.sticky }} sticky{{ end }}">
|
|
<ol class="breadcrumb">
|
|
{{- range .Ancestors.Reverse -}}
|
|
{{- if .IsHome | and (not .Site.Params.breadcrumb.showHome) -}}
|
|
{{- continue -}}
|
|
{{- end -}}
|
|
|
|
{{- $title := "" -}}
|
|
{{- with .Description -}}
|
|
{{- $title = . -}}
|
|
{{- else -}}
|
|
{{- $title = title .LinkTitle -}}
|
|
{{- if .IsPage | and .Summary -}}
|
|
{{- $title = .Summary -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- $innerText := "" -}}
|
|
{{- if .IsHome -}}
|
|
{{- $innerText = T "single.home" -}}
|
|
{{- else -}}
|
|
{{- $innerText = ((T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle) | title -}}
|
|
{{- end -}}
|
|
|
|
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $innerText }}</a></li>
|
|
{{- end -}}
|
|
|
|
<li class="breadcrumb-item active" aria-current="page">{{ (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle | title }}</li>
|
|
</ol>
|
|
</nav>
|
|
{{- end -}}
|