-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (88 loc) · 3.35 KB
/
index.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="styles.css" >
<script defer src="script.js"></script>
</head>
<body>
<main>
<!--Switch buttons -->
<div class="buttons-container">
<button id="loginButton">Login</button>
<button id="registerButton">Register</button>
</div>
<!--Register -->
<div class="form-container" id="registerForm" style="display: none">
<h2>Register</h2>
<form id="formRegister" action="/" method="GET">
<div class="form-group">
<label for="name">Name</label>
<input
id="name"
name="name"
type="text"
placeholder="Enter your name"
autocomplete="on"
title="Username must be between 3 and 15 characters"
/>
<div id="errorName" class="error"></div>
</div>
<div class="form-group">
<label for="password">Password</label>
<input
id="password"
name="password"
type="password"
placeholder="Enter your password"
title="Password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character."
/>
<div id="errorPassword" class="error"></div>
</div>
<div class="form-group">
<label for="confirmPassword">Confirm Password</label>
<input
id="confirmPassword"
name="confirmPassword"
type="password"
placeholder="Confirm your password"
title="Password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character."
/>
<div id="errorConfirmPassword" class="error"></div>
</div>
<button type="submit" class="submit-button">Register</button>
</form>
</div>
<!--Login-->
<div class="form-container" id="loginForm" style="display: none">
<h2>Login</h2>
<form action="/" id="formLogin" method="GET">
<div class="form-group">
<label for="username">Username</label>
<input type="text"
id="username"
name="username"
placeholder="Username"
autocomplete="on"
title="Username must be between 3 and 15 characters"
/>
<div id="errorUsername" class="error"></div>
</div>
<div class="form-group">
<label for="loginPassword">Password</label>
<input type="password"
id="loginPassword"
name="loginPassword"
placeholder="Password"
title="Password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character."
/>
<div id="errorLoginPassword" class="error"></div>
<button class="submit-button" type="submit">Login</button>
</div>
</form>
</div>
</main>
</body>
</html>