Skip to content

Commit

Permalink
Breadcrumbs: restore Aria attribute and link (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 24, 2022
1 parent ecd4be8 commit 1aa065f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions layouts/partials/breadcrumb.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) -}}
{{ end -}}
{{ $isActive := eq .p1 .p2 }}
<li class="breadcrumb-item{{ if $isActive }} active{{ end }}">
{{- if $isActive }}
<span>{{ .p1.LinkTitle }}</span>
{{ else -}}
<a href="{{ .p1.Permalink }}">{{ .p1.LinkTitle }}</a>
{{ end -}}
<li class="breadcrumb-item{{ if $isActive }} active{{ end }}"
{{- if $isActive }} aria-current="page"{{ end }}>
<a href="{{ .p1.Permalink }}"
{{- if $isActive }} aria-disabled="true" class="btn-link disabled"{{ end -}}
>
{{- .p1.LinkTitle -}}
</a>
</li>
{{- end -}}

0 comments on commit 1aa065f

Please sign in to comment.