From: Michael Date: Thu, 8 Nov 2018 07:42:19 +0000 (+0000) Subject: Using CSS for custom emojis X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=077a96fb28a96cd71d3f97609bddcf83f44d6c09;p=friendica.git Using CSS for custom emojis --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 383ad35d9c..5dadc029f9 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -50,7 +50,8 @@ class Processor public static function replaceEmojis($emojis, $body) { foreach ($emojis as $emoji) { - $body = str_replace($emoji['name'], '[img=16x16]' . $emoji['href'] . '[/img]', $body); + $replace = '[class=emoji mastodon][img=' . $emoji['href'] . ']' . $emoji['name'] . '[/img][/class]'; + $body = str_replace($emoji['name'], $replace, $body); } return $body; } diff --git a/view/global.css b/view/global.css index b46862d5aa..48755b89dc 100644 --- a/view/global.css +++ b/view/global.css @@ -602,3 +602,8 @@ img.invalid-src:after { vertical-align: top;} #register-explicid-content { font-weight: bold; } + +span.emoji.mastodon img { + height: 1.2em; + vertical-align: middle; +}