AngryPowman / hexo-theme-prontera

A light theme for Hexo: http://powman.org
MIT License
73 stars 20 forks source link

"selected" class on navigation #2

Open wldhg opened 6 years ago

wldhg commented 6 years ago

I wanted to display color bar under now-menu. But if now-page is not main page, color bar did not displayed.

So I resolved this problem with code below.

(Changing layout/partial/nav.jade)
(From)
- var act = !re.test(value) && "/"+page.current_url === value
(To)
- var act = !re.test(value) && ("/"+String(page.path).substring(0,String(page.path).indexOf("/")) == value)

Is this problem is intended?

AngryPowman commented 6 years ago

No, it's really a known bug I don't have time to solve. Please feel free to submit a pull request. :)

wldhg commented 6 years ago

I'll add many functions and fix several bugs until July, After complete whole task, I'll make a pull request XD