arshtech commited on
Commit
27a1274
·
verified ·
1 Parent(s): 078261b

Create templates/register.html

Browse files
Files changed (1) hide show
  1. templates/register.html +51 -0
templates/register.html ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Register</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:360px; }
10
+ h2 { margin-top:0; margin-bottom:12px; font-size:20px; }
11
+ input[type="text"], 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:#059669; 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>Register</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('register') }}">
34
+ <label for="username">Username</label><br>
35
+ <input id="username" name="username" type="text" required value="{{ username|default('') }}"><br>
36
+
37
+ <label for="email">Email</label><br>
38
+ <input id="email" name="email" type="email" required value="{{ email|default('') }}"><br>
39
+
40
+ <label for="password">Password</label><br>
41
+ <input id="password" name="password" type="password" required><br>
42
+
43
+ <button type="submit">Register</button>
44
+ </form>
45
+
46
+ <div class="small">
47
+ <p>Already registered? <a class="link" href="{{ url_for('login') }}">Login</a></p>
48
+ </div>
49
+ </div>
50
+ </body>
51
+ </html>