forked from gyanshankar1708/GrowCraft
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsignup.html
More file actions
343 lines (310 loc) · 10.6 KB
/
signup.html
File metadata and controls
343 lines (310 loc) · 10.6 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GrowCraft - Signup</title>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
*{margin:0; padding:0; box-sizing:border-box; font-family:'Poppins', sans-serif;}
body{
background:linear-gradient(135deg,#e6f9ec,#c8f3d6);
display:flex;
justify-content:center;
align-items:center;
min-height:100vh;
animation:fadeIn 1s ease;
}
@keyframes fadeIn {
from{opacity:0; transform:translateY(20px);}
to{opacity:1; transform:translateY(0);}
}
.auth-container{
display:flex;
width:850px;
max-width:95%;
background:#fff;
border-radius:12px;
overflow:hidden;
box-shadow:0 12px 30px rgba(0,0,0,0.2);
align-items:center;
transition:all 0.4s ease;
animation:slideUp 1s ease;
}
@keyframes slideUp {
from{opacity:0; transform:translateY(30px);}
to{opacity:1; transform:translateY(0);}
}
.auth-image{
flex:1;
background:linear-gradient(160deg,#a8e6cf,#dcedc8);
padding:20px;
display:flex;
flex-direction:column;
align-items:center;
gap:20px;
position:relative;
overflow:hidden;
}
.auth-image img{
width:140px;
border-radius:8px;
margin-bottom:10px;
transition:transform 0.3s ease;
}
.auth-image img:hover{
transform:scale(1.05);
}
.info-card{
background:white;
border-radius:12px;
padding:12px 15px;
width:85%;
display:flex;
align-items:center;
gap:12px;
box-shadow:0 4px 10px rgba(0,0,0,0.1);
transition:all 0.4s ease;
animation:float 3s ease-in-out infinite;
}
.info-card:hover{
transform:translateY(-10px) scale(1.03);
box-shadow:0 8px 20px rgba(0,0,0,0.2);
}
@keyframes float{
0%,100%{transform:translateY(0);}
50%{transform:translateY(-6px);}
}
.info-card i{font-size:20px; color:#2e7d32; min-width:25px;}
.info-card span{font-size:14px; color:#2e7d32; font-weight:500;}
.auth-form{
flex:1;
padding:40px 30px;
background:linear-gradient(135deg,#66bb6a,#43a047);
color:white;
display:flex;
flex-direction:column;
justify-content:center;
border-radius:0 12px 12px 0;
transition:all 0.4s ease;
}
.auth-form h2{text-align:center; font-size:28px; margin-bottom:5px;}
.auth-form p{text-align:center; font-size:14px; margin-bottom:20px; color:#dcedc8;}
.auth-form form{display:flex; flex-direction:column; gap:14px;}
.auth-form input, .auth-form select{
padding:14px;
border:none;
border-radius:6px;
outline:none;
font-size:14px;
transition:all 0.3s ease;
}
.auth-form input:focus, .auth-form select:focus{
border:2px solid #a5d6a7;
box-shadow:0 4px 10px rgba(0,0,0,0.1);
}
/* Password wrapper for eye icon */
.password-wrapper{
position:relative;
display:flex;
align-items:center;
}
.password-wrapper input{
flex:1;
padding-right:40px;
}
.password-wrapper i{
position:absolute;
right:12px;
cursor:pointer;
color:#1b5e20;
}
.auth-form button{
padding:14px;
background:#1b5e20;
border:none;
border-radius:6px;
color:white;
font-size:16px;
cursor:pointer;
margin-top:5px;
transition:all 0.3s ease;
}
.auth-form button:hover{
background:#2e7d32;
transform:scale(1.05);
}
.terms-container{
display:flex;
align-items:center;
gap:8px;
font-size:13px;
margin-top:5px;
}
.terms-container input{margin:0;}
.terms-container a{color:#dcedc8; text-decoration:none;}
.terms-container a:hover{color:#ffffff;}
.social-login{
display:flex;
justify-content:center;
gap:10px;
margin-top:12px;
}
.social-login a{
flex:1;
display:flex;
align-items:center;
justify-content:center;
gap:6px;
padding:10px;
border-radius:6px;
text-decoration:none;
font-weight:600;
color:#fff;
border:2px solid white;
transition:all 0.3s ease;
}
.social-login a.google:hover{
background:#fff;
color:#db4437;
transform:scale(1.05);
}
.social-login a.linkedin:hover{
background:#fff;
color:#0077b5;
transform:scale(1.05);
}
#strengthBar{
width:100%;
height:6px;
background:#ddd;
border-radius:4px;
margin-top:5px;
overflow:hidden;
}
#strengthBar span{
display:block;
height:100%;
width:0%;
transition:width 0.3s ease;
}
.signin-link{text-align:center; margin-top:14px; font-size:13px;}
.signin-link a{color:#dcedc8; text-decoration:none;}
@media(max-width:1024px){
.auth-container{flex-direction:column;width:90%;}
.auth-image{flex-direction:row; flex-wrap:wrap; justify-content:center; padding:15px; border-radius:12px 12px 0 0;}
.info-card{width:45%; margin-bottom:10px;}
.auth-form{border-radius:0 0 12px 12px; padding:25px 20px;}
}
@media(max-width:600px){
.auth-form h2{font-size:24px;}
.auth-form input, .auth-form select{padding:10px; font-size:13px;}
.auth-form button{padding:10px; font-size:14px;}
.info-card i{font-size:18px;}
.info-card span{font-size:12px;}
.social-login a{font-size:12px; padding:8px;}
}
</style>
</head>
<body>
<div class="auth-container">
<div class="auth-image">
<img src="images/Logo_new.png" alt="GrowCraft Logo">
<div class="info-card"><i class="fas fa-laptop-code"></i><span>Website Development</span></div>
<div class="info-card"><i class="fas fa-bullhorn"></i><span>Digital Marketing</span></div>
<div class="info-card"><i class="fas fa-share-alt"></i><span>Social Media Management</span></div>
</div>
<div class="auth-form">
<h2>Sign Up</h2>
<p>Create your account and start growing!</p>
<form id="signupForm">
<select id="role" required>
<option value="">Select Role</option>
<option value="student">Student</option>
<option value="client">Client</option>
</select>
<input type="text" id="name" placeholder="Full Name" required>
<input type="email" id="email" placeholder="Enter your email" required>
<input type="tel" id="phone" placeholder="Phone Number" maxlength="10" required>
<!-- Password field with eye icon -->
<div class="password-wrapper">
<input type="password" id="password" placeholder="Password (min 6 chars)" required onkeyup="checkStrength()">
<i class="fas fa-eye" onclick="togglePassword('password', this)"></i>
</div>
<div id="strengthBar"></div>
<span id="strengthText" style="font-size: 12px; display:block; margin-top:4px;"></span>
<div class="password-wrapper">
<input type="password" id="confirmPassword" placeholder="Confirm Password" required>
<i class="fas fa-eye" onclick="togglePassword('confirmPassword', this)"></i>
</div>
<div class="terms-container">
<input type="checkbox" id="terms" required>
<label for="terms">I agree to <a href="register_terms.html">Terms</a> and <a href="register_conditions.html">Conditions</a></label>
</div>
<button type="submit">Sign Up</button>
<p style="text-align:center;margin-top:10px;">or continue with</p>
<div class="social-login">
<a class="google" href="https://accounts.google.com" target="_blank"><i class="fab fa-google"></i> Google</a>
<a class="linkedin" href="https://www.linkedin.com" target="_blank"><i class="fab fa-linkedin"></i> LinkedIn</a>
</div>
<div class="signin-link">
<p>Already have an account?
<a href="login.html" style="font-weight: 600; font-size: 1.3em; color: #00BFFF;">Sign in</a>
</p>
</div>
</form>
</div>
</div>
<script>
function togglePassword(id, icon){
const input = document.getElementById(id);
if(input.type === "password"){
input.type = "text";
icon.classList.replace('fa-eye','fa-eye-slash');
} else {
input.type = "password";
icon.classList.replace('fa-eye-slash','fa-eye');
}
}
document.getElementById("signupForm").addEventListener("submit", function(e){
e.preventDefault();
const role = document.getElementById("role").value;
const name = document.getElementById("name").value.trim();
const email = document.getElementById("email").value.trim();
const phone = document.getElementById("phone").value.trim();
const password = document.getElementById("password").value;
const confirmPassword = document.getElementById("confirmPassword").value;
const terms = document.getElementById("terms").checked;
const nameRegex = /^[A-Za-z ]+$/;
const phoneRegex = /^[0-9]{10}$/;
if(role===""){alert("Please select a role."); return;}
if(!nameRegex.test(name)){alert("Name should contain letters only."); return;}
if(!email){alert("Please enter your email."); return;}
if(!phoneRegex.test(phone)){alert("Phone number must be 10 digits."); return;}
if(password.length<6){alert("Password must be at least 6 characters."); return;}
if(password!==confirmPassword){alert("Passwords do not match."); return;}
if(!terms){alert("You must agree to Terms & Conditions."); return;}
alert("Signup successful!\nRole: "+role+"\nName: "+name+"\nEmail: "+email);
});
function checkStrength(){
const password = document.getElementById("password").value;
const strengthBar = document.getElementById("strengthBar");
const strengthText = document.getElementById("strengthText");
let strength = 0;
if(password.length >= 6) strength++;
if(/[A-Z]/.test(password)) strength++;
if(/[0-9]/.test(password)) strength++;
if(/[!@#$%^&*(),.?":{}|<>]/.test(password)) strength++;
let width = ["0%", "25%", "50%", "75%", "100%"];
let text = ["", "Very Weak", "Weak", "Good", "Strong"];
let color = ["", "red", "orange", "gold", "green"];
strengthBar.innerHTML = `<span style="width:${width[strength]}; background:${color[strength]};"></span>`;
strengthText.textContent = text[strength];
strengthText.style.color = color[strength];
}
</script>
</body>
</html>