From 60a489cfb3fb7a12a06212c2c7ed3c05cd0757b5 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Fri, 25 Oct 2024 18:03:18 +0200 Subject: Moved the files into a folder structure --- src/match_up/templates/controls.j2 | 56 +++++++++++++++++++++++++++++++ src/match_up/templates/games.j2 | 21 ++++++++++++ src/match_up/templates/index.j2 | 13 ++++++++ src/match_up/templates/macros.j2 | 67 ++++++++++++++++++++++++++++++++++++++ src/match_up/templates/players.j2 | 17 ++++++++++ 5 files changed, 174 insertions(+) create mode 100644 src/match_up/templates/controls.j2 create mode 100644 src/match_up/templates/games.j2 create mode 100644 src/match_up/templates/index.j2 create mode 100644 src/match_up/templates/macros.j2 create mode 100644 src/match_up/templates/players.j2 (limited to 'src/match_up/templates') diff --git a/src/match_up/templates/controls.j2 b/src/match_up/templates/controls.j2 new file mode 100644 index 0000000..6ba724a --- /dev/null +++ b/src/match_up/templates/controls.j2 @@ -0,0 +1,56 @@ +{% from "macros.j2" import court %} +
+
+ {% for key, value in courts.items() %} + {{ court(key, value) }} + {% endfor %} +
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/src/match_up/templates/games.j2 b/src/match_up/templates/games.j2 new file mode 100644 index 0000000..d5afef1 --- /dev/null +++ b/src/match_up/templates/games.j2 @@ -0,0 +1,21 @@ + + + + + + + + + + +{% for game in games %} + + + +{% endfor %} + +
{{ title }}
Court Team 1 Team 2
{{ game.court }}{{ game.team1.player1 }} + {{ game.team1.player2 }} + {{ game.team2.player1 }} + {{ game.team2.player2 }} +
\ No newline at end of file diff --git a/src/match_up/templates/index.j2 b/src/match_up/templates/index.j2 new file mode 100644 index 0000000..832dbfb --- /dev/null +++ b/src/match_up/templates/index.j2 @@ -0,0 +1,13 @@ +{% from "macros.j2" import header, footer, navbar %} + + + {{ header() }} + +
+ {{ navbar() }} +
+
+ {{ footer() }} +
+ + diff --git a/src/match_up/templates/macros.j2 b/src/match_up/templates/macros.j2 new file mode 100644 index 0000000..8d05bb0 --- /dev/null +++ b/src/match_up/templates/macros.j2 @@ -0,0 +1,67 @@ +{% macro court(id, status) -%} + +{%- endmacro %} + +{% macro player(id, status, name) -%} + +{%- endmacro %} + +{% macro guests(count) -%} +
+ +
+{%- endmacro %} + +{% macro timer(mins, secs) -%} +
+

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

+
+{%- endmacro %} + +{% macro header() -%} + + + + Match Up! + + + + + +{%- endmacro %} + +{% macro footer() -%} +
Made by Karan using Flask, HTMX and Bulma
+{%- endmacro %} + +{% macro navbar() -%} + +{%- endmacro %} \ No newline at end of file diff --git a/src/match_up/templates/players.j2 b/src/match_up/templates/players.j2 new file mode 100644 index 0000000..ae6afe0 --- /dev/null +++ b/src/match_up/templates/players.j2 @@ -0,0 +1,17 @@ +{% from "macros.j2" import header, navbar, footer, player %} + + + {{ header() }} + +
+ {{ navbar() }} +
+
+ {% for id, value in players.items() %} +
{{ player(id, value.status, value.name) }}
+ {% endfor %} +
+ {{ footer() }} +
+ + \ No newline at end of file -- cgit v1.3.1