summaryrefslogtreecommitdiff
path: root/templates/macros.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/macros.j2')
-rw-r--r--templates/macros.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/macros.j2 b/templates/macros.j2
new file mode 100644
index 0000000..b4767be
--- /dev/null
+++ b/templates/macros.j2
@@ -0,0 +1,11 @@
+{% 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">{{ 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 %} \ No newline at end of file