diff --git a/css/styles.css b/css/styles.css index e2913fe..1d0e878 100644 --- a/css/styles.css +++ b/css/styles.css @@ -36,13 +36,12 @@ html { height: 150px; width: 150px; border-radius: 5px; - display: none; + /* display: none; */ font-size: 1.25rem; align-items: center; justify-content: center; - background-color: rgba(0, 0, 0, 0.5); + /* background-color: rgba(0, 0, 0, 0.5); */ z-index: 9; - animation: loading 1s linear infinite; } .lds-ring { diff --git a/html/profile.html b/html/profile.html index bd8bb19..0403bf2 100644 --- a/html/profile.html +++ b/html/profile.html @@ -45,6 +45,15 @@ save cancel delete +
+

Are you sure you want to delete this user?

+
+
+ + +
+
+
diff --git a/index.html b/index.html index 8269751..81a88c2 100644 --- a/index.html +++ b/index.html @@ -44,7 +44,7 @@
-
+
diff --git a/js/edit-profile.js b/js/edit-profile.js new file mode 100644 index 0000000..cd4152c --- /dev/null +++ b/js/edit-profile.js @@ -0,0 +1,14 @@ +function edit() { + var Button = document.getElementById("edit"); + if (!Button.className.includes('editing')) { + Button.innerHTML = "Save"; + Button.classList.add('editing'); + document.querySelectorAll('p').forEach(el => el.setAttribute('contenteditable', true)); + document.querySelector('h2').setAttribute('contenteditable', true); + } else { + document.querySelectorAll('p').forEach(el => { el.setAttribute('contenteditable', false); console.log(el.textContent); }); + document.querySelector('h2').setAttribute('contenteditable', false); + Button.classList.remove('editing'); + Button.innerHTML = "Edit"; + } +}; \ No newline at end of file diff --git a/js/infinite_scroll.js b/js/infinite_scroll.js index 6f99641..ee7abf0 100644 --- a/js/infinite_scroll.js +++ b/js/infinite_scroll.js @@ -92,11 +92,12 @@ function createBadges(skills) { } function showLoader() { - loader.style.display = 'block'; + loader.classList.remove('d-none'); } function hideLoader() { - loader.style.display = 'none'; + // loader.style.display = 'none'; + loader.classList.add('d-none'); } cardsContainer.addEventListener('scroll', () => { diff --git a/js/user-profile.js b/js/user-profile.js index 23a9e3e..79a7588 100644 --- a/js/user-profile.js +++ b/js/user-profile.js @@ -74,11 +74,7 @@ edit.addEventListener('click', openEditMode); function changeForSelect(property, options, multiple) { const optionsArray = []; - if (property === 'experience') { options.map( option => optionsArray.push(returnOptionElement(option))); - } else { - options.map( option => optionsArray.push(returnOptionElement(option.label))); - } $(`#${property}`).replaceWith( `