aboutsummaryrefslogtreecommitdiff
path: root/src/match_up/templates/macros.j2
diff options
context:
space:
mode:
Diffstat (limited to 'src/match_up/templates/macros.j2')
-rw-r--r--src/match_up/templates/macros.j214
1 files changed, 7 insertions, 7 deletions
diff --git a/src/match_up/templates/macros.j2 b/src/match_up/templates/macros.j2
index dedbf48..7e1f6bd 100644
--- a/src/match_up/templates/macros.j2
+++ b/src/match_up/templates/macros.j2
@@ -1,17 +1,17 @@
-{% macro court(id, status) -%}
+{% macro court_button(id, status) -%}
<button class= "button is-responsive {% if status %}is-success{% else %}is-danger{% endif %}"
hx-post="{{ "/court-toggle/" ~ id}}"
hx-swap="outerHTML"> Court {{ id }}</button>
{%- endmacro %}
-{% macro player(id, status, name) -%}
-<button class="button is-responsive {% if status %}is-success{% else %}is-danger {% endif %}"
- hx-post="{{ "/player-toggle/" ~ id}}"
- hx-swap="outerHTML"> {{ name }} </button>
+{% macro player_button(player) -%}
+<button class="button is-responsive {% if player.status %}is-success{% else %}is-danger {% endif %}"
+ hx-post="{{ "/player-toggle/" ~ player.id}}"
+ hx-swap="outerHTML"> {{ player.first + " " + player.last}} </button>
{%- endmacro %}
-{% macro guests(count) -%}
-<div class="control" id="guests">
+{% macro guests(count, level) -%}
+<div class="control" id="{{level}}guests">
<input class="input is-responsive" type="text" style="text-align:center" value="{{ count }} Guests" disabled>
</div>
{%- endmacro %}