diff options
Diffstat (limited to 'templates/players.j2')
| -rw-r--r-- | templates/players.j2 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/players.j2 b/templates/players.j2 index 6179dbb..4eedc54 100644 --- a/templates/players.j2 +++ b/templates/players.j2 @@ -1,8 +1,9 @@ +{% from "macros.j2" import player %} <div class="fixed-grid has-5-cols"> <div class="grid"> -{% for player in players %} +{% for id, value in players.items() %} <div class="cell"> - <button class={% if player.status %} "button is-success" {% else %} "button is-danger" {% endif %} hx-post="{{ "/player-toggle/" ~ player.name}}" hx-trigger="click" hx-swap="outerHTML">{{ player.name }}</button> + {{ player(id, value.status, value.name) }} </div> {% endfor %} </div>
\ No newline at end of file |
