Implement LinkTitle in menus, making it easy to set in frontmatter.
This commit is contained in:
parent
18e40b4ad6
commit
608936b748
4 changed files with 9 additions and 9 deletions
|
|
@ -31,9 +31,9 @@ figcaption {
|
|||
// Apply heading font stack and colour to labels etc.
|
||||
|
||||
th,
|
||||
nav,
|
||||
label,
|
||||
legend,
|
||||
.main-menu,
|
||||
.header,
|
||||
.footer {
|
||||
color: var(--color-headings);
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
||||
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
|
||||
{{ range where site.RegularPages "Section" "" -}}
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
{{ range site.Sections -}}
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
|
||||
{{ end -}}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@
|
|||
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
||||
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
|
||||
{{ range where site.RegularPages "Section" "" -}}
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
{{ range site.Sections -}}
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
|
||||
{{ end -}}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
|
||||
<aside class="sidebar layout__second-sidebar">
|
||||
{{ range site.Sections -}}
|
||||
<section class="menu">
|
||||
<p class="title"><strong><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></strong></p>
|
||||
<nav class="menu">
|
||||
<p class="title"><strong><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></strong></p>
|
||||
<ul>
|
||||
{{ range .Pages -}}
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
|
||||
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
{{ end -}}
|
||||
</aside>
|
||||
|
|
|
|||
Loading…
Reference in a new issue