Welcome to mirror list, hosted at ThFree Co, Russian Federation.

nav.html « partials « layouts - github.com/rhnvrm/bodhi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f949d80cdf4c084035e6f77fde58f3bf196120cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<div id="nav">
  {{- $currentPage := . -}}
  
  {{ range .Site.Menus.nav }}
  {{ $menuentry := . }}
  {{ $menuPage := $.Site.GetPage $menuentry.URL }}
  <ul>
    <li>
      {{ if eq $currentPage $menuPage }}<b>{{ end }}
        <a href="{{.URL | relURL }}">
          <span>{{ .Name }} {{ if .Children }}/{{ end }}</span>
        </a>
      {{ if eq $currentPage $menuPage }}</b>{{ end }}

      {{ range .Children }}
        {{ $menuChildPage := $.Site.GetPage .URL }}

        <ul>
          <li>
            {{ if eq $currentPage $menuChildPage }}<b>{{ end }}
              <a href="{{ .URL | relURL }}">{{ .Name }}</a>
            {{ if eq $currentPage $menuChildPage }}</b>{{ end }}
          </li>
        </ul>
      {{ end }}
    </li>
  </ul>
  {{ end }}
</div>