aboutsummaryrefslogtreecommitdiff
path: root/src/_mixin
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-05-10 20:16:34 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-05-10 20:16:34 +0200
commit8063067f53d1a9370700d9b5ebfbc30a1b65e168 (patch)
treecc4d1b6e00213195e97c704a15b7fd518aaea3f4 /src/_mixin
parentc96f003767bed44b7362a0c6464d6c883964c347 (diff)
downloadsite-8063067f53d1a9370700d9b5ebfbc30a1b65e168.tar.gz
site-8063067f53d1a9370700d9b5ebfbc30a1b65e168.zip
Rework css
Diffstat (limited to 'src/_mixin')
-rw-r--r--src/_mixin/menu.pug8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/_mixin/menu.pug b/src/_mixin/menu.pug
index 462d06f..037b1aa 100644
--- a/src/_mixin/menu.pug
+++ b/src/_mixin/menu.pug
@@ -1,13 +1,13 @@
-mixin menu(o)
+mixin menu(o, element)
ul
each val in o.children
- if (val.type == 'folder' && val.tags.includes('document'))
li
- if (val.tags.includes('has_index'))
- a(href=val.url)= val.nice_name
+ a(href=val.url, class=val.index.url == element.url ? 'selected' : null)= val.nice_name
- else
span= val.nice_name
- +menu(val)
+ +menu(val, element)
- else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index'))
li
- a(href=val.url)= val.nice_name
+ a(href=val.url, class=val.url == element.url ? 'selected' : null)= val.nice_name