aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-09 20:53:18 +0000
committerMario <mario@mariovavti.com>2024-03-09 20:53:18 +0000
commit46fa26502b285213f3438abb1e3bd1482eb55bf5 (patch)
treec40ee65fc9da26319e26758c80339124f5247bea /view
parentba1e705c6154d347000ab6c92ef59f7f6f60e886 (diff)
downloadvolse-hubzilla-46fa26502b285213f3438abb1e3bd1482eb55bf5.tar.gz
volse-hubzilla-46fa26502b285213f3438abb1e3bd1482eb55bf5.tar.bz2
volse-hubzilla-46fa26502b285213f3438abb1e3bd1482eb55bf5.zip
more work on emojis
Diffstat (limited to 'view')
-rw-r--r--view/css/conversation.css12
-rw-r--r--view/js/autocomplete.js6
2 files changed, 11 insertions, 7 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 3af51d102..54b12ac16 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -299,13 +299,17 @@ code.inline-code {
text-decoration: overline;
}
-img.smiley.emoji {
- height: .9em;
+img.emoji {
+ height: 1rem;
vertical-align: baseline;
- margin-bottom: -.1em;
+ margin-bottom: -.1rem;
}
-img.smiley.emoji:hover {
+img.emoji.single-emoji {
+ height: 2rem;
+}
+
+img.emoji:not(.single-emoji):hover {
transform: scale(2);
transition: transform .1s ease-out;
filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, .5));
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 8edd8dafa..7d6ddb1c4 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -45,7 +45,7 @@ function contact_format(item) {
}
function smiley_format(item) {
- return "<div class='dropdown-item'>" + item.icon + ' ' + item.text + "</div>";
+ return "<div class='dropdown-item'><img class='emoji' src='" + item.filepath + "'> " + item.shortname.replaceAll(':', '') + "</div>";
}
function bbco_format(item) {
@@ -193,8 +193,8 @@ function string2bb(element) {
match: /(^|\s)(:[a-z0-9_:]{2,})$/,
index: 2,
cache: true,
- search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term.substr(1)) !== -1 ? entry : null; })); }); },
- replace: function(item) { return "$1" + item.text + ' '; },
+ search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.shortname.indexOf(term.substr(1)) !== -1 ? entry : null; })); }); },
+ replace: function(item) { return "$1" + item.shortname + ' '; },
context: function(text) { return text.toLowerCase(); },
template: smiley_format
};