-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprofile.html
More file actions
472 lines (461 loc) · 18.7 KB
/
Copy pathprofile.html
File metadata and controls
472 lines (461 loc) · 18.7 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
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile & Settings | ETC</title>
<link rel="stylesheet" href="assets/css/theme.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
font-family: var(--font-body);
color: var(--color-text);
background: var(--gradient-bg);
padding: 24px;
}
.shell {
max-width: 1180px;
margin: 0 auto;
}
.topbar, .panel, .settings-card, .signout-card {
background: var(--gradient-card);
border: 1px solid var(--color-border);
box-shadow: var(--shadow-md);
}
.topbar {
border-radius: 24px;
padding: 18px 22px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
margin-bottom: 24px;
}
.brand {
display: flex;
align-items: center;
gap: 14px;
color: var(--color-text);
text-decoration: none;
}
.brand-mark {
width: 46px;
height: 46px;
border-radius: 16px;
display: grid;
place-items: center;
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
color: #07111c;
font-weight: 800;
}
.brand small {
color: var(--color-text-muted);
display: block;
}
.top-links {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.top-links a, .ghost-btn, .primary-btn, .danger-btn {
border-radius: 999px;
padding: 10px 16px;
text-decoration: none;
border: 1px solid var(--color-border);
background: var(--color-surface);
color: var(--color-text);
cursor: pointer;
font: inherit;
}
.primary-btn {
background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
color: #08111f;
border-color: transparent;
font-weight: 700;
}
.danger-btn {
background: linear-gradient(180deg, #ff5c84, #d92f64);
color: white;
border-color: transparent;
}
.hero {
display: grid;
grid-template-columns: 1.2fr .8fr;
gap: 24px;
margin-bottom: 24px;
}
.panel {
border-radius: 28px;
padding: 28px;
}
.profile-hero {
display: flex;
gap: 22px;
align-items: flex-start;
}
.avatar-lg, .mini-avatar {
display: grid;
place-items: center;
background: linear-gradient(135deg, var(--color-primary), #f5d142);
color: #07111c;
font-weight: 800;
border-radius: 50%;
flex-shrink: 0;
}
.avatar-lg {
width: 108px;
height: 108px;
font-size: 2rem;
}
.mini-avatar {
width: 42px;
height: 42px;
}
.eyebrow {
color: var(--color-primary);
text-transform: uppercase;
letter-spacing: .08em;
font-size: .78rem;
font-weight: 700;
margin-bottom: 10px;
}
h1, h2, h3 {
font-family: var(--font-heading);
}
.profile-meta p, .muted {
color: var(--color-text-muted);
}
.actions {
margin-top: 18px;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.stats-grid, .details-grid, .settings-grid {
display: grid;
gap: 16px;
}
.stats-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stat {
border-radius: 20px;
padding: 18px;
background: rgba(255,255,255,.03);
border: 1px solid rgba(255,255,255,.06);
}
.stat strong {
display: block;
font-size: 1.6rem;
color: var(--color-primary);
margin-top: 8px;
}
.content-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 24px;
}
.details-grid {
grid-template-columns: 170px 1fr;
padding-top: 18px;
}
.details-grid div {
padding: 12px 0;
border-bottom: 1px solid rgba(255,255,255,.06);
}
.detail-label {
color: var(--color-text-muted);
font-weight: 600;
}
.settings-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.settings-card, .signout-card {
border-radius: 24px;
padding: 22px;
}
.field {
margin-top: 16px;
}
.field label {
display: block;
margin-bottom: 8px;
font-weight: 600;
}
.hint {
color: var(--color-text-muted);
font-size: .9rem;
margin-top: 4px;
}
.field input, .field select, .field textarea {
width: 100%;
border-radius: 14px;
border: 1px solid var(--color-border);
background: var(--color-surface);
color: var(--color-text);
padding: 12px 14px;
font: inherit;
}
.field textarea {
min-height: 120px;
resize: vertical;
}
.toggle {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
padding: 14px 0;
border-bottom: 1px solid rgba(255,255,255,.06);
}
.toggle:last-child {
border-bottom: none;
}
.toggle input {
width: 20px;
height: 20px;
}
.toolbar {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-top: 18px;
}
.signout-wrap {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.banner {
display: none;
margin-bottom: 16px;
padding: 14px 16px;
border-radius: 16px;
border: 1px solid transparent;
}
.banner.show { display: block; }
.banner.success {
background: rgba(46, 204, 113, .12);
border-color: rgba(46, 204, 113, .35);
color: #8ef0b1;
}
.banner.error {
background: rgba(255, 92, 132, .12);
border-color: rgba(255, 92, 132, .35);
color: #ffb3c8;
}
.auth-guard {
text-align: center;
padding: 48px 24px;
}
.hidden { display: none !important; }
@media (max-width: 960px) {
.hero, .content-grid, .settings-grid, .signout-wrap {
grid-template-columns: 1fr;
}
}
@media (max-width: 720px) {
body { padding: 16px; }
.topbar, .profile-hero { flex-direction: column; align-items: flex-start; }
.details-grid { grid-template-columns: 1fr; }
.stats-grid { grid-template-columns: 1fr 1fr; }
}
</style>
</head>
<body>
<div class="shell">
<div class="topbar">
<a class="brand" href="index.html">
<div class="brand-mark">ETC</div>
<div>
<strong>Ethiopian Tech Camp</strong>
<small>Your profile and preferences</small>
</div>
</a>
<div class="top-links">
<a href="index.html">Home</a>
<a href="articles.html">Articles</a>
<a href="community.html">Community</a>
</div>
</div>
<div id="pageBanner" class="banner"></div>
<section id="authGuard" class="panel auth-guard hidden">
<div class="eyebrow">Authentication Required</div>
<h1>Please sign in first</h1>
<p class="muted" style="margin-top: 10px;">Your profile and settings are now connected to the ETC backend session.</p>
<div class="actions" style="justify-content: center;">
<a class="primary-btn" href="index.html">Go to Homepage Login</a>
</div>
</section>
<main id="profileApp" class="hidden">
<section class="hero">
<article class="panel">
<div class="profile-hero">
<div class="avatar-lg" id="profileAvatar">ET</div>
<div class="profile-meta">
<div class="eyebrow">Account Profile</div>
<h1 id="profileName">Loading...</h1>
<p id="profileHeadline" style="margin-top: 8px;">Community member</p>
<p id="profileLocation" style="margin-top: 6px;"><i class="fas fa-location-dot"></i> Addis Ababa, Ethiopia</p>
<div class="actions">
<button class="primary-btn" id="editProfileBtn"><i class="fas fa-pen"></i> Edit Profile</button>
<button class="ghost-btn" id="copyProfileBtn"><i class="fas fa-share-nodes"></i> Share Profile</button>
</div>
</div>
</div>
</article>
<aside class="panel">
<div class="eyebrow">Quick Snapshot</div>
<div class="stats-grid">
<div class="stat"><span class="muted">Member Since</span><strong id="statMemberSince">-</strong></div>
<div class="stat"><span class="muted">Skill Level</span><strong id="statSkillLevel">-</strong></div>
<div class="stat"><span class="muted">Session Status</span><strong>Active</strong></div>
<div class="stat"><span class="muted">Last Login</span><strong id="statLastLogin">-</strong></div>
</div>
</aside>
</section>
<section class="content-grid">
<article class="panel">
<div class="eyebrow">Personal Information</div>
<h2>Public profile details</h2>
<div class="details-grid">
<div class="detail-label">Full Name</div><div id="detailFullName">-</div>
<div class="detail-label">Username</div><div id="detailUsername">-</div>
<div class="detail-label">Email</div><div id="detailEmail">-</div>
<div class="detail-label">Location</div><div id="detailLocation">-</div>
<div class="detail-label">Skill Level</div><div id="detailSkillLevel">-</div>
<div class="detail-label">Bio</div><div id="detailBio">-</div>
</div>
</article>
<article class="panel">
<div class="eyebrow">Edit Profile</div>
<h2>Save directly to your account</h2>
<form id="profileForm">
<div class="field">
<label for="fullNameInput">Full Name</label>
<input id="fullNameInput" name="full_name" type="text" required>
</div>
<div class="field">
<label for="usernameInput">Username</label>
<input id="usernameInput" name="username" type="text" required>
</div>
<div class="field">
<label for="emailInput">Email</label>
<input id="emailInput" name="email" type="email" required>
</div>
<div class="field">
<label for="locationInput">Location</label>
<input id="locationInput" name="location" type="text">
</div>
<div class="field">
<label for="skillLevelInput">Skill Level</label>
<select id="skillLevelInput" name="skill_level">
<option value="beginner">Beginner</option>
<option value="intermediate">Intermediate</option>
<option value="advanced">Advanced</option>
</select>
</div>
<div class="field">
<label for="bioInput">Bio</label>
<textarea id="bioInput" name="bio"></textarea>
</div>
<div class="toolbar">
<button class="primary-btn" type="submit" id="saveProfileBtn"><i class="fas fa-save"></i> Save Profile</button>
</div>
</form>
</article>
</section>
<section style="margin-bottom: 24px;">
<div class="eyebrow" style="margin-bottom: 12px;">Settings</div>
<div class="settings-grid">
<section class="settings-card">
<h3>Notifications</h3>
<div class="toggle">
<div><strong>Email Notifications</strong><div class="hint">Receive product and community updates.</div></div>
<input id="emailNotifications" type="checkbox">
</div>
<div class="toggle">
<div><strong>Push Notifications</strong><div class="hint">Enable browser reminders for activity.</div></div>
<input id="pushNotifications" type="checkbox">
</div>
<div class="toggle">
<div><strong>Two-Factor Authentication</strong><div class="hint">Track your security preference in ETC.</div></div>
<input id="twoFactorAuth" type="checkbox">
</div>
</section>
<section class="settings-card">
<h3>Display</h3>
<div class="field">
<label for="themeSelect">Theme</label>
<select id="themeSelect">
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="auto">Auto</option>
</select>
</div>
<div class="field">
<label for="fontSize">Font Size</label>
<select id="fontSize">
<option value="small">Small</option>
<option value="medium">Medium</option>
<option value="large">Large</option>
</select>
</div>
<div class="field">
<label for="languageSelect">Language</label>
<select id="languageSelect">
<option value="en">English</option>
<option value="am">Amharic</option>
<option value="or">Oromiffa</option>
</select>
</div>
</section>
<section class="settings-card">
<h3>Privacy</h3>
<div class="field">
<label for="profileVisibility">Profile Visibility</label>
<select id="profileVisibility">
<option value="public">Public</option>
<option value="community">Community Only</option>
<option value="private">Private</option>
</select>
</div>
<div class="toggle">
<div><strong>Activity Visibility</strong><div class="hint">Show your recent activity to others.</div></div>
<input id="activityVisibility" type="checkbox">
</div>
<div class="toolbar">
<button class="primary-btn" id="saveSettingsBtn" type="button"><i class="fas fa-save"></i> Save Settings</button>
<button class="ghost-btn" id="resetSettingsBtn" type="button"><i class="fas fa-rotate-left"></i> Reset</button>
</div>
</section>
</div>
</section>
<section class="signout-wrap">
<article class="signout-card">
<div class="eyebrow">Session</div>
<h3>Sign out safely</h3>
<p class="muted" style="margin-top: 8px;">This will clear your current ETC session from the browser and backend session store.</p>
<div class="toolbar">
<button class="danger-btn" id="confirmSignOutBtn"><i class="fas fa-right-from-bracket"></i> Sign Out</button>
</div>
</article>
<article class="signout-card">
<div class="eyebrow">Data</div>
<h3>Quick account tools</h3>
<p class="muted" style="margin-top: 8px;">Useful shortcuts while we continue building the rest of the account system.</p>
<div class="toolbar">
<button class="ghost-btn" id="downloadDataBtn"><i class="fas fa-download"></i> Copy My Data</button>
<button class="ghost-btn" id="copySettingsBtn"><i class="fas fa-copy"></i> Copy Settings JSON</button>
</div>
</article>
</section>
</main>
</div>
<script src="assets/js/api.js"></script>
<script src="assets/js/profile.js"></script>
</body>
</html>