From 8063067f53d1a9370700d9b5ebfbc30a1b65e168 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 10 May 2020 20:16:34 +0200 Subject: Rework css --- src/_mixin/menu.pug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/_mixin') 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 -- cgit v1.2.3