From a355423ff7566ff1d38bfa1627ec5b7ffa4b6bdc Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Wed, 16 Oct 2024 23:57:24 +0200 Subject: Cleaned up the layout a bit --- templates/controls.j2 | 10 +++++++++- templates/index.j2 | 35 +++++++++++++++-------------------- templates/macros.j2 | 4 ++-- 3 files changed, 26 insertions(+), 23 deletions(-) (limited to 'templates') diff --git a/templates/controls.j2 b/templates/controls.j2 index 1799e01..8e190c5 100644 --- a/templates/controls.j2 +++ b/templates/controls.j2 @@ -1,3 +1,5 @@ +{% from "macros.j2" import court %} +

Controls

@@ -48,4 +50,10 @@ hx-target="#games">Reset
-
+
+
+{% for key, value in courts.items() %} + {{ court(key, value) }} +{% endfor %} +
+
\ No newline at end of file diff --git a/templates/index.j2 b/templates/index.j2 index fcea4e3..22c72a0 100644 --- a/templates/index.j2 +++ b/templates/index.j2 @@ -11,29 +11,24 @@
- -
-
+
+
+
+ +

Games

- {% include 'controls.j2' %} -
-
-

Courts

-
+

Players

diff --git a/templates/macros.j2 b/templates/macros.j2 index 7117d11..65d886f 100644 --- a/templates/macros.j2 +++ b/templates/macros.j2 @@ -1,7 +1,7 @@ {% macro court(id, status) -%} + hx-swap="outerHTML"> Court {{ id }} {%- endmacro %} {% macro player(id, status, name) -%} @@ -18,6 +18,6 @@ {% macro timer(mins, secs) -%}
-

Timer: {{mins}}:{{secs}}

+

⏲️ {{mins}}:{{secs}}

{%- endmacro %} \ No newline at end of file -- cgit v1.3.1