arshtech commited on
Commit
078261b
·
verified ·
1 Parent(s): 2bb837f

Create templates/login.html

Browse files
Files changed (1) hide show
  1. templates/login.html +48 -0
templates/login.html ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Login</title>
6
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
7
+ <style>
8
+ body { font-family: Arial, Helvetica, sans-serif; display:flex; align-items:center; justify-content:center; height:100vh; margin:0; background:#f3f4f6; }
9
+ .card { background:#fff; padding:24px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,0.08); width:320px; }
10
+ h2 { margin-top:0; margin-bottom:16px; font-size:20px; }
11
+ input[type="email"], input[type="password"] { width:100%; padding:10px; margin:6px 0 12px 0; border-radius:6px; border:1px solid #ccc; box-sizing:border-box; }
12
+ button { width:100%; padding:10px; border-radius:6px; border:none; background:#2563eb; color:white; font-weight:600; cursor:pointer; }
13
+ .small { margin-top:12px; text-align:center; }
14
+ .link { color:#2563eb; text-decoration:none; font-weight:600; }
15
+ .flash { padding:8px; border-radius:6px; margin-bottom:12px; font-size:14px; }
16
+ .flash.success { background:#d1fae5; color:#064e3b; }
17
+ .flash.danger { background:#fee2e2; color:#b91c1c; }
18
+ .flash.warning { background:#fff7ed; color:#92400e; }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <div class="card">
23
+ <h2>Login</h2>
24
+
25
+ {% with messages = get_flashed_messages(with_categories=true) %}
26
+ {% if messages %}
27
+ {% for category, msg in messages %}
28
+ <div class="flash {{ category }}">{{ msg }}</div>
29
+ {% endfor %}
30
+ {% endif %}
31
+ {% endwith %}
32
+
33
+ <form method="post" action="{{ url_for('login') }}">
34
+ <label for="email">Email</label><br>
35
+ <input id="email" name="email" type="email" required value="{{ email|default('') }}"><br>
36
+
37
+ <label for="password">Password</label><br>
38
+ <input id="password" name="password" type="password" required><br>
39
+
40
+ <button type="submit">Login</button>
41
+ </form>
42
+
43
+ <div class="small">
44
+ <p>Don't have an account? <a class="link" href="{{ url_for('register') }}">Register</a></p>
45
+ </div>
46
+ </div>
47
+ </body>
48
+ </html>