{% extends "settings2.html" %} {% block pagetitle %}Leaderboard{% endblock %} {% block content %}

{% for lb in leaderboards %} {% if lb %} {{lb.header_name}}{% if not loop.last %} •{% endif %} {% endif %} {% endfor %}
{% 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 is not none %} {{"{:,}".format(value)}} {% else %} {{"{:,}".format(value)}} {% endif %} {% endmacro %} {% macro leaderboard_table(lb) %}
Top {{lb.limit}} {% if lb.table_header_name != 'most blocked' %}by{% endif %} {{lb.table_header_name}}
{% for user in lb.all_users %} {% set user2 = lb.user_func(user) %} {% if v.id == user2.id %} {% set style="class=\"self\"" %} {% endif %} {{format_user_in_table(user2, style, loop.index, lb.value_func(user), lb.user_relative_url)}} {% endfor %} {% if lb.v_position and not lb.v_appears_in_ranking %} {{format_user_in_table(v, "style=\"border-top:2px solid var(--primary)\"", lb.v_position, lb.v_value, lb.user_relative_url)}} {% endif %}
# Name {{lb.table_column_name}}
{% endmacro %} {% for lb in leaderboards %} {% if lb %} {{leaderboard_table(lb)}} {% endif %} {% endfor %} {% endblock %}