Created
January 5, 2022 05:16
-
-
Save jbfriedrich/2fce7de5c55ef781d405a92da8c55ee9 to your computer and use it in GitHub Desktop.
Revisions
-
jbfriedrich created this gist
Jan 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <!-- Loop through the navigation items --> {{ $currentPage := . }} {{ $menuitems := (.Site.Menus.main) }} {{ $len := (len $menuitems) }} {{ range $index, $element := $menuitems }} {{ $id := .Identifier }} <li class="header-nav-item"> <a class="header-nav-entry{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" title="{{ .Name }}" href="{{ .URL }}"> <span class="header-nav-entry-icon">{{ .Pre }}</span> <span class="header-nav-entry-text">{{ .Name }}</span> </a>{{ if ne (add $index 1) $len }} • {{ end }} </li> {{ end }}