documentation/layouts/partials/sidebar.html

37 lines
1.1 KiB
HTML

<a class="brand" href="/">
<img class="link-logo" src="{{ relURL "brand.svg" }}" alt="Mastodon" />
</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 }}
{{ if .HasChildren }}
<ul class="sub-menu">
{{ 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 }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>