forked from rDrama/rDrama
fsd
parent
d1c1e67836
commit
2dd37d0ac5
|
@ -355,8 +355,10 @@ def leaderboard(v):
|
||||||
users9 = []
|
users9 = []
|
||||||
for user in users8: users9.append((user, votes3[user.id]))
|
for user in users8: users9.append((user, votes3[user.id]))
|
||||||
users9 = sorted(users9, key=lambda x: x[1], reverse=True)
|
users9 = sorted(users9, key=lambda x: x[1], reverse=True)
|
||||||
|
try:
|
||||||
pos9 = [x[0].id for x in users9].index(v.id)
|
pos9 = [x[0].id for x in users9].index(v.id)
|
||||||
pos9 = (pos9, users9[pos9][1])
|
pos9 = (pos9, users9[pos9][1])
|
||||||
|
except: pos9 = None
|
||||||
users9 = users9[:25]
|
users9 = users9[:25]
|
||||||
|
|
||||||
return render_template("leaderboard.html", v=v, users1=users1, pos1=pos1, users2=users2, pos2=pos2, users3=users3, pos3=pos3, users4=users4, pos4=pos4, users5=users5, pos5=pos5, users6=users6, pos6=pos6, users7=users7, pos7=pos7, users9=users9, pos9=pos9, users10=users10, pos10=pos10, users12=users12, users13=users13, users15=users15)
|
return render_template("leaderboard.html", v=v, users1=users1, pos1=pos1, users2=users2, pos2=pos2, users3=users3, pos3=pos3, users4=users4, pos4=pos4, users5=users5, pos5=pos5, users6=users6, pos6=pos6, users7=users7, pos7=pos7, users9=users9, pos9=pos9, users10=users10, pos10=pos10, users12=users12, users13=users13, users15=users15)
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
<td style="font-weight: bold">{{user[1]}}</td>
|
<td style="font-weight: bold">{{user[1]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if pos9[0] > 25 %}
|
{% if pos9 and pos9[0] > 25 %}
|
||||||
<tr style="border-top:2px solid var(--primary)">
|
<tr style="border-top:2px solid var(--primary)">
|
||||||
<td style="font-weight:bold;">{{pos9[0]}}</td>
|
<td style="font-weight:bold;">{{pos9[0]}}</td>
|
||||||
<td><a style="color:#{{v.namecolor}}; font-weight:bold;" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
|
<td><a style="color:#{{v.namecolor}}; font-weight:bold;" href="/@{{v.username}}"><img alt="@{{v.username}}'s profile picture" loading="lazy" src="{{v.profile_url}}" class="pp20"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></a></td>
|
||||||
|
|
Loading…
Reference in New Issue