summaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-07-06 15:13:27 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-07-06 15:13:27 +0200
commitceb264b6bdfed8c51e54deed2b6132fecff3934d (patch)
tree6a403d915e96fa0b090bd362ebf6fb8048fd5de8 /app/templates
parent279faac0323da94535e6ee3b82458f858ec7178a (diff)
Added the basic login
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/index.j29
-rw-r--r--app/templates/login.j225
2 files changed, 34 insertions, 0 deletions
diff --git a/app/templates/index.j2 b/app/templates/index.j2
index ce0d531..656b187 100644
--- a/app/templates/index.j2
+++ b/app/templates/index.j2
@@ -7,6 +7,15 @@
{{ navbar(url_for) }}
<div hx-post="/clear" hx-swap="outerHTML" hx-trigger="load"></div>
<div hx-get="/control" hx-swap="outerHTML" hx-trigger="load"></div>
+ {% with messages = get_flashed_messages() %}
+ {% if messages %}
+ <ul>
+ {% for message in messages %}
+ <li>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endwith %}
{{ footer() }}
</section>
</body>
diff --git a/app/templates/login.j2 b/app/templates/login.j2
new file mode 100644
index 0000000..fe898cb
--- /dev/null
+++ b/app/templates/login.j2
@@ -0,0 +1,25 @@
+{% from "macros.j2" import header, footer, navbar %}
+<!doctype html>
+<html lang="en">
+ {{ header(url_for) }}
+ <body>
+ <section class="section">
+ {{ navbar(url_for) }}
+ <h1>Sign In</h1>
+ <form action="" method="post" novalidate>
+ {{ form.hidden_tag() }}
+ <p>
+ {{ form.username.label }}<br>
+ {{ form.username(size=32) }}
+ </p>
+ <p>
+ {{ form.password.label }}<br>
+ {{ form.password(size=32) }}
+ </p>
+ <p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
+ <p>{{ form.submit() }}</p>
+ </form>
+ {{ footer() }}
+ </section>
+ </body>
+</html>