~maberger/maberger.com

ref: 53b347ad9aae124efd1c54fd4181b3f004df91dd maberger.com/layouts/partials/nav.html -rw-r--r-- 508 bytes
53b347adMark Berger Fix build YAML 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<nav aria-label="Primary Navigation">
  <ul>
    {{ $currentPage := . }}
    {{ range .Site.Menus.main }}
    <li>
      {{ if hasPrefix .URL "http" }}
      <a href="{{ .URL }}" title="{{ .Title }}" target="_blank" rel="nofollow noopener noreferrer">
        {{- .Name -}}
      </a>
      {{ else }}
      <a href="{{ .URL }}" title="{{ .Title }}" class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
        {{- .Name -}}
      </a>
      {{ end }}
    </li>
    {{ end }}
  </ul>
</nav>