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

navbar_items.html « partials « layouts - github.com/geschke/hugo-tikva.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c4cd794776f68b9e7a008cd047aff4679621a1e (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
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
  {{ if .HasChildren }}
  <li class="nav-item dropdown {{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
    <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true"
      aria-expanded="false">
      {{ .Pre }}
      {{ .Name }}
    </a>
    <div class="sub-menu dropdown-menu" aria-labelledby="navbarDropdown">
      {{ range .Children }}

      <a class="dropdown-item" href="{{ .URL }}">{{ .Name }}</a>
      {{ end }}
    </div>
  </li>
  <span class="mx-2"></span>
  {{ else }}
  <li class="nav-item {{ if eq $currentPage.URL .URL }}active{{ end }}">
    <a class="nav-link" href="{{ .URL }}">
      {{ .Pre }}
      {{ .Name }}
    </a>
  </li>
  <span class="mx-2"></span>
  {{ end }}
{{ end }}