Skip to content

Commit aa3f0cc

Browse files
author
pinggod
authored
Merge pull request #30 from cheng1999/master
menu items highlighting
2 parents 873899e + 5c40910 commit aa3f0cc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

layout/partial/nav.jade

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ ul.nav.nav-list
33
li.nav-list-item
44
- var re = /^(http|https):\/\/*/gi;
55
- var tar = re.test(value) ? "_blank" : "_self"
6-
a.nav-list-link(class={active: is_home() && value === "/"} href=value target=tar)
7-
!= key.toUpperCase()
6+
- var act = !re.test(value) && "/"+page.current_url === value
7+
a.nav-list-link(class={active: act} href=value target=tar)
8+
!= key.toUpperCase()

0 commit comments

Comments
 (0)