add hats to chat, part I

master
Aevann1 2022-09-05 05:04:48 +02:00
parent 332a03219b
commit 49bcd0543d
2 changed files with 7 additions and 1 deletions

View File

@ -66,6 +66,7 @@ def speak(data, v):
data={ data={
"avatar": v.profile_url, "avatar": v.profile_url,
"hat": v.hat_active,
"username": v.username, "username": v.username,
"namecolor": v.namecolor, "namecolor": v.namecolor,
"text": text, "text": text,

View File

@ -163,7 +163,12 @@
<div class="pl-md-3 text-muted"> <div class="pl-md-3 text-muted">
<div> <div>
{% if not same %} {% if not same %}
<img src="{{m['avatar']}}" class="avatar pp20 mr-1" data-toggle="tooltip" data-placement="right"> <div class="profile-pic-20-wrapper">
<img src="{{m['avatar']}}" class="avatar pp20 mr-1">
{% if m.get('hat') -%}
<img class="profile-pic-20-hat hat" loading="lazy" src="/i/hats/{{m['hat']}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.hat_tooltip(v)}}">
{%- endif %}
</div>
{% endif %} {% endif %}
<a class="{% if same %}d-none{% endif %} font-weight-bold text-black userlink" style="color:#{{m['namecolor']}}" target="_blank" href="/@{{m['username']}}">{{m['username']}}</a> <a class="{% if same %}d-none{% endif %} font-weight-bold text-black userlink" style="color:#{{m['namecolor']}}" target="_blank" href="/@{{m['username']}}">{{m['username']}}</a>