blob: 65d886f2417458b7fa866fab40b76d524769dcdb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{% macro court(id, status) -%}
<button class= "button is-large 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-medium is-responsive {% if status %}is-success{% else %}is-danger {% endif %}"
hx-post="{{ "/player-toggle/" ~ id}}"
hx-swap="outerHTML"> {{ name }} </button>
{%- endmacro %}
{% macro guests(count) -%}
<div class="control" id="guests">
<input class="input is-large is-responsive" type="text" style="text-align:center" value="{{ count }} Guests" disabled>
</div>
{%- endmacro %}
{% macro timer(mins, secs) -%}
<div hx-get="/time" hx-swap="outerHTML" hx-trigger="every 1s">
<p class="title">⏲️ {{mins}}:{{secs}}</p>
</div>
{%- endmacro %}
|