~maberger/maberger.com

ref: 23fb23a501783bb267d3db66e7f7e4737a55a14a maberger.com/layouts/partials/nav.html -rw-r--r-- 492 bytes
23fb23a5Mark Berger Remove target=_blank from links 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 }}" 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>