Skip to content

Commit 7f82cfb

Browse files
committed
Missed round two
1 parent 67c16b6 commit 7f82cfb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

themes/lugo/layouts/partials/nav.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<div id="nav">
22
{{ $currentPage := . }}
3-
{{ range .Site.Menus.nav }}
4-
<a class="navbar-item {{ if eq .URL $currentPage.RelPermalink }} is-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a> |
3+
{{ $len := (len .Site.Menus.nav) }}
4+
{{ range $index, $element := .Site.Menus.nav }}
5+
<a class="navbar-item {{ if eq .URL $currentPage.RelPermalink }} is-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a>
6+
{{ if eq (add $index 1) $len }}
7+
{{else}}
8+
|
9+
{{end}}
510
{{ end }}
611
</div>

0 commit comments

Comments
 (0)