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

header.html « partials « layouts - github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c69ab36e8a9abc027ee5e849ed2f07076835831 (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
30
31
32
33
34
<nav class="UnderlineNav UnderlineNav--right px-2">
  <a class="UnderlineNav-actions muted-link h2" href="{{ .Site.BaseURL }}">
    {{ .Site.Title }}
  </a>

  {{ $currentPage := . }}
  {{ with .Site.Menus.main }}
  <div class="UnderlineNav-body">
    {{ range sort . }}
    {{ if .HasChildren }}
    <div class="flex-column position-relative dropdown" >
      {{ .Pre }}
      <span class="UnderlineNav-item {{ if $currentPage.HasMenuCurrent "main" . }}selected{{ end }}">{{ .Name }}</span>
      <div class="Box Box--condensed position-absolute dropdown-content ">
        {{ range .Children }}
        <div class="Box-body" style="">
          <a href="{{ .RelPermalink }}">
            {{ .Name }}
          </a>
        </div>
        {{ end }}
      </div>
    </div>
    {{ else }}
    <!-- .URL -->
    <a class="UnderlineNav-item {{ if $currentPage.IsMenuCurrent "main" . }}selected{{ end }}" href="{{ .URL }}">
      {{ .Pre }}
      <span>{{ .Name }}</span>
    </a>
    {{ end }}
    {{ end }}
  </div>
  {{ end }}
</nav>