From b7008bf2a8620dacc968ddc78fd2a8ba3c3a127f Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sun, 9 Jun 2019 19:22:38 +0200 Subject: [PATCH] use new jinja2 syntax loop.index --- templates/base.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/base.html b/templates/base.html index 007e61e..cba8daf 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,24 +20,22 @@
{{ columNames }}
- {% set count = start+1 %} {% for player in playerList %} - {% if count % 2 == 0 %} + {% if loop.index % 2 == 0 %}
{{ player.getLineHTML(count) }} + class=line-even>{{ player.getLineHTML(loop.index) }}
{% else %}
{{ player.getLineHTML(count) }} + class=line-odd>{{ player.getLineHTML(loop.index) }}
{% endif %} - {% set count = count + 1 %} {% endfor %} {{ endOfBoardIndicator }}