-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegistration.html
More file actions
250 lines (215 loc) · 7.26 KB
/
Registration.html
File metadata and controls
250 lines (215 loc) · 7.26 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
margin: 0;
font-family: 'Poppins', sans-serif;
background-color: #f4f4f4;
color: #333;
}
.navbar {
background-color: #333;
color: #fff;
padding: 0px 20px;
position: sticky;
height: 100px;
display: flex;
justify-content: space-between;
align-items: center;
top: 0;
z-index: 2;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.navbar-container {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
.navbar-menu {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
.navbar-link {
text-decoration: none;
color: #fff;
margin: 0 20px;
font-size: 1.2rem;
transition: color 0.3s, transform 0.3s;
}
.navbar-link:hover {
color: #ff9900;
transform: scale(1.1);
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 80vh;
}
header {
background-color: #fec20c;
padding: 15px 50px;
text-align: center;
width: 92vw;
font-size: 1.5rem;
font-weight: bold;
border-radius: 8px;
}
.form-container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
width: 350px;
text-align: center;
}
form {
display: flex;
flex-direction: column;
}
label {
font-weight: 500;
margin: 8px 0 5px;
text-align: left;
}
input {
border: 2px solid black;
height: 40px;
border-radius: 8px;
width: 100%;
padding-left: 10px;
font-size: 1rem;
transition: 0.3s ease;
}
/* Login Button Styling */
.login-button {
margin-top: 15px;
background-color: #28a745;
color: white;
border: none;
height: 40px;
border-radius: 8px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: 0.3s;
}
.login-button:hover {
background-color: #218838;
transform: scale(1.05);
}
.footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px 0;
margin-top: 40px;
}
.navbar-item {
position: relative;
}
.navbar-item .dropdown {
position: absolute;
top: 100%;
left: 0;
background: #333;
list-style: none;
padding: 0;
margin: 0;
display: none;
border-radius: 0 0 5px 5px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.navbar-item:hover .dropdown {
display: block;
}
.navbar-item .dropdown li a {
display: block;
padding: 10px 20px;
white-space: nowrap;
text-decoration: none;
color: white;
}
.navbar-item .dropdown li a:hover {
background: #ff9900;
}
</style>
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<ul class="navbar-menu">
<li><a href="index.html" class="navbar-link">Home</a></li>
<li class="navbar-item">
<a href="#" class="navbar-link">Cafe's ▾</a>
<ul class="dropdown">
<li><a href="aroma.html">Cafe Aroma</a></li>
<li><a href="delight.html">Cafe Delight</a></li>
<li><a href="bliss.html">Cafe Bliss</a></li>
<li><a href="supreme.html">Cafe Supreme</a></li>
</ul>
</li>
<li><a href="Aboutus.html" class="navbar-link">About US</a></li>
<li><a href="gallery.html" class="navbar-link">Gallery</a></li>
<li><a href="login.html" class="navbar-link">Login</a></li>
</ul>
</div>
</nav>
<div class="container">
<header>Registration</header>
<div class="form-container">
<form id="loginForm">
<label for="name">Enter the username:</label>
<input type="text" id="name" placeholder="Username">
<label for="contact">Enter the contact number:</label>
<input type="number" id="contact" placeholder="Phone number">
<label for="email">Enter your email:</label>
<input type="email" id="email" placeholder="Email">
<label for="password">Set your password:</label>
<input type="password" id="password" placeholder="Password">
<button type="submit" class="login-button" onclick="validateForm()">Register</button>
</form>
</div>
</div>
<footer class="footer">
<p>© 2025 White Chillies. All Rights Reserved.</p>
</footer>
<script>
document.getElementById("loginForm").addEventListener("submit", function (event) {
event.preventDefault(); // Prevent form submission
let name = document.getElementById("name").value.trim();
let contact = document.getElementById("contact").value.trim();
let email = document.getElementById("email").value.trim();
let password = document.getElementById("password").value.trim();
if (name === "") {
alert("Enter a valid Username");
return;
}
if (!/^\d{10}$/.test(contact)) {
alert("Enter a valid Contact Number (10 digits)");
return;
}
if (!email.includes("@") || !email.includes(".")) {
alert("Enter a valid Email Address");
return;
}
if (password.length < 8) {
alert("Your password should be at least 8 characters long");
return;
}
alert("Registration Successful!");
this.submit(); // Only submit if all validations pass
});
</script>
</body>
</html>