From 90e205e17b24ddbfb5193e0ba29c613f83c57557 Mon Sep 17 00:00:00 2001 From: Sam Wing Date: Mon, 18 Nov 2019 16:30:12 -0500 Subject: [PATCH] twemoji --- README.md | 6 +++++- static/css/main.css | 6 ++++++ views/layout.pug | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14ad3b0..064d3f7 100644 --- a/README.md +++ b/README.md @@ -69,4 +69,8 @@ yarn start ``` ## Setup -Visit `/` on the HTTP server to add an admin account. \ No newline at end of file +Visit `/` on the HTTP server to add an admin account. + +## Twemoji +I use Twemoji in this project. Thanks Twitter! +To use Twemoji, USE_CDN must be turned on (it is by default). \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 6c4b2bd..1d7e5d2 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -42,3 +42,9 @@ ul.noStyle li { white-space: pre-wrap; word-break: break-word; } + +img.emoji { + margin: 0px !important; + vertical-align: middle; + width: 2em !important; +} \ No newline at end of file diff --git a/views/layout.pug b/views/layout.pug index 586e75f..edd9254 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -36,3 +36,6 @@ html(lang='en') h1 #{config.siteTitle} include includes/messages.pug block content + if config.useCDN + script(src='https://twemoji.maxcdn.com/v/latest/twemoji.min.js', crossorigin='anonymous') + script twemoji.parse(document.body) \ No newline at end of file