theme: use disabled anchor for last bread crumb #84

because otherwise Hugo will not generate a relative URL for the itemprop value
This commit is contained in:
Sören Weber 2021-09-10 01:08:39 +02:00
parent 03db2cc387
commit 87a86876e9
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
2 changed files with 15 additions and 13 deletions

View file

@ -108,19 +108,13 @@
{{ if $parent }}
{{ template "breadcrumb" dict "page" $parent "depth" $depth }}
{{end}}
{{ if .depth }}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
<meta itemprop="position" content="{{ $depth }}" />
<a itemprop="item" href="{{ .page.RelPermalink }}">
<a itemprop="item" href="{{ .page.RelPermalink }}"{{if not .depth}} aria-disabled="true"{{end}}>
<span itemprop="name">{{ .page.Title }}</span>
</a>
</li> >
{{else}}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
<meta itemprop="position" content="{{ $depth }}" />
<data itemprop="item" value="{{ .page.RelPermalink }}">
<span itemprop="name">{{ .page.Title }}</span>
</data>
</li>
{{ if .depth }}
>
{{end}}
{{end}}

View file

@ -1015,6 +1015,14 @@ td {
#body #breadcrumbs .links meta {
display: none;
}
#body #breadcrumbs .links li:last-of-type {
cursor: text;
}
a[aria-disabled="true"] {
color: inherit;
pointer-events: none;
text-decoration: none;
}
@media only all and (max-width: 59.938em) {
#sidebar {
width: 230px;