mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
more work on emojis
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user