diff options
| author | Volpeon <git@volpeon.ink> | 2022-03-28 09:00:40 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-03-28 09:00:40 +0200 |
| commit | 120ad0cdc11143fb6f184bcbca332dbf8a2114e8 (patch) | |
| tree | b25fbe77ac51d99d20e09be6308af718df5d174f /tpl/objects/bubble.pug | |
| parent | Improved bubbles (diff) | |
| download | iro-design-120ad0cdc11143fb6f184bcbca332dbf8a2114e8.tar.gz iro-design-120ad0cdc11143fb6f184bcbca332dbf8a2114e8.tar.bz2 iro-design-120ad0cdc11143fb6f184bcbca332dbf8a2114e8.zip | |
Improved bubble
Diffstat (limited to 'tpl/objects/bubble.pug')
| -rw-r--r-- | tpl/objects/bubble.pug | 21 |
1 files changed, 18 insertions, 3 deletions
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) | |||
| 19 | classes[attributes.theme] = true | 19 | classes[attributes.theme] = true |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | article(class=classes) | 22 | let headerClasses = { |
| 23 | 'o-bubble__header': true, | ||
| 24 | 'u-mb-50': !attributes.compact, | ||
| 25 | } | ||
| 26 | |||
| 27 | mixin content | ||
| 23 | if slots.header | 28 | if slots.header |
| 24 | header.o-bubble__header | 29 | header(class=headerClasses) |
| 25 | - slots.header() | 30 | - slots.header() |
| 26 | else if user | 31 | else if user |
| 27 | header.o-bubble__header | 32 | header(class=headerClasses) |
| 28 | strong= user | 33 | strong= user |
| 29 | div.o-bubble__body.s-colored-links | 34 | div.o-bubble__body.s-colored-links |
| 30 | - slots.body() | 35 | - slots.body() |
| @@ -34,3 +39,13 @@ mixin bubble(user) | |||
| 34 | if slots.footer | 39 | if slots.footer |
| 35 | footer.o-bubble__footer | 40 | footer.o-bubble__footer |
| 36 | - slots.footer() | 41 | - slots.footer() |
| 42 | |||
| 43 | article(class=classes) | ||
| 44 | if user && attributes.avatar | ||
| 45 | .l-card.l-card--flush.l-flex--align-start | ||
| 46 | .l-card__block.u-mt-50.u-sticky-top | ||
| 47 | +avatar= user.slice(0, 2) | ||
| 48 | .l-card__block.l-card__block--main | ||
| 49 | +content | ||
| 50 | else | ||
| 51 | +content | ||
