diff --git a/files/classes/user.py b/files/classes/user.py index 791232b1dc..909a4e731e 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -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 '' diff --git a/files/templates/comments.html b/files/templates/comments.html index 6553faaf8b..abe93a548d 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -171,7 +171,7 @@
{% if c.author.hat_active -%} - + {%- endif %}
{{c.author_name}} diff --git a/files/templates/header.html b/files/templates/header.html index 406584f345..52457b6424 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -207,7 +207,7 @@
{% if v.hat_active -%} - + {% elif request.path == '/hats' %} {%- endif %} diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 628a718070..e72bf42138 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -248,18 +248,22 @@ - {% for user in users9 %} - + {% for user, num in users9 %} + {{loop.index}} - {{user[0].username}} - {{user[1]}} + {% include "user_in_table.html" %} + {{num}} {% endfor %} {% if pos9 and (pos9[0] > 25 or not pos9[1]) %} {{pos9[0]}} - {{v.username}} - {{pos9[1]}} + + {% with user=v %} + {% include "user_in_table.html" %} + {% endwith %} + + {{pos9[1]}} {% endif %} @@ -379,17 +383,21 @@ - {% for user in users13 %} - + {% for user, num in users13 %} + {{loop.index}} - {{user[0].username}} - {{user[1]}} + {% include "user_in_table.html" %} + {{num}} {% endfor %} {% if pos13 and (pos13[0] > 25 or not pos13[1]) %} {{pos13[0]}} - {{v.username}} + + {% with user=v %} + {% include "user_in_table.html" %} + {% endwith %} + {{pos13[1]}} {% endif %} diff --git a/files/templates/settings_blocks.html b/files/templates/settings_blocks.html index 2e109238f7..0ac75789de 100644 --- a/files/templates/settings_blocks.html +++ b/files/templates/settings_blocks.html @@ -53,14 +53,16 @@ {% for block in v.blocking %} + {% set user=block.target %} - - @{{block.target.username}} + {% include "user_in_table.html" %} - {% else %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 0e5ab96480..933da33360 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -677,7 +677,7 @@
{% if p.author.hat_active -%} - + {%- endif %}
{{p.author_name}} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index afd8b99765..03014d99f6 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -172,7 +172,7 @@
{% if p.author.hat_active -%} - + {%- endif %}
{{p.author_name}} diff --git a/files/templates/user_in_table.html b/files/templates/user_in_table.html index b107590404..563ded4182 100644 --- a/files/templates/user_in_table.html +++ b/files/templates/user_in_table.html @@ -2,7 +2,7 @@
{% if user.hat_active -%} - + {%- endif %}
{{user.username}} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index e1b0ea2f81..fd816e9029 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -42,7 +42,7 @@ {% if u.hat_active -%} - + {%- endif %}
@@ -407,7 +407,7 @@ {% if u.hat_active -%} - + {%- endif %}