fix rank display with new jinja

This commit is contained in:
2019-06-09 19:24:30 +02:00
parent b7008bf2a8
commit cc2bb01c51

View File

@@ -21,19 +21,20 @@
<div class=leaderboard-container> <div class=leaderboard-container>
<div class=colum-names>{{ columNames }}</div> <div class=colum-names>{{ columNames }}</div>
{% for player in playerList %} {% for player in playerList %}
{% if loop.index % 2 == 0 %} {% set count = loop.index + start %}
{% if count % 2 == 0 %}
<div <div
{% if searchName == player.name %} {% if searchName == player.name %}
style="background: yellow;" style="background: yellow;"
{% endif %} {% endif %}
class=line-even>{{ player.getLineHTML(loop.index) }} class=line-even>{{ player.getLineHTML(count) }}
</div> </div>
{% else %} {% else %}
<div <div
{% if searchName == player.name %} {% if searchName == player.name %}
style="background: yellow;" style="background: yellow;"
{% endif %} {% endif %}
class=line-odd>{{ player.getLineHTML(loop.index) }} class=line-odd>{{ player.getLineHTML(count) }}
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}