-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfile.html
More file actions
547 lines (468 loc) · 18.6 KB
/
Copy pathProfile.html
File metadata and controls
547 lines (468 loc) · 18.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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TutorConnect - My Profile</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- FontAwesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
:root {
--primary-color: #A15541;
--neutral-dark: #565D6D;
--neutral-light: #9095A1;
--light-bg: #f8f9fa;
}
body {
font-family: 'Arial', sans-serif;
background-color: var(--light-bg);
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header Styles */
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 2rem;
background: #FFFFFF;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.header-logo img {
width: 120px;
height: auto;
transition: transform 0.3s ease;
}
.header-logo:hover img {
transform: scale(1.05);
}
.navbar-toggler {
border: none;
background: none;
font-size: 1.5rem;
color: var(--neutral-dark);
padding: 0.5rem;
}
.header-menu {
display: flex;
gap: 1.5rem;
margin: 0;
padding: 0;
}
.header-menu-item {
color: var(--neutral-dark);
text-decoration: none;
transition: all 0.3s ease;
padding: 0.5rem 1rem;
border-bottom: 3px solid transparent;
font-weight: 500;
}
.header-menu-item:hover {
color: var(--primary-color);
}
.header-menu-item.selected {
color: var(--primary-color);
font-weight: 600;
border-bottom-color: var(--primary-color);
}
.profile-icon {
width: 40px;
height: 40px;
transition: transform 0.3s ease;
cursor: pointer;
}
.profile-icon img {
width: 100%;
height: 100%;
border-radius: 50%;
border: 2px solid #e0e0e0;
object-fit: cover;
transition: all 0.3s ease;
}
.profile-icon:hover img {
border-color: var(--primary-color);
transform: scale(1.05);
}
/* Main Content */
.profile-container {
flex: 1;
max-width: 800px;
width: 100%;
margin: 2rem auto;
padding: 0 2rem;
}
.profile-card {
background: white;
border-radius: 12px;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
overflow: hidden;
}
.profile-header {
position: relative;
height: 150px;
background: linear-gradient(135deg, var(--primary-color), #c47a6a);
}
/* Updated avatar container positioning */
.avatar-container {
position: absolute;
bottom: -30px;
left: 2rem;
display: flex;
align-items: center;
gap: 1.5rem;
}
.avatar-large {
width: 120px;
height: 120px;
border-radius: 50%;
border: 4px solid white;
background-color: #ddd;
overflow: hidden;
}
.avatar-large img {
width: 100%;
height: 100%;
object-fit: cover;
}
.profile-info {
padding-bottom: 1rem;
}
.profile-body {
padding: 4rem 2rem 2rem;
}
.profile-name {
margin-bottom: 0.5rem;
color: var(--neutral-dark);
font-size: 1.75rem;
}
.profile-title {
color: var(--neutral-light);
margin-bottom: 1.5rem;
}
.edit-profile-btn {
padding: 0.5rem 2rem;
border: 2px solid var(--primary-color);
color: var(--primary-color);
background: white;
border-radius: 2rem;
font-weight: 500;
transition: all 0.3s ease;
margin-bottom: 2rem;
}
.edit-profile-btn:hover {
background-color: var(--primary-color);
color: white;
}
.profile-details {
text-align: left;
padding: 0 1.5rem 2rem;
}
.detail-item {
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid #eee;
}
.detail-item:last-child {
border-bottom: none;
}
.detail-label {
font-weight: 600;
color: var(--neutral-dark);
margin-bottom: 0.5rem;
display: block;
}
.detail-value {
color: var(--neutral-light);
}
/* Edit Profile Modal */
.modal-content {
border-radius: 12px;
overflow: hidden;
}
.modal-header {
background-color: var(--primary-color);
color: white;
border-bottom: none;
}
.modal-body {
padding: 2rem;
}
.form-control, .form-select {
border-radius: 8px;
padding: 0.75rem 1rem;
border: 1px solid #ddd;
}
.form-control:focus, .form-select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.25rem rgba(161, 85, 65, 0.25);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
padding: 0.5rem 1.5rem;
border-radius: 8px;
}
.btn-primary:hover {
background-color: #8a4a38;
border-color: #8a4a38;
}
.avatar-upload {
position: relative;
width: 120px;
margin: 0 auto 1rem;
}
.avatar-edit {
position: absolute;
right: 0;
bottom: 0;
z-index: 1;
}
.avatar-edit input {
display: none;
}
.avatar-edit label {
display: inline-block;
width: 34px;
height: 34px;
background: var(--primary-color);
color: white;
border-radius: 50%;
text-align: center;
line-height: 34px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Footer */
.footer {
background-color: #2d2d2d;
color: white;
padding: 2rem;
margin-top: auto;
}
@media (max-width: 768px) {
.header-menu {
display: none;
}
.profile-container {
padding: 0 1rem;
margin: 1rem auto;
}
.avatar-container {
flex-direction: column;
align-items: flex-start;
left: 50%;
transform: translateX(-50%);
text-align: center;
bottom: -50px;
}
.profile-info {
text-align: center;
padding-top: 1rem;
}
.profile-body {
padding-top: 5rem;
padding-left: 1rem;
padding-right: 1rem;
}
}
</style>
</head>
<body>
<header class="header-container">
<!-- Logo -->
<div class="header-logo">
<img src="assets/Untitled.png" alt="TutorConnect">
</div>
<!-- Hamburger Menu Button -->
<button class="navbar-toggler d-block d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<!-- Navigation Menu -->
<nav class="header-menu d-none d-md-flex">
<a href="homepage2.html" class="header-menu-item">Home</a>
<a href="program.html" class="header-menu-item">Programs</a>
<a href="tutor.html" class="header-menu-item">Tutors</a>
<a href="booking.html" class="header-menu-item">Bookings</a>
</nav>
<!-- Profile Icon -->
<div>
<button class="logout-btn" onclick="window.location.href='sign.html'"><i class="fas fa-sign-out-alt"></i> Log Out</button>
</div>
<!-- Offcanvas Menu -->
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasNavbarLabel">Menu</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="header-menu d-flex flex-column">
<a href="homepage2.html" class="header-menu-item">Home</a>
<a href="program.html" class="header-menu-item">Programs</a>
<a href="tutor.html" class="header-menu-item">Tutors</a>
<a href="booking.html" class="header-menu-item">Bookings</a>
</nav>
</div>
</div>
</header>
<main class="profile-container">
<div class="profile-card">
<div class="profile-header">
<div class="avatar-container">
<div class="avatar-large">
<img src="assets/profile.jpg" alt="Profile Picture" id="profileImage">
</div>
<div class="profile-info">
<h2 class="profile-name">John Doe</h2>
<p class="profile-title">Mathematics Tutor</p>
</div>
</div>
</div>
<div class="profile-body">
<button class="edit-profile-btn" data-bs-toggle="modal" data-bs-target="#editProfileModal">
<i class="fas fa-edit me-2"></i>Edit Profile
</button>
<div class="profile-details">
<div class="detail-item">
<span class="detail-label">Full Name</span>
<span class="detail-value" id="displayName">John Doe</span>
</div>
<div class="detail-item">
<span class="detail-label">Email Address</span>
<span class="detail-value" id="displayEmail">john.doe@example.com</span>
</div>
<div class="detail-item">
<span class="detail-label">Phone Number</span>
<span class="detail-value" id="displayPhone">(123) 456-7890</span>
</div>
<div class="detail-item">
<span class="detail-label">Specialization</span>
<span class="detail-value" id="displaySpecialization">Mathematics, Computer Science</span>
</div>
<div class="detail-item">
<span class="detail-label">Bio</span>
<p class="detail-value" id="displayBio">Experienced tutor with 5+ years of teaching mathematics and computer science to high school and college students. Passionate about making complex concepts easy to understand.</p>
</div>
</div>
</div>
</div>
</main>
<!-- Edit Profile Modal -->
<div class="modal fade" id="editProfileModal" tabindex="-1" aria-labelledby="editProfileModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editProfileModalLabel">Edit Profile</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="profileForm">
<div class="avatar-upload">
<div class="avatar-large">
<img src="assets/profile.jpg" alt="Profile Picture" id="previewImage">
</div>
<div class="avatar-edit">
<input type="file" id="imageUpload" accept=".png, .jpg, .jpeg" />
<label for="imageUpload"><i class="fas fa-camera"></i></label>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label for="firstName" class="form-label">First Name</label>
<input type="text" class="form-control" id="firstName" value="John">
</div>
<div class="col-md-6">
<label for="lastName" class="form-label">Last Name</label>
<input type="text" class="form-control" id="lastName" value="Doe">
</div>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email Address</label>
<input type="email" class="form-control" id="email" value="john.doe@example.com">
</div>
<div class="mb-3">
<label for="phone" class="form-label">Phone Number</label>
<input type="tel" class="form-control" id="phone" value="(123) 456-7890">
</div>
<div class="mb-3">
<label for="specialization" class="form-label">Specialization</label>
<input type="text" class="form-control" id="specialization" value="Mathematics, Computer Science">
</div>
<div class="mb-3">
<label for="bio" class="form-label">Bio</label>
<textarea class="form-control" id="bio" rows="4">Experienced tutor with 5+ years of teaching mathematics and computer science to high school and college students. Passionate about making complex concepts easy to understand.</textarea>
</div>
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-outline-secondary me-2" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveProfile">Save Changes</button>
</div>
</form>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6">
<h5>TutorConnect</h5>
<p>Connecting students with expert tutors for personalized learning experiences.</p>
</div>
<div class="col-md-6 text-md-end">
<p>© 2023 TutorConnect. All rights reserved.</p>
</div>
</div>
</div>
</footer>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Image upload preview
const imageUpload = document.getElementById('imageUpload');
const previewImage = document.getElementById('previewImage');
const profileImage = document.getElementById('profileImage');
imageUpload.addEventListener('change', function(event) {
const file = event.target.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(e) {
previewImage.src = e.target.result;
}
reader.readAsDataURL(file);
}
});
// Save profile changes
document.getElementById('saveProfile').addEventListener('click', function() {
// Update profile display with form values
document.getElementById('displayName').textContent =
document.getElementById('firstName').value + ' ' +
document.getElementById('lastName').value;
document.getElementById('displayEmail').textContent =
document.getElementById('email').value;
document.getElementById('displayPhone').textContent =
document.getElementById('phone').value;
document.getElementById('displaySpecialization').textContent =
document.getElementById('specialization').value;
document.getElementById('displayBio').textContent =
document.getElementById('bio').value;
// Update profile image if changed
if (imageUpload.files[0]) {
const reader = new FileReader();
reader.onload = function(e) {
profileImage.src = e.target.result;
}
reader.readAsDataURL(imageUpload.files[0]);
}
// Close modal
const modal = bootstrap.Modal.getInstance(document.getElementById('editProfileModal'));
modal.hide();
// Show success message
alert('Profile updated successfully!');
});
});
</script>
</body>
</html>