mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
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:
parent
03db2cc387
commit
87a86876e9
2 changed files with 15 additions and 13 deletions
|
@ -108,19 +108,13 @@
|
||||||
{{ if $parent }}
|
{{ if $parent }}
|
||||||
{{ template "breadcrumb" dict "page" $parent "depth" $depth }}
|
{{ template "breadcrumb" dict "page" $parent "depth" $depth }}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ if .depth }}
|
|
||||||
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
|
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
|
||||||
<meta itemprop="position" content="{{ $depth }}" />
|
<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>
|
<span itemprop="name">{{ .page.Title }}</span>
|
||||||
</a>
|
</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>
|
</li>
|
||||||
|
{{ if .depth }}
|
||||||
|
>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1015,6 +1015,14 @@ td {
|
||||||
#body #breadcrumbs .links meta {
|
#body #breadcrumbs .links meta {
|
||||||
display: none;
|
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) {
|
@media only all and (max-width: 59.938em) {
|
||||||
#sidebar {
|
#sidebar {
|
||||||
width: 230px;
|
width: 230px;
|
||||||
|
|
Loading…
Reference in a new issue