From 3aac8f1f24e4c32cd0607209f04ead6148ed4e53 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 28 Oct 2022 04:30:24 -0500 Subject: [PATCH] leaderboard: fix some templating bugs i introduced --- files/templates/leaderboard.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 6ff1707fa..faeb84a2a 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -12,7 +12,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" %} {% if user_relative_url %} @@ -23,8 +23,8 @@ {% endmacro %} -{% macro leaderboard_table(lb, position, id, header_name, v_value) %} -
Top {{lb.limit}} by {{table_header_name}}
+{% macro leaderboard_table(lb) %} +
Top {{lb.limit}} by {{lb.table_header_name}}
{# TODO: check at some point if the nesting divs are intentional #} @@ -43,7 +43,7 @@ {{format_user_in_table(user, style, loop.index, lb.value_func(user))}} {% endfor %} {% if position %} - {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", position, v_value)}} + {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value)}} {% endif %}
@@ -51,7 +51,7 @@ {% for lb in leaderboards %} {% if lb %} - {{leaderboard_table(lb, lb.v_position, lb.html_id, lb.header_name, lb.v_value)}} + {{leaderboard_table(lb)}} {% endif %} {% endfor %}