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/players.j2 | |
| parent | 7feeb30875c19a9f305e02f802e3634469349655 (diff) | |
Database handling added
Diffstat (limited to 'src/match_up/templates/players.j2')
| -rw-r--r-- | src/match_up/templates/players.j2 | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/src/match_up/templates/players.j2 b/src/match_up/templates/players.j2 index 0d1f96c..f25889c 100644 --- a/src/match_up/templates/players.j2 +++ b/src/match_up/templates/players.j2 @@ -1,4 +1,4 @@ -{% from "macros.j2" import header, navbar, footer, player %} +{% from "macros.j2" import header, navbar, footer, player_button %} <!doctype html> <html lang="en"> {{ header(url_for) }} @@ -7,10 +7,67 @@ {{ navbar(url_for) }} <div class="fixed-grid has-4-cols"> <div class="grid"> - {% for id, value in players.items() %} - <div class="cell"> {{ player(id, value.status, value.name) }} </div> + {% for player in players %} + <div class="cell"> {{ player_button(player) }} </div> {% endfor %} </div> + <div class="columns"> + <div class="column"> + <div class="field has-addons"> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/decrement_low_guest" + hx-swap="outerHTML" + hx-target="#lowguests">-</button> + </div> + <div hx-get="/low_guests" hx-swap="outerHTML" hx-trigger="revealed"></div> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/increment_low_guest" + hx-swap="outerHTML" + hx-target="#lowguests">+</button> + </div> + </div> + </div> + <div class="column"> + <div class="field has-addons"> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/decrement_mid_guest" + hx-swap="outerHTML" + hx-target="#midguests">-</button> + </div> + <div hx-get="/mid_guests" hx-swap="outerHTML" hx-trigger="revealed"></div> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/increment_mid_guest" + hx-swap="outerHTML" + hx-target="#midguests">+</button> + </div> + </div> + </div> + <div class="column"> + <div class="field has-addons"> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/decrement_high_guest" + hx-swap="outerHTML" + hx-target="#highguests">-</button> + </div> + <div hx-get="/high_guests" hx-swap="outerHTML" hx-trigger="revealed"></div> + <div class="control"> + <button class="button is-responsive is-dark" + hx-post="/increment_high_guest" + hx-swap="outerHTML" + hx-target="#highguests">+</button> + </div> + </div> + </div> + <div class="column"> + <button class="button is-dark is-responsive" + hx-post="/reset_players">Reset!</button> + </div> + </div> {{ footer() }} </section> </body> |
