We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 518ff45 commit 1342d03Copy full SHA for 1342d03
core/templates/mixins/render-page-tree.pug
@@ -1,10 +1,11 @@
1
mixin renderPage(entry)
2
+ - var entryPath = entry.path.replace('.pug', '');
3
+ - var isActive = false
4
+ if pathname === entryPath || (entryPath && pathname.includes(entryPath))
5
+ - basePage = entry
6
+ if pathname === entryPath || (entryPath && pathname === entryPath)
7
+ - isActive = true
8
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;
9
li.br-tree-dir
10
a(href=entry.href, class=isActive ? 'br-bordered-list__link--active' : null)
11
= entry.name
0 commit comments