From 4aee68096c11ce1e3762fb8cffbde2a14dfa3cd0 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Mon, 14 Jul 2025 19:51:45 +0200 Subject: Added the login for changes --- app/templates/controls.j2 | 2 +- app/templates/index.j2 | 9 --------- app/templates/login.html | 23 +++++++++++++++++++++++ app/templates/login.j2 | 25 ------------------------- app/templates/macros.j2 | 30 +++++++++++++++--------------- 5 files changed, 39 insertions(+), 50 deletions(-) create mode 100644 app/templates/login.html delete mode 100644 app/templates/login.j2 (limited to 'app/templates') diff --git a/app/templates/controls.j2 b/app/templates/controls.j2 index eba086d..0acf5a6 100644 --- a/app/templates/controls.j2 +++ b/app/templates/controls.j2 @@ -2,7 +2,7 @@
{% for court in courts %} - {{ court_button(court.id, court.status) }} + {{ court_button(court) }} {% endfor %}
diff --git a/app/templates/index.j2 b/app/templates/index.j2 index 656b187..ce0d531 100644 --- a/app/templates/index.j2 +++ b/app/templates/index.j2 @@ -7,15 +7,6 @@ {{ navbar(url_for) }}
- {% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} - {% endwith %} {{ footer() }} diff --git a/app/templates/login.html b/app/templates/login.html new file mode 100644 index 0000000..a42f2c5 --- /dev/null +++ b/app/templates/login.html @@ -0,0 +1,23 @@ +{% from "macros.j2" import header, footer, navbar %} + + +{{ header(url_for) }} + +
+ {{ navbar(url_for) }} +
+
+ {{ form.csrf_token }} + {{form.username.label(class_="label")}}
{{ form.username(class_="input") }} +

+ {{form.password.label(class_="label")}}
{{ form.password(class_="input") }} +

+ {% if next %}{% endif %} + + + + {{ footer() }} +
+ + + \ No newline at end of file diff --git a/app/templates/login.j2 b/app/templates/login.j2 deleted file mode 100644 index fe898cb..0000000 --- a/app/templates/login.j2 +++ /dev/null @@ -1,25 +0,0 @@ -{% from "macros.j2" import header, footer, navbar %} - - - {{ header(url_for) }} - -
- {{ navbar(url_for) }} -

Sign In

-
- {{ form.hidden_tag() }} -

- {{ form.username.label }}
- {{ form.username(size=32) }} -

-

- {{ form.password.label }}
- {{ form.password(size=32) }} -

-

{{ form.remember_me() }} {{ form.remember_me.label }}

-

{{ form.submit() }}

-
- {{ footer() }} -
- - diff --git a/app/templates/macros.j2 b/app/templates/macros.j2 index a4b2fc1..e8030e7 100644 --- a/app/templates/macros.j2 +++ b/app/templates/macros.j2 @@ -1,7 +1,7 @@ -{% macro court_button(id, status) -%} - +{% macro court_button(court) -%} + {%- endmacro %} {% macro player_button(player) -%} @@ -34,17 +34,17 @@ {% macro header(url_for) -%} - - - Match Up! - - - - - - - - + + +Match Up! + + + + + + + + {%- endmacro %} -- cgit v1.3.1