From 0258bfb356461e31a25fc77a9414cc7685e653ae Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 28 Oct 2022 01:42:02 -0500 Subject: [PATCH] =?UTF-8?q?i've=20done=20it...=20i've=20really=20done=20it?= =?UTF-8?q?=20=F0=9F=A5=B2=20i've=20made=20the=20leaderboard=20code=20less?= =?UTF-8?q?=20crap=20all=20around=20to=20those=20who=20wrote=20this=20old?= =?UTF-8?q?=20code=20i=20forgive=20you?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/templates/leaderboard.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 62b2e5bae..f33ed9ac7 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -16,6 +16,7 @@ {% macro format_user_in_table(user, style, position_no, value, user_relative_url) %} + {% set value = value | int %} {{position_no}} {% include "user_in_table.html" %} @@ -40,7 +41,7 @@ {% macro leaderboard_table(lb, position, id, total_count, header_name, column_name, attr_name) %}
Top {{total_count}} by {{header_name}}
-<# TODO: check at some point if the nesting divs are intentional #> +{# TODO: check at some point if the nesting divs are intentional #} {{leaderboard_table_header(column_name)}} @@ -78,7 +79,7 @@ {{format_user_in_table(user, style, loop.index, num, user_relative_url)}} {% endfor %} {% if position and (position[0] > total_count or not position[1]) %} - {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", position, position[1], user_relative_url)}} + {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", position[0], position[1], user_relative_url)}} {% endif %}