From dbba52e97e38e26d8f42119165b44d181f49bb8e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 4 Sep 2021 00:02:26 +0200 Subject: [PATCH] fd --- files/routes/users.py | 3 +++ files/templates/leaderboard.html | 31 ++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/files/routes/users.py b/files/routes/users.py index 08846f094..e99ae9ca8 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -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) diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 3aa00df92..ff1180065 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -97,7 +97,36 @@ {% endfor %} -
Top 10 by awards received
+ +{% if "pcm" in request.host %} +
+
+
+	
+
Top 10 by based count
+
+
+
+	
+ + + + + + + + + {% for user in users5 %} + + + + + + {% endfor %} +
#NameBased count
{{users5.index(user)+1}}{{user.username}}{{user.basedcount}}
+{% endif %} + +
Top 10 by awards received