make the tooltip be "hat - description"

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-05 05:55:41 +02:00
parent 1816ce09f7
commit 34c6842018
8 changed files with 18 additions and 14 deletions

View File

@ -202,7 +202,7 @@ class User(Base):
return 'Cakeday.webp'
if self.equipped_hats:
return random.choice(self.equipped_hats).name + '.webp'
return random.choice(self.equipped_hats)
return ''
@ -215,7 +215,7 @@ class User(Base):
return "I've spent another year rotting my brain with dramaposting, please ridicule me 🤓"
if self.equipped_hats:
return random.choice(self.equipped_hats).censored_description(v)
return self.hat_active.name + ' - ' + self.hat_active.censored_description(v)
return ''

View File

@ -171,7 +171,7 @@
<div class="profile-pic-30-wrapper">
<img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-30 mr-2">
{% if c.author.hat_active -%}
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{c.author.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.hat_tooltip(v)}}">
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{c.author.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{c.author.hat_tooltip(v)}}">
{%- endif %}
</div>
<span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.name_color}};"{% elif c.distinguish_level %}class="mod"{% endif %}>{{c.author_name}}</span>

View File

@ -207,7 +207,7 @@
<div class="profile-pic-35-wrapper">
<img loading="lazy" src="{{v.profile_url}}" class="profile-pic-35">
{% if v.hat_active -%}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="/i/hats/{{v.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{v.hat_tooltip(v)}}">
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat" loading="lazy" src="/i/hats/{{v.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{v.hat_tooltip(v)}}">
{% elif request.path == '/hats' %}
<img id="profile-pic-35-hat" class="profile-pic-35-hat hat d-none" loading="lazy" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{v.hat_tooltip(v)}}">
{%- endif %}

View File

@ -379,17 +379,21 @@
</tr>
</thead>
<tbody id="followers-table">
{% for user in users13 %}
<tr {% if v.id == user[0].id %}class="self"{% endif %}>
{% for user, num in users13 %}
<tr {% if v.id == user.id %}class="self"{% endif %}>
<td>{{loop.index}}</td>
<td><a style="color:#{{user[0].name_color}};font-weight:bold" href="/@{{user[0].username}}"><img loading="lazy" src="{{user[0].profile_url}}" class="pp20"><span {% if user[0].patron %}class="patron" style="background-color:#{{user[0].name_color}}"{% endif %}>{{user[0].username}}</span></a></td>
<td>{{user[1]}}</td>
<td>{% include "user_in_table.html" %}</td>
<td>{{num}}</td>
</tr>
{% endfor %}
{% if pos13 and (pos13[0] > 25 or not pos13[1]) %}
<tr style="border-top:2px solid var(--primary)">
<td>{{pos13[0]}}</td>
<td><a style="color:#{{v.name_color}};font-weight:bold" href="/@{{v.username}}"><img loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.name_color}}"{% endif %}>{{v.username}}</span></a></td>
<td>
{% with user=v %}
{% include "user_in_table.html" %}
{% endwith %}
</td>
<td>{{pos13[1]}}</td>
</tr>
{% endif %}

View File

@ -677,7 +677,7 @@
<div class="profile-pic-30-wrapper">
<img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-30 mr-2">
{% if p.author.hat_active -%}
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{p.author.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.hat_tooltip(v)}}">
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{p.author.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.hat_tooltip(v)}}">
{%- endif %}
</div>
<span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.name_color}};"{% elif p.distinguish_level %}class="mod"{% endif %}>{{p.author_name}}</span>

View File

@ -172,7 +172,7 @@
<div class="profile-pic-30-wrapper">
<img loading="lazy" src="{{p.author.profile_url}}" class="profile-pic-30 mr-2">
{% if p.author.hat_active -%}
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{p.author.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.hat_tooltip(v)}}">
<img class="profile-pic-30-hat hat" loading="lazy" src="/i/hats/{{p.author.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{p.author.hat_tooltip(v)}}">
{%- endif %}
</div>
<span {% if p.author.patron and not p.distinguish_level %}class="patron" style="background-color:#{{p.author.name_color}};"{% elif p.distinguish_level %}class="mod"{% endif %}>{{p.author_name}}</span>

View File

@ -2,7 +2,7 @@
<div class="profile-pic-20-wrapper">
<img loading="lazy" src="{{user.profile_url}}" class="pp20">
{% if user.hat_active -%}
<img class="profile-pic-20-hat hat" loading="lazy" src="/i/hats/{{user.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.hat_tooltip(v)}}">
<img class="profile-pic-20-hat hat" loading="lazy" src="/i/hats/{{user.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{user.hat_tooltip(v)}}">
{%- endif %}
</div>
<span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.username}}</span>

View File

@ -42,7 +42,7 @@
<a rel="nofollow noopener noreferrer" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
{% if u.hat_active -%}
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="/i/hats/{{u.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="/i/hats/{{u.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}">
{%- endif %}
</a>
</div>
@ -407,7 +407,7 @@
<a rel="nofollow noopener noreferrer" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white border-2 border-white mb-2">
{% if u.hat_active -%}
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="/i/hats/{{u.hat_active}}?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}">
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="/i/hats/{{u.hat_active.name}}.webp?v=3" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_tooltip(v)}}">
{%- endif %}
</a>
</div>