summaryrefslogtreecommitdiffstats
path: root/tpl/objects
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/objects')
-rw-r--r--tpl/objects/avatar.pug2
-rw-r--r--tpl/objects/bubble-group.pug22
-rw-r--r--tpl/objects/bubble.pug21
-rw-r--r--tpl/objects/header.pug2
-rw-r--r--tpl/objects/text-field.pug6
5 files changed, 48 insertions, 5 deletions
diff --git a/tpl/objects/avatar.pug b/tpl/objects/avatar.pug
index 9e08a16..a2ff941 100644
--- a/tpl/objects/avatar.pug
+++ b/tpl/objects/avatar.pug
@@ -5,7 +5,7 @@ mixin avatar
5 let classes = { 5 let classes = {
6 'o-avatar': true, 6 'o-avatar': true,
7 'o-avatar--circle': attributes.circle, 7 'o-avatar--circle': attributes.circle,
8 'u-d-block': attributes.block 8 'u-d-block': attributes.block
9 } 9 }
10 if (attributes.class) { 10 if (attributes.class) {
11 classes[attributes.class] = true; 11 classes[attributes.class] = true;
diff --git a/tpl/objects/bubble-group.pug b/tpl/objects/bubble-group.pug
new file mode 100644
index 0000000..c2e502a
--- /dev/null
+++ b/tpl/objects/bubble-group.pug
@@ -0,0 +1,22 @@
1mixin bubble-group(user)
2 -
3 let first = true
4
5 mixin bubble-group-bubble(time)
6 +bubble(time, first ? user : undefined)(class='l-bubble-group__bubble')
7 block
8 -
9 first = false
10
11 -
12 let classes = {
13 'l-bubble-group': true
14 }
15 if (attributes.class) {
16 classes[attributes.class] = true
17 }
18
19 section(class=classes)
20 .l-bubble-group__avatar
21 +avatar= user.slice(0, 2)
22 block
diff --git a/tpl/objects/bubble.pug b/tpl/objects/bubble.pug
new file mode 100644
index 0000000..a79f119
--- /dev/null
+++ b/tpl/objects/bubble.pug
@@ -0,0 +1,21 @@
1mixin bubble(time, user)
2 -
3 let classes = {
4 'o-bubble': true,
5 't-raised': true
6 }
7 if (attributes.class) {
8 classes[attributes.class] = true
9 }
10
11 article(class=classes)
12 if user
13 header.o-bubble__user
14 strong= user
15 span.s-colored-links
16 block
17 small.o-bubble__time
18 = time
19 if attributes.scope
20 = ' '
21 +icon(attributes.scope)
diff --git a/tpl/objects/header.pug b/tpl/objects/header.pug
index 4518afc..0d9d7ee 100644
--- a/tpl/objects/header.pug
+++ b/tpl/objects/header.pug
@@ -8,5 +8,5 @@ mixin header
8 } 8 }
9 9
10 header(class=classes) 10 header(class=classes)
11 .o-header__content.t-lowered 11 .o-header__content.t-lo
12 block 12 block
diff --git a/tpl/objects/text-field.pug b/tpl/objects/text-field.pug
index 673aa27..53d1362 100644
--- a/tpl/objects/text-field.pug
+++ b/tpl/objects/text-field.pug
@@ -16,7 +16,7 @@ mixin text-field
16 'is-disabled': attributes.disabled, 16 'is-disabled': attributes.disabled,
17 'l-card': !!block, 17 'l-card': !!block,
18 'l-card--flush': !!block, 18 'l-card--flush': !!block,
19 'l-card--gapless': !!block 19 'l-card--gapless': !!block,
20 } 20 }
21 if (attributes.class) { 21 if (attributes.class) {
22 classes[attributes.class] = true; 22 classes[attributes.class] = true;
@@ -30,11 +30,11 @@ mixin text-field
30 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled)) 30 div(class=classes aria-disabled=attributes.disabled && String(attributes.disabled))
31 if !!block 31 if !!block
32 if slots.pre 32 if slots.pre
33 .u-d-contents.t-raised 33 .u-d-contents.t-hi
34 - slots.pre() 34 - slots.pre()
35 input.o-text-field__native.l-card__block.l-card__block--main&attributes(attr) 35 input.o-text-field__native.l-card__block.l-card__block--main&attributes(attr)
36 if slots.post 36 if slots.post
37 .u-d-contents.t-raised 37 .u-d-contents.t-hi
38 - slots.post() 38 - slots.post()
39 .o-text-field__bg 39 .o-text-field__bg
40 else 40 else