mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +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 }}
|
||||
{{ template "breadcrumb" dict "page" $parent "depth" $depth }}
|
||||
{{end}}
|
||||
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
|
||||
<meta itemprop="position" content="{{ $depth }}" />
|
||||
<a itemprop="item" href="{{ .page.RelPermalink }}"{{if not .depth}} aria-disabled="true"{{end}}>
|
||||
<span itemprop="name">{{ .page.Title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ if .depth }}
|
||||
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">
|
||||
<meta itemprop="position" content="{{ $depth }}" />
|
||||
<a itemprop="item" href="{{ .page.RelPermalink }}">
|
||||
<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>
|
||||
>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue