summaryrefslogtreecommitdiff
path: root/templates/players.j2
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2024-10-16 21:47:26 +0200
committerKaran Jayachandra <karan.jayachandra@nxp.com>2024-10-16 21:47:26 +0200
commit74480cbe2b335fd141cdf5f07bb08808c0d08692 (patch)
treeca9f5c55579acfd8394469e2644dc41dfd625988 /templates/players.j2
parent83cb89862c7c330552c48d9b25f898388693c420 (diff)
Added all macros and also stored the js, css, png and ico files
Diffstat (limited to 'templates/players.j2')
-rw-r--r--templates/players.j25
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/players.j2 b/templates/players.j2
index 080c03a..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 id, player in players.items() %}
+{% for id, value in players.items() %}
<div class="cell">
- <button class="button is-medium is-responsive {% if player.status %} is-success {% else %} is-danger {% endif %}" hx-post="{{ "/player-toggle/" ~ id}}" hx-trigger="click" hx-swap="outerHTML">{{ player.name }}</button>
+ {{ player(id, value.status, value.name) }}
</div>
{% endfor %}
</div> \ No newline at end of file