sidebar.html 979 Bytes
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1 2 3 4 5 6 7 8 9 10
<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 := . }}
11
  {{ range .Site.Menus.docs.ByWeight }}
Eugen Rochko's avatar
Eugen Rochko committed
12 13
    {{ if .HasChildren }}
      <li>
14
        <a href="javascript:void(0)" class="menu-item{{ if $currentPage.HasMenuCurrent "docs" . }} active{{ end }}">
Eugen Rochko's avatar
Eugen Rochko committed
15 16 17 18
          {{ .Pre }}
          <span>{{ .Name }}</span>
        </a>

19
        <ul class="sub-menu{{ if $currentPage.HasMenuCurrent "docs" . }}{{else}} collapsed{{ end }}">
Eugen Rochko's avatar
Eugen Rochko committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
          {{ 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>