summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-01-20 17:47:42 +0100
committerVolpeon <git@volpeon.ink>2023-01-20 17:47:42 +0100
commit4a567c385f7d16e12da46718d2ee4ff970072711 (patch)
treeadaeb338facfc99e2bc9602588b43f7ff735301f /tpl
parentFixed flaws (diff)
downloadiro-design-4a567c385f7d16e12da46718d2ee4ff970072711.tar.gz
iro-design-4a567c385f7d16e12da46718d2ee4ff970072711.tar.bz2
iro-design-4a567c385f7d16e12da46718d2ee4ff970072711.zip
Add emoji object
Diffstat (limited to 'tpl')
-rw-r--r--tpl/index.pug3
-rw-r--r--tpl/objects/emoji.pug13
-rw-r--r--tpl/views/emoji.pug8
3 files changed, 24 insertions, 0 deletions
diff --git a/tpl/index.pug b/tpl/index.pug
index 854cb4b..1f4f522 100644
--- a/tpl/index.pug
+++ b/tpl/index.pug
@@ -22,6 +22,7 @@ include objects/avatar.pug
22include objects/action-menu.pug 22include objects/action-menu.pug
23include objects/menu.pug 23include objects/menu.pug
24include objects/icon-nav.pug 24include objects/icon-nav.pug
25include objects/emoji.pug
25include objects/backdrop.pug 26include objects/backdrop.pug
26include objects/dialog.pug 27include objects/dialog.pug
27include objects/lightbox.pug 28include objects/lightbox.pug
@@ -77,6 +78,7 @@ include views/table.pug
77include views/alert.pug 78include views/alert.pug
78include views/bubble.pug 79include views/bubble.pug
79include views/bubble-group.pug 80include views/bubble-group.pug
81include views/emoji.pug
80 82
81 83
82doctype html 84doctype html
@@ -96,6 +98,7 @@ html
96 +view-code 98 +view-code
97 +view-blockquote 99 +view-blockquote
98 +view-list 100 +view-list
101 +view-emoji
99 +view-badge 102 +view-badge
100 +view-button 103 +view-button
101 +view-text-field 104 +view-text-field
diff --git a/tpl/objects/emoji.pug b/tpl/objects/emoji.pug
new file mode 100644
index 0000000..5bf3a3b
--- /dev/null
+++ b/tpl/objects/emoji.pug
@@ -0,0 +1,13 @@
1mixin emoji(id)
2 -
3 let classes = {
4 'o-emoji': true,
5 'o-emoji--zoomable': attributes.zoomable,
6 }
7 if (attributes.class) {
8 classes[attributes.class] = true;
9 }
10
11 src = id + '.png'
12
13 img(src=src, class=classes)
diff --git a/tpl/views/emoji.pug b/tpl/views/emoji.pug
new file mode 100644
index 0000000..70c13a4
--- /dev/null
+++ b/tpl/views/emoji.pug
@@ -0,0 +1,8 @@
1mixin view-emoji
2 +view('emoji', 'Emoji')
3 .c-box
4 =loremIpsum
5 +emoji('drgn')
6 =loremIpsum
7 +emoji('drgn')(zoomable=true)
8 =loremIpsum