Skip to content

Commit 2e30852

Browse files
committed
Add is-active highlighting to navbar menu
Signed-off-by: lucperkins <[email protected]>
1 parent 8e2154a commit 2e30852

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ weight = 5
142142

143143
[[menu.main]]
144144
name = "News"
145-
url = "/news"
145+
url = "/news/"
146146
weight = 4
147147

148148
[[menu.main]]
149149
name = "Contact"
150-
url = "/contact"
150+
url = "/contact/"
151151
weight = 5

layouts/partials/navbar-menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</div>
2727
</div>
2828
{{ else }}
29-
<a class="navbar-item has-text-weight-bold" href="{{ .URL }}"{{ if $isExternal }} target="_blank"{{ end }}>
29+
<a class="navbar-item has-text-weight-bold{{ if $isHere }} is-active{{ end }}" href="{{ .URL }}"{{ if $isExternal }} target="_blank"{{ end }}>
3030
{{ .Name }}
3131
</a>
3232
{{ end }}

0 commit comments

Comments
 (0)