forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-04 00:02:26 +02:00
parent b92ab48062
commit dbba52e97e
2 changed files with 33 additions and 1 deletions

View File

@ -140,6 +140,9 @@ def leaderboard(v):
users2 = users.order_by(User.stored_subscriber_count.desc()).limit(10).all()
users3 = users.order_by(User.post_count.desc()).limit(10).all()
users4 = users.order_by(User.comment_count.desc()).limit(10).all()
if "pcm" in request.host:
users5 = users.order_by(User.basedcount.desc()).limit(10).all()
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4)

View File

@ -97,7 +97,36 @@
</tr>
{% endfor %}
</table>
<h5 style="font-weight:bold;text-align: center;"><a href="/awards_leaderboard">Top 10 by awards received</a></h5>
{% if "pcm" in request.host %}
<pre>
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 10 by based count</h5>
<pre>
</pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold; text-align:right;">Based count</th>
</tr>
</thead>
{% for user in users5 %}
<tr>
<td style="font-weight:bold;">{{users5.index(user)+1}}</td>
<td><a style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold; text-align:right;">{{user.basedcount}}</td>
</tr>
{% endfor %}
</table>
{% endif %}
<h5 style="font-weight:bold;text-align: center;"><a href="/award_leaderboard">Top 10 by awards received</a></h5>
<pre>