From 0aa60547321e704814959dd49de3ecc85643ad3c Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 28 Jan 2023 17:11:33 +0100 Subject: Better unicode emoji --- tpl/objects/emoji.pug | 9 +++++++-- tpl/views/emoji.pug | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'tpl') diff --git a/tpl/objects/emoji.pug b/tpl/objects/emoji.pug index 3509112..af56c7a 100644 --- a/tpl/objects/emoji.pug +++ b/tpl/objects/emoji.pug @@ -11,6 +11,11 @@ mixin emoji(id) classes['o-emoji--' + attributes.size] = true; } - src = id + '.png' + if (!attributes.unicode) { + src = id + '.png' + } - img(src=src, class=classes) + if !attributes.unicode + img(src=src, class=classes) + else + span(class=classes)= id diff --git a/tpl/views/emoji.pug b/tpl/views/emoji.pug index 8410794..2503e8d 100644 --- a/tpl/views/emoji.pug +++ b/tpl/views/emoji.pug @@ -4,17 +4,23 @@ mixin view-emoji =loremIpsum =' ' +emoji('drgn') - +emoji('drgn') + =' ' + +emoji('🐉️')(unicode=true) =' ' =loremIpsum =' ' +emoji('drgn')(zoomable=true) =' ' + +emoji('🐉️')(zoomable=true unicode=true) + =' ' =loremIpsum =' ' +emoji('drgn')(size=125) - +emoji('drgn')(size=125) + =' ' + +emoji('🐉️')(unicode=true size=125) =' ' =loremIpsum =' ' +emoji('drgn')(zoomable=true size=125) + =' ' + +emoji('🐉️')(zoomable=true unicode=true size=125) -- cgit v1.2.3-70-g09d2