From 4a567c385f7d16e12da46718d2ee4ff970072711 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 20 Jan 2023 17:47:42 +0100 Subject: Add emoji object --- tpl/index.pug | 3 +++ tpl/objects/emoji.pug | 13 +++++++++++++ tpl/views/emoji.pug | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 tpl/objects/emoji.pug create mode 100644 tpl/views/emoji.pug (limited to 'tpl') 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 include objects/action-menu.pug include objects/menu.pug include objects/icon-nav.pug +include objects/emoji.pug include objects/backdrop.pug include objects/dialog.pug include objects/lightbox.pug @@ -77,6 +78,7 @@ include views/table.pug include views/alert.pug include views/bubble.pug include views/bubble-group.pug +include views/emoji.pug doctype html @@ -96,6 +98,7 @@ html +view-code +view-blockquote +view-list + +view-emoji +view-badge +view-button +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 @@ +mixin emoji(id) + - + let classes = { + 'o-emoji': true, + 'o-emoji--zoomable': attributes.zoomable, + } + if (attributes.class) { + classes[attributes.class] = true; + } + + src = id + '.png' + + 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 @@ +mixin view-emoji + +view('emoji', 'Emoji') + .c-box + =loremIpsum + +emoji('drgn') + =loremIpsum + +emoji('drgn')(zoomable=true) + =loremIpsum -- cgit v1.2.3-70-g09d2