diff options
Diffstat (limited to 'src/_mixin')
-rw-r--r-- | src/_mixin/menu.pug | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/_mixin/menu.pug b/src/_mixin/menu.pug index 09794c6..462d06f 100644 --- a/src/_mixin/menu.pug +++ b/src/_mixin/menu.pug @@ -1,7 +1,13 @@ mixin menu(o) ul each val in o.children - - if (val.type == 'folder') + - if (val.type == 'folder' && val.tags.includes('document')) li - a(href=val.url)= val.nice_name + - if (val.tags.includes('has_index')) + a(href=val.url)= val.nice_name + - else + span= val.nice_name +menu(val) + - else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index')) + li + a(href=val.url)= val.nice_name |