diff --git a/assets/html/profile.html b/assets/html/profile.html index 4880f66..e193502 100644 --- a/assets/html/profile.html +++ b/assets/html/profile.html @@ -2,7 +2,7 @@ - + Профиль @@ -13,7 +13,7 @@
-
+

@@ -30,17 +30,7 @@
- + + \ No newline at end of file diff --git a/assets/js/profile.js b/assets/js/profile.js new file mode 100644 index 0000000..79750dd --- /dev/null +++ b/assets/js/profile.js @@ -0,0 +1,10 @@ +document.getElementById('fileInput').addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = function(e) { + document.getElementById('avatar').src = e.target.result; + }; + reader.readAsDataURL(file); + } + }); \ No newline at end of file