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) %}
-
+{% macro leaderboard_table(lb) %}
+
{# 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 %}