-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
290 lines (261 loc) · 9.14 KB
/
profile.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile Page</title>
<style>
/* General Body Styling */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #626AB2;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
/* Navbar */
.navbar {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 80px;
background-color: rgba(255, 255, 255, 0.85);
border-radius: 0 0 14px 14px;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 1000;
}
.nav-button {
width: 150px;
height: 50px;
background-color: #2A3794;
border: none;
border-radius: 15px;
color: #ffffff;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.nav-button:hover {
background-color: #1c2d6f;
}
/* Three-Dot Dropdown */
.three-dot {
position: fixed;
top: 20px;
right: 20px;
background: white;
color: #4C57A7;
padding: 10px;
border-radius: 5px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 1001;
}
#menu {
cursor: pointer;
color: #4C57A7;
font-size: 24px;
text-align: center;
line-height: 1;
}
#dropdown {
display: none;
position: absolute;
top: 40px;
right: 0;
background: white;
border-radius: 5px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#dropdown a {
display: block;
color: #4C57A7;
padding: 10px;
text-decoration: none;
border-bottom: 1px solid #ddd;
}
#dropdown a:last-child {
border-bottom: none;
}
#dropdown a:hover {
background-color: #f0f0f0;
}
/* White Box Container */
.container {
width: 95%;
max-width: 1000px;
background: white;
border-radius: 10px;
padding: 40px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 100px; /* Adjusted for navbar */
}
/* Profile Picture */
.profile-picture {
position: relative;
border: 5px solid white;
width: 200px;
height: 200px;
border-radius: 50%;
overflow: hidden;
background-color: #eaeaea;
margin-bottom: 20px;
}
.profile-picture img {
width: 100%;
height: 100%;
object-fit: cover;
}
.profile-picture input {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
/* Input Fields */
.input-group {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
margin-top: 20px;
}
.input-item {
width: 48%;
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: 20px;
}
.input-item label {
font-size: 14px;
color: #4C57A7;
margin-bottom: 5px;
font-weight: bold;
}
.input-item input {
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
font-size: 14px;
background-color: #4C57A7;
color: white;
}
.input-item input::placeholder {
color: #d9d9d9;
}
/* Save Button */
.save-button {
background: #4C57A7;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
font-size: 16px;
}
.save-button:hover {
background: #3a4799;
}
</style>
</head>
<body>
<!-- Navbar -->
<div class="navbar">
<button class="nav-button nav-button-stats">Stats</button>
<button class="nav-button nav-button-report">Report</button>
<button class="nav-button nav-button-sleep">Sleep</button>
<button class="nav-button nav-button-alerts">Alerts</button>
<button class="nav-button nav-button-profile">Profile</button>
</div>
<!-- Three Dot Dropdown -->
<!-- Three Dot Dropdown -->
<div class="three-dot" style="background: #4C57A7;"> <!-- Changed background to blue -->
<div id="menu" style="cursor: pointer; color: white; font-size: 24px; text-align: center; line-height: 1;">⋮</div> <!-- Changed color to white -->
<div id="dropdown" style="display: none; position: absolute; top: 40px; right: 0; background: white; border-radius: 5px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
<a href="main.html" style="display: block; color: #4C57A7; padding: 10px; text-decoration: none; border-bottom: 1px solid #ddd;">Home</a>
<a href="settings.html" style="display: block; color: #4C57A7; padding: 10px; text-decoration: none; border-bottom: 1px solid #ddd;">Settings</a>
<a href="app-information" style="display: block; color: #4C57A7; padding: 10px; text-decoration: none; border-bottom: 1px solid #ddd;">App info</a>
<a href="about-us.html" style="display: block; color: #4C57A7; padding: 10px; text-decoration: none; border-bottom: 1px solid #ddd;">About us</a>
<a href="login.html" style="display: block; color: #4C57A7; padding: 10px; text-decoration: none;">Logout</a>
</div>
</div>
<div class="container">
<!-- Profile Picture -->
<div class="profile-picture">
<img src="../../images/default.jpeg" alt="Default Profile Picture">
<input type="file" accept="image/*" onchange="changeProfilePicture(event)">
</div>
<!-- Input Fields -->
<div class="input-group">
<div class="input-item">
<label for="name">Name</label>
<input type="text" id="name" placeholder="Enter Name" value="Stella">
</div>
<div class="input-item">
<label for="surname">Surname</label>
<input type="text" id="surname" placeholder="Enter Surname" value="Shine">
</div>
<div class="input-item">
<label for="age">Age</label>
<input type="number" id="age" placeholder="Enter Age" value="32">
</div>
<div class="input-item">
<label for="gender">Gender</label>
<input type="text" id="gender" placeholder="Enter Gender" value="Female">
</div>
<div class="input-item">
<label for="email">Email</label>
<input type="email" id="email" placeholder="Enter Email" value="stella.shine@gmail.com">
</div>
<div class="input-item">
<label for="proficiency">Proficiency</label>
<input type="text" id="proficiency" placeholder="Enter Proficiency" value="Surgeon">
</div>
</div>
<!-- Save Button -->
<button class="save-button">Save Changes</button>
</div>
<script>
function changeProfilePicture(event) {
const file = event.target.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(e) {
document.querySelector('.profile-picture img').src = e.target.result;
};
reader.readAsDataURL(file);
}
}
// Toggle dropdown visibility
document.getElementById('menu').addEventListener('click', function () {
const dropdown = document.getElementById('dropdown');
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
});
// Close dropdown when clicking outside
document.addEventListener('click', function (event) {
const menu = document.getElementById('menu');
const dropdown = document.getElementById('dropdown');
if (!menu.contains(event.target) && !dropdown.contains(event.target)) {
dropdown.style.display = 'none';
}
});
</script>
</body>
</html>