-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsignup.html
75 lines (69 loc) · 2.23 KB
/
signup.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration - Squidward Project</title>
<link href="https://fonts.googleapis.com/css2?family=Bubbler+One&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #add8e6;
font-family: 'Bubbler One', sans-serif;
color: #333;
}
form {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 20px;
}
input[type="text"], input[type="password"] {
width: 300px;
padding: 10px;
margin: 10px 0;
border: 2px solid #333;
border-radius: 5px;
font-size: 1em;
}
button {
padding: 10px 20px;
background-color: #333;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
}
button:hover {
background-color: #555;
}
</style>
</head>
<body>
<h1>Create an Account</h1>
<form id="registerForm">
<input type="text" id="username" placeholder="Username" required>
<input type="password" id="password" placeholder="Password" required>
<button type="submit">Register</button>
</form>
<script>
document.getElementById('registerForm').addEventListener('submit', function(event) {
event.preventDefault();
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Store credentials in localStorage
localStorage.setItem('username', username);
localStorage.setItem('password', password);
alert('Account created successfully!');
// Redirect to login page
window.location.href = 'https://azenark.github.io/login.html';
});
</script>
</body>
</html>