diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-12 18:15:29 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-12 18:15:29 +0100 |
| commit | 7c0820d3d19927e695faa18cb3f5494ee39e0c77 (patch) | |
| tree | 16f0c045a928a390558e81610ab8ca68e32249d8 /src/match_up/templates/macros.j2 | |
| parent | 7feeb30875c19a9f305e02f802e3634469349655 (diff) | |
Database handling added
Diffstat (limited to 'src/match_up/templates/macros.j2')
| -rw-r--r-- | src/match_up/templates/macros.j2 | 14 |
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 %} |
