-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedprofile.html
73 lines (69 loc) · 3.13 KB
/
edprofile.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
<!doctype html>
<html lang="en">
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="edprofile.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1 class="prf">Profile</h1>
<div class="ph-user">
<img id="photo-preview" src="user.png" >
<input type="file" id="photo-upload" accept="image/*">
<label for="photo-upload"><i class="fa-solid fa-image"></i></label>
<button id="upload-button" class="nvm"></button>
</div>
<main>
<div class="header">
<div class="username"><label>Username:</label><br>
<input type="text">
</div><br>
<div class="fname"><label>First name:</label><br>
<input type="text">
</div><br>
<div class="lname"><label>Last name:</label><br>
<input type="text">
</div><br>
<div class="pnumber"><label>Phone number:</label><br>
<div class="input-group mb-3">
<span class="input-group-text">+38</span>
<input type="number" class="form-control" aria-label="Amount (to the nearest dollar)">
</div>
</div><br>
<div class="brth"><label>Birthday:</label><br>
<input type="date">
</div><br>
</div>
<div class="buttons">
<button class="b1"><a href='profile.html'>Go back</a></button>
<button class="b1"><a href='profile.html'>Save<a></button>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous">
</script>
<script>
const photoUpload = document.getElementById("photo-upload");
const uploadButton = document.getElementById("upload-button");
const photoPreview = document.getElementById("photo-preview");
uploadButton.addEventListener("click", function() {
photoUpload.click();
});
photoUpload.addEventListener("change", function() {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
photoPreview.src = event.target.result;
};
reader.readAsDataURL(file);
}
});
</script>
</body>
</html>