Skip to content

Commit

Permalink
Fixes #408 and also #178 - but afraid it will cause the same issue as #…
Browse files Browse the repository at this point in the history
…178 in deploy, needs more testing
  • Loading branch information
Wolfr committed Nov 16, 2021
1 parent 518ff45 commit 1342d03
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/templates/mixins/render-page-tree.pug
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
mixin renderPage(entry)
- var entryPath = entry.path.replace('.pug', '');
- var isActive = false
if pathname === entryPath || (entryPath && pathname.includes(entryPath))
- basePage = entry
if pathname === entryPath || (entryPath && pathname === entryPath)
- isActive = true
if !entry.path.includes('--')
- var entryPath = entry.path.replace('.pug', '');
- var isActive = false;
if pathname === entryPath || (entryPath && pathname.includes(entryPath)) || (pathname === '' && entryPath === 'index')
- basePage = entry;
- isActive = true;
li.br-tree-dir
a(href=entry.href, class=isActive ? 'br-bordered-list__link--active' : null)
= entry.name
Expand Down

0 comments on commit 1342d03

Please sign in to comment.