about summary refs log tree commit diff
path: root/users/fcuny/blog/layouts/partials/header.html
blob: 508e25906dc82816a6261548013aea4fe6df7d2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<header>
  <nav class='menu'>
    <a href="{{ .Site.Home.Permalink }}">{{ .Site.Home.Title }}</a>
    <ul>
      {{ $currentPage := . }}
      {{ range .Site.Menus.main }}
      <li>
        <a class='{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}menu-active{{ end }}' href="{{ absURL .URL }}">
          {{ .Title }}
        </a>
      </li>
      {{ end }}
    </ul>
  </nav>
</header>