From 120ad0cdc11143fb6f184bcbca332dbf8a2114e8 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 28 Mar 2022 09:00:40 +0200 Subject: Improved bubble --- tpl/objects/bubble-group.pug | 2 +- tpl/objects/bubble.pug | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'tpl/objects') diff --git a/tpl/objects/bubble-group.pug b/tpl/objects/bubble-group.pug index 2b960f0..a1a8c00 100644 --- a/tpl/objects/bubble-group.pug +++ b/tpl/objects/bubble-group.pug @@ -10,6 +10,6 @@ mixin bubble-group(user) } section(class=classes) - .l-bubble-group__avatar + .l-bubble-group__avatar.u-sticky-top +avatar= user.slice(0, 2) block diff --git a/tpl/objects/bubble.pug b/tpl/objects/bubble.pug index 681661c..1e0df38 100644 --- a/tpl/objects/bubble.pug +++ b/tpl/objects/bubble.pug @@ -19,12 +19,17 @@ mixin bubble(user) classes[attributes.theme] = true } - article(class=classes) + let headerClasses = { + 'o-bubble__header': true, + 'u-mb-50': !attributes.compact, + } + + mixin content if slots.header - header.o-bubble__header + header(class=headerClasses) - slots.header() else if user - header.o-bubble__header + header(class=headerClasses) strong= user div.o-bubble__body.s-colored-links - slots.body() @@ -34,3 +39,13 @@ mixin bubble(user) if slots.footer footer.o-bubble__footer - slots.footer() + + article(class=classes) + if user && attributes.avatar + .l-card.l-card--flush.l-flex--align-start + .l-card__block.u-mt-50.u-sticky-top + +avatar= user.slice(0, 2) + .l-card__block.l-card__block--main + +content + else + +content -- cgit v1.2.3-70-g09d2