Nouveau thème pour 2026
This commit is contained in:
26
themes/2026/layouts/_partials/breadcrumbs.html
Normal file
26
themes/2026/layouts/_partials/breadcrumbs.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- $page := . -}}
|
||||
{{- with .Page }}{{ $page = . }}{{ end -}}
|
||||
{{- $trail := slice -}}
|
||||
{{- if $page -}}
|
||||
{{- range $page.Ancestors.Reverse -}}
|
||||
{{- if ne .RelPermalink "/" -}}
|
||||
{{- $trail = $trail | append . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if eq $page.Kind "term" -}}
|
||||
{{- with site.GetPage "taxonomy" $page.Data.Plural -}}
|
||||
{{- if not (in $trail .) -}}
|
||||
{{- $trail = $trail | append . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt (len $trail) 0 -}}
|
||||
<nav class="breadcrumbs" aria-label="Fil d'Ariane">
|
||||
<ol>
|
||||
{{- range $trail -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ with .LinkTitle }}{{ . }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
||||
{{- end -}}
|
||||
</ol>
|
||||
</nav>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user