documentation/layouts/partials/sidebar.html

37 lines
1.1 KiB
HTML
Raw Normal View History

<a class="brand" href="/">
<img class="link-logo" src="{{ relURL "brand.svg" }}" alt="Mastodon" />
2018-09-23 00:14:25 +02:00
</a>
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.docs.ByWeight }}
<li>
{{ if .Page }}
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
{{ else }}
<span class="sub-title">{{ .Name }}</span>
{{ end }}
2018-09-23 00:14:25 +02:00
{{ if .HasChildren }}
<ul class="sub-menu">
2018-09-23 00:14:25 +02:00
{{ range .Children }}
<li>
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="sub-menu">
{{ range .Children }}
<li>
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ end }}
2018-09-23 00:14:25 +02:00
</li>
{{ end }}
</ul>
{{ end }}
</li>
2018-09-23 00:14:25 +02:00
{{ end }}
</ul>