diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-04-18 17:17:54 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-04-18 17:17:54 +0200 |
commit | 2ea473d3bd2d8bd8323c31f2355b5d427852e164 (patch) | |
tree | 648d9f212fe5badd061923524720f4c959578b11 /src/_mixin/menu.pug | |
parent | ef35a40059be533bfc66c39bfdfb6ba22c0a672f (diff) | |
download | site-2ea473d3bd2d8bd8323c31f2355b5d427852e164.tar.gz site-2ea473d3bd2d8bd8323c31f2355b5d427852e164.zip |
Rework website structure
Diffstat (limited to 'src/_mixin/menu.pug')
-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 |