File size: 2,295 Bytes
ed41019
 
 
 
 
 
 
 
 
202aa5d
ed41019
202aa5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ed41019
202aa5d
 
 
 
 
 
 
 
 
 
 
 
 
ed41019
202aa5d
 
 
 
 
 
 
 
 
ed41019
202aa5d
ed41019
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Auth App</title>
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <h1>Auth & Notification App</h1>

    <!-- Registration Section -->
    <div id="register-section" class="auth-section">
        <h2>Register</h2>
        <form id="register-form">
            <label for="reg-email">Email:</label>
            <input type="email" id="reg-email" name="email" required><br><br>
            <label for="reg-password">Password:</label>
            <input type="password" id="reg-password" name="password" required minlength="8"><br><br>
            <label for="reg-confirm-password">Confirm Password:</label>
            <input type="password" id="reg-confirm-password" name="confirm_password" required minlength="8"><br><br>
            <button type="submit">Register</button>
        </form>
        <p id="register-status" class="status-message"></p>
        <p>Already have an account? <a href="#" onclick="showSection('login-section')">Login here</a></p>
    </div>

    <!-- Login Section -->
    <div id="login-section" class="auth-section" style="display: none;">
        <h2>Login</h2>
        <form id="login-form">
            <label for="login-email">Email:</label>
            <input type="email" id="login-email" name="email" required><br><br>
            <label for="login-password">Password:</label>
            <input type="password" id="login-password" name="password" required><br><br>
            <button type="submit">Login</button>
        </form>
        <p id="login-status" class="status-message"></p>
        <p>Don't have an account? <a href="#" onclick="showSection('register-section')">Register here</a></p>
    </div>

    <!-- Welcome Section (shown after login) -->
    <div id="welcome-section" style="display: none;">
        <h2>Welcome!</h2>
        <p id="welcome-message">Welcome, user!</p>
        <button id="logout-button">Logout</button>
        <hr>
        <h2>Real-time Notifications</h2>
        <div id="notifications">
            <p><em>Notifications will appear here...</em></p>
        </div>
    </div>

    <script src="/static/js/script.js"></script>
</body>
</html>