From 74480cbe2b335fd141cdf5f07bb08808c0d08692 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Wed, 16 Oct 2024 21:47:26 +0200 Subject: Added all macros and also stored the js, css, png and ico files --- templates/court.j2 | 2 +- templates/courts.j2 | 8 ++------ templates/guests.j2 | 2 +- templates/index.j2 | 54 ++++++++++++++++++++++++++++++++++++++++------------ templates/macros.j2 | 11 +++++++++++ templates/player.j2 | 7 +------ templates/players.j2 | 5 +++-- 7 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 templates/macros.j2 (limited to 'templates') diff --git a/templates/court.j2 b/templates/court.j2 index 859c942..d7aec86 100644 --- a/templates/court.j2 +++ b/templates/court.j2 @@ -1 +1 @@ - \ No newline at end of file +{% from "macros.j2" import court %}{{ court(key, value) }} \ No newline at end of file diff --git a/templates/courts.j2 b/templates/courts.j2 index 2bc8a95..d650298 100644 --- a/templates/courts.j2 +++ b/templates/courts.j2 @@ -1,12 +1,8 @@ +{% from "macros.j2" import court %}
{% for key, value in courts.items() %} -
- -
+ {{ court(key, value) }} {% endfor %}
\ No newline at end of file diff --git a/templates/guests.j2 b/templates/guests.j2 index b5d251f..b84a2fd 100644 --- a/templates/guests.j2 +++ b/templates/guests.j2 @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/templates/index.j2 b/templates/index.j2 index 42fc43e..4ccdf92 100644 --- a/templates/index.j2 +++ b/templates/index.j2 @@ -3,10 +3,10 @@ - 🏸Match Up! - - - + Match Up! + + + -
-
-

🏸The Smashing Fellows

+
+

Games

@@ -31,11 +46,19 @@
- +
- +
@@ -52,14 +75,21 @@
- +
- +
- +
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) -%} + +{%- endmacro %} + +{% macro player(id, status, name) -%} + +{%- endmacro %} \ No newline at end of file diff --git a/templates/player.j2 b/templates/player.j2 index 7e80285..68a1ea4 100644 --- a/templates/player.j2 +++ b/templates/player.j2 @@ -1,6 +1 @@ - \ No newline at end of file +{% from "macros.j2" import player %}{{ player(id, status, name) }} \ No newline at end of file diff --git a/templates/players.j2 b/templates/players.j2 index 080c03a..4eedc54 100644 --- a/templates/players.j2 +++ b/templates/players.j2 @@ -1,8 +1,9 @@ +{% from "macros.j2" import player %}
-{% for id, player in players.items() %} +{% for id, value in players.items() %}
- + {{ player(id, value.status, value.name) }}
{% endfor %}
\ No newline at end of file -- cgit v1.3.1