summaryrefslogtreecommitdiffstats
path: root/tpl/objects/bubble.pug
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-11-09 15:44:54 +0100
committerVolpeon <git@volpeon.ink>2023-11-09 15:44:54 +0100
commit679b9b108101b67ad56b4fdf35ec2bd0568d8d84 (patch)
tree1b097e9f90627ca401174c738a8d754e8f2cce6b /tpl/objects/bubble.pug
parentSimplified bubble arrows (diff)
downloadiro-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.pug52
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 @@
1mixin 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