-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistration.html
More file actions
356 lines (315 loc) · 10.5 KB
/
Copy pathregistration.html
File metadata and controls
356 lines (315 loc) · 10.5 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
344
345
346
347
348
349
350
351
352
353
354
355
356
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DevHub – Sign Up & Login</title>
<style>
:root {
--primary: #007bff;
--light-gray: #f5f5f5;
--text: #222;
--border: #ddd;
}
body {
font-family: "Poppins", sans-serif;
margin: 0;
background: var(--light-gray);
color: var(--text);
}
/* Navbar (already part of your site) */
nav {
display: flex;
justify-content: space-between;
align-items: center;
background: white;
padding: 15px 40px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
position: sticky;
top: 0;
}
.nav-left {
font-size: 1.3rem;
font-weight: 600;
color: var(--primary);
}
.nav-right {
display: flex;
align-items: center;
gap: 10px;
}
.nav-right input {
padding: 8px 12px;
border-radius: 6px;
border: 1px solid var(--border);
}
.nav-btn {
padding: 8px 14px;
border: none;
border-radius: 6px;
cursor: pointer;
background: var(--primary);
color: white;
transition: 0.2s;
}
.nav-btn:hover {
background: #0056c2;
}
/* ===== Modals ===== */
.modal {
display: none;
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.5);
justify-content: center;
align-items: center;
z-index: 2000;
}
.modal.active { display: flex; }
.modal-content {
background: white;
padding: 30px;
border-radius: 12px;
width: 90%;
max-width: 450px;
position: relative;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from {opacity: 0; transform: translateY(-10px);}
to {opacity: 1; transform: translateY(0);}
}
.close-btn {
position: absolute;
top: 12px; right: 15px;
background: none;
border: none;
font-size: 1.3rem;
cursor: pointer;
}
h2 {
text-align: center;
margin-bottom: 15px;
color: var(--primary);
}
form {
display: flex;
flex-direction: column;
gap: 12px;
}
input, select, textarea {
padding: 10px;
border-radius: 8px;
border: 1px solid var(--border);
width: 100%;
box-sizing: border-box;
}
button {
padding: 10px;
border-radius: 8px;
border: none;
cursor: pointer;
background: var(--primary);
color: white;
font-weight: 500;
}
button:hover {
background: #0056c2;
}
.btn-secondary {
background: #ccc;
color: #000;
}
.btn-secondary:hover {
background: #bbb;
}
.step-indicator {
display: flex;
justify-content: center;
gap: 6px;
margin-bottom: 12px;
}
.dot {
width: 10px; height: 10px;
background: #ccc;
border-radius: 50%;
}
.dot.active {
background: var(--primary);
}
.hidden { display: none; }
.generate-btn {
background: transparent;
color: var(--primary);
text-decoration: underline;
font-size: 0.9rem;
cursor: pointer;
border: none;
}
</style>
</head>
<body>
<nav>
<div class="nav-left">DevHub</div>
<div class="nav-right">
<input type="text" placeholder="Search developers..." />
<button class="nav-btn" id="openLogin">Log In</button>
<button class="nav-btn" id="openSignup">Sign Up</button>
</div>
</nav>
<!-- ===== Login Modal ===== -->
<div class="modal" id="loginModal">
<div class="modal-content">
<button class="close-btn" onclick="closeModal('loginModal')">×</button>
<h2>Log In</h2>
<form id="loginForm">
<input type="email" placeholder="Email address" required />
<input type="password" placeholder="Password" required />
<label><input type="checkbox" /> Remember Me</label>
<button type="submit">Log In</button>
</form>
</div>
</div>
<!-- ===== Signup Modal (3 steps) ===== -->
<div class="modal" id="signupModal">
<div class="modal-content">
<button class="close-btn" onclick="closeModal('signupModal')">×</button>
<h2>Sign Up</h2>
<div class="step-indicator">
<div class="dot" id="dot1"></div>
<div class="dot" id="dot2"></div>
<div class="dot" id="dot3"></div>
</div>
<!-- Step 1 -->
<form id="signupStep1" class="signup-step">
<input id="fullName" type="text" placeholder="Full Name" required />
<input id="email" type="email" placeholder="Email Address" required />
<input id="password" type="password" placeholder="Password" required />
<input id="confirmPassword" type="password" placeholder="Confirm Password" required />
<select id="userType">
<option value="">Select User Type</option>
<option value="Developer">Developer</option>
<option value="Client">Client</option>
</select>
<label><input type="checkbox" required /> Agree to Terms</label>
<button type="button" onclick="nextStep(2)">Next</button>
<button class="generate-btn" type="button" onclick="generateDemo()">Generate Demo Details</button>
</form>
<!-- Step 2 (Developer or Client details) -->
<form id="signupStep2" class="signup-step hidden">
<div id="devFields" class="">
<input type="text" placeholder="Username / Display Name" />
<textarea placeholder="Short Bio"></textarea>
<input type="text" placeholder="Skills (comma separated)" />
<select>
<option value="">Experience Level</option>
<option>Junior</option><option>Mid</option><option>Senior</option>
</select>
<input type="number" placeholder="Years of Experience" />
<input type="url" placeholder="Portfolio / GitHub link" />
<input type="text" placeholder="Location / Timezone" />
<input type="number" placeholder="Hourly Rate (USD)" />
</div>
<div id="clientFields" class="hidden">
<input type="text" placeholder="Company / Organization Name" />
<input type="url" placeholder="Company Website" />
<input type="text" placeholder="Industry" />
<input type="text" placeholder="Company Size" />
<input type="email" placeholder="Work Email" />
<input type="text" placeholder="Project Budget Range" />
<input type="text" placeholder="Location / Timezone" />
</div>
<div style="display:flex;justify-content:space-between;gap:8px;">
<button type="button" class="btn-secondary" onclick="prevStep(1)">Back</button>
<button type="button" onclick="nextStep(3)">Next</button>
</div>
</form>
<!-- Step 3 -->
<form id="signupStep3" class="signup-step hidden">
<input type="tel" placeholder="Phone Number" />
<input type="text" placeholder="Verification Code" />
<select>
<option>Preferred Communication</option>
<option>Email</option>
<option>WhatsApp</option>
<option>Slack</option>
</select>
<label><input type="checkbox" /> Subscribe to updates</label>
<label><input type="checkbox" required /> Agree to Privacy Policy</label>
<div style="display:flex;justify-content:space-between;gap:8px;">
<button type="button" class="btn-secondary" onclick="prevStep(2)">Back</button>
<button type="submit">Finish & Create Account</button>
</div>
</form>
</div>
</div>
<script>
const steps = [1, 2, 3];
let currentStep = 1;
function openModal(id) {
document.getElementById(id).classList.add('active');
updateDots();
}
function closeModal(id) {
document.getElementById(id).classList.remove('active');
currentStep = 1;
showStep(1);
}
document.getElementById('openSignup').onclick = () => openModal('signupModal');
document.getElementById('openLogin').onclick = () => openModal('loginModal');
function nextStep(n) {
const userType = document.getElementById('userType').value;
if (n === 2 && !userType) {
alert("Please select user type first.");
return;
}
currentStep = n;
showStep(n);
}
function prevStep(n) {
currentStep = n;
showStep(n);
}
function showStep(n) {
steps.forEach(step => {
document.getElementById(`signupStep${step}`).classList.add('hidden');
document.getElementById(`dot${step}`).classList.remove('active');
});
document.getElementById(`signupStep${n}`).classList.remove('hidden');
document.getElementById(`dot${n}`).classList.add('active');
const userType = document.getElementById('userType').value;
if (n === 2) {
if (userType === 'Developer') {
document.getElementById('devFields').classList.remove('hidden');
document.getElementById('clientFields').classList.add('hidden');
} else if (userType === 'Client') {
document.getElementById('devFields').classList.add('hidden');
document.getElementById('clientFields').classList.remove('hidden');
}
}
}
function updateDots() {
steps.forEach(step => {
document.getElementById(`dot${step}`).classList.toggle('active', step === currentStep);
});
}
function generateDemo() {
const rand = () => Math.random().toString(36).substring(2, 8);
document.getElementById("fullName").value = "Demo User " + rand();
document.getElementById("email").value = "demo_" + rand() + "@mail.com";
const pass = "P@ss" + rand() + "!";
document.getElementById("password").value = pass;
document.getElementById("confirmPassword").value = pass;
document.getElementById("userType").value = "Developer";
alert("Demo details generated!");
}
document.getElementById("signupStep3").onsubmit = e => {
e.preventDefault();
alert("Account created successfully! 🎉");
closeModal("signupModal");
};
</script>
</body>
</html>