summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-03-27 11:23:45 +0200
committerVolpeon <git@volpeon.ink>2022-03-27 11:23:45 +0200
commitcac07ec50d360f3916e84bc3af6164ef07ac2f83 (patch)
tree8bd37d0c30ba176f5a2079dde171c0a80d6f86b6 /tpl
parentLots of updates, especially dialog (diff)
downloadiro-design-cac07ec50d360f3916e84bc3af6164ef07ac2f83.tar.gz
iro-design-cac07ec50d360f3916e84bc3af6164ef07ac2f83.tar.bz2
iro-design-cac07ec50d360f3916e84bc3af6164ef07ac2f83.zip
Update
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug8
-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
-rw-r--r--tpl/views/bubble-group.pug9
-rw-r--r--tpl/views/bubble.pug7
8 files changed, 71 insertions, 6 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index 14bfa10..6ff502c 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -29,6 +29,8 @@ include objects/table.pug
29include objects/alert.pug 29include objects/alert.pug
30include objects/header.pug 30include objects/header.pug
31include objects/sidebar.pug 31include objects/sidebar.pug
32include objects/bubble.pug
33include objects/bubble-group.pug
32 34
33mixin view(id, title) 35mixin view(id, title)
34 - 36 -
@@ -70,6 +72,8 @@ include views/lightbox.pug
70include views/list-group.pug 72include views/list-group.pug
71include views/table.pug 73include views/table.pug
72include views/alert.pug 74include views/alert.pug
75include views/bubble.pug
76include views/bubble-group.pug
73 77
74 78
75doctype html 79doctype html
@@ -104,7 +108,9 @@ html
104 +view-lightbox 108 +view-lightbox
105 +view-list-group 109 +view-list-group
106 +view-table 110 +view-table
107 +view-alert 111 +view-alert
112 +view-bubble
113 +view-bubble-group
108 114
109 +sidebar(class='c-sidebar') 115 +sidebar(class='c-sidebar')
110 +menu 116 +menu
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
diff --git a/tpl/views/bubble-group.pug b/tpl/views/bubble-group.pug
new file mode 100644
index 0000000..6f057c0
--- /dev/null
+++ b/tpl/views/bubble-group.pug
@@ -0,0 +1,9 @@
1mixin view-bubble-group
2 +view('bubble-group', 'Bubble group')
3 .c-box.l-overflow(style='max-height: 13em')
4 +bubble-group('Volpeon')
5 +bubble-group-bubble('12:34')= loremIpsum
6 +bubble-group-bubble('12:35')= loremIpsum
7 +bubble-group-bubble('12:36')= loremIpsum
8 +bubble-group-bubble('12:38')= loremIpsum
9 +bubble-group-bubble('12:39')= loremIpsum
diff --git a/tpl/views/bubble.pug b/tpl/views/bubble.pug
new file mode 100644
index 0000000..037398f
--- /dev/null
+++ b/tpl/views/bubble.pug
@@ -0,0 +1,7 @@
1mixin view-bubble
2 +view('bubble', 'Bubble')
3 .c-box
4 +bubble('12:34', 'Volpeon')= loremIpsum
5
6 .c-box
7 +bubble('12:34', 'Volpeon')(scope='lock')= loremIpsum