Fix rendering of custom emoji

This commit is contained in:
Sol Fisher Romanoff 2022-11-27 16:05:34 +02:00
parent f31c3996e5
commit 5c6ef2b54b
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
3 changed files with 10 additions and 4 deletions

View file

@ -8,7 +8,6 @@ defmodule Pleroma.Web.StaticFE.StaticFEView do
alias Calendar.Strftime
alias Pleroma.Emoji.Formatter
alias Pleroma.User
alias Pleroma.Web.Endpoint
alias Pleroma.Web.Gettext
alias Pleroma.Web.MediaProxy
alias Pleroma.Web.Metadata.Utils

View file

@ -60,13 +60,13 @@
<span><%= if @user.hide_followers_count do gettext("Hidden") else @user.follower_count end %></span>
</div>
</div>
<span class="user-bio"><%= raw @user.bio %></span>
<span class="user-bio"><%= raw Formatter.emojify(@user.bio, @user.emoji) %></span>
</div>
<div class="user-profile-fields">
<%= for field <- @user.fields do %>
<div class="user-profile-field">
<dt title="<%= field["name"] %>"><%= field["name"] %></dt>
<dd title="<%= field["value"] %>"><%= field["value"] %></dd>
<dt title="<%= field["name"] %>"><%= raw Formatter.emojify(field["name"], @user.emoji) %></dt>
<dd title="<%= field["value"] %>"><%= raw Formatter.emojify(field["value"], @user.emoji) %></dd>
</div>
<% end %>
</div>

View file

@ -573,3 +573,10 @@ @media (max-width: 800px) {
display: none;
}
}
img.emoji {
width: 32px;
height: 32px;
padding: 0;
vertical-align: middle;
}