From 0cd81a322b92ede51d0da1f8227a3828f08eebdf Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 8 Feb 2022 10:52:55 +0100 Subject: Improved action menu --- tpl/objects/action-menu.pug | 11 +++++++++++ tpl/objects/avatar.pug | 7 +++++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'tpl/objects') diff --git a/tpl/objects/action-menu.pug b/tpl/objects/action-menu.pug index 0f690ce..55ceacb 100644 --- a/tpl/objects/action-menu.pug +++ b/tpl/objects/action-menu.pug @@ -30,3 +30,14 @@ mixin action-menu-item mixin action-menu-separator .o-action-menu__separator + +mixin action-menu-slot + - + let classes = { + 'o-action-menu__slot ': true, + } + if (attributes.class) { + classes[attributes.class] = true; + } + div(class=classes) + block diff --git a/tpl/objects/avatar.pug b/tpl/objects/avatar.pug index 83c0f7c..16de7c5 100644 --- a/tpl/objects/avatar.pug +++ b/tpl/objects/avatar.pug @@ -4,9 +4,12 @@ mixin avatar - let classes = { 'o-avatar': true, - 'o-avatar--circle': attributes.circle + 'o-avatar--circle': attributes.circle, + 'u-db': attributes.block + } + if (attributes.class) { + classes[attributes.class] = true; } - if (attributes.size) { classes['o-avatar--' + attributes.size] = true; } -- cgit v1.2.3-70-g09d2