documentation/layouts/partials/sidebar.html

37 lines
979 B
HTML

<a class='brand' href='/'>
<img class='link-logo' src='/brand.svg' alt='Mastodon' />
</a>
<div class='mascot'>
<img src='/elephant.svg' alt='' role='presentational' />
</div>
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.docs.ByWeight }}
{{ if .HasChildren }}
<li>
<a href="javascript:void(0)" class="menu-item{{ if $currentPage.HasMenuCurrent "docs" . }} active{{ end }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
<ul class="sub-menu{{ if $currentPage.HasMenuCurrent "docs" . }}{{else}} collapsed{{ end }}">
{{ range .Children }}
<li>
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ else }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>