diff options
| author | Volpeon <git@volpeon.ink> | 2023-11-09 15:44:54 +0100 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2023-11-09 15:44:54 +0100 |
| commit | 679b9b108101b67ad56b4fdf35ec2bd0568d8d84 (patch) | |
| tree | 1b097e9f90627ca401174c738a8d754e8f2cce6b /tpl/objects/bubble.pug | |
| parent | Simplified bubble arrows (diff) | |
| download | iro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.tar.gz iro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.tar.bz2 iro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.zip | |
Renamed "bubble" to "message", added message group merging
Diffstat (limited to 'tpl/objects/bubble.pug')
| -rw-r--r-- | tpl/objects/bubble.pug | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/tpl/objects/bubble.pug b/tpl/objects/bubble.pug deleted file mode 100644 index 6a3ea8b..0000000 --- a/tpl/objects/bubble.pug +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | mixin bubble(user) | ||
| 2 | - const slots = {} | ||
| 3 | |||
| 4 | mixin slot(key) | ||
| 5 | - slots[key] = block | ||
| 6 | |||
| 7 | - | ||
| 8 | block ? block() : undefined | ||
| 9 | |||
| 10 | let classes = { | ||
| 11 | 'o-bubble': true, | ||
| 12 | 'o-bubble--75': attributes.compact, | ||
| 13 | 'o-bubble--highlight': attributes.highlight, | ||
| 14 | 't-up': !attributes.theme | ||
| 15 | } | ||
| 16 | if (attributes.class) { | ||
| 17 | classes[attributes.class] = true | ||
| 18 | } | ||
| 19 | if (attributes.theme) { | ||
| 20 | classes[attributes.theme] = true | ||
| 21 | } | ||
| 22 | |||
| 23 | let headerClasses = { | ||
| 24 | 'o-bubble__header': true, | ||
| 25 | 'u-mb-50': !attributes.compact, | ||
| 26 | } | ||
| 27 | |||
| 28 | mixin content | ||
| 29 | if slots.header | ||
| 30 | header(class=headerClasses) | ||
| 31 | - slots.header() | ||
| 32 | else if user | ||
| 33 | header(class=headerClasses) | ||
| 34 | strong= user | ||
| 35 | span.s-links.s-links--colored | ||
| 36 | - slots.body() | ||
| 37 | if slots.time | ||
| 38 | small.o-bubble__suffix | ||
| 39 | - slots.time() | ||
| 40 | if slots.footer | ||
| 41 | footer.o-bubble__footer | ||
| 42 | - slots.footer() | ||
| 43 | |||
| 44 | article(class=classes) | ||
| 45 | if user && attributes.avatar | ||
| 46 | .l-media.l-media--flush.l-flex--align-start | ||
| 47 | .l-media__block.u-mt-50.u-p-sticky-top | ||
| 48 | +avatar= user.slice(0, 2) | ||
| 49 | .l-media__block.l-media__block--main | ||
| 50 | +content | ||
| 51 | else | ||
| 52 | +content | ||
