Skip to content

Commit

Permalink
Merge pull request #65 from konstantin-it-lysenko/teamModal
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
Denys-Nalyvaiko authored Oct 23, 2023
2 parents 187ab62 + 0230de8 commit a77536a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/css/modal-team.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
color: var(--primary-white-color);
padding: 40px 20px;
transition: transform 0.4s ease;
overflow: auto;
}

.team-wrapper {
Expand Down Expand Up @@ -86,6 +87,7 @@
border: 1px solid var(--primary-white-color);
border-radius: 30px;
padding: 20px;
padding-left: 0;
text-align: center;
cursor: pointer;
transition: 0.4s;
Expand Down Expand Up @@ -120,7 +122,7 @@
background-color: rgb(8, 8, 8);
} */
.active-devel {
background-color: rgba(4, 4, 4, 0.4);
background-color: var(--primary-black-color);
}
.team-soc-list {
display: flex;
Expand Down Expand Up @@ -181,6 +183,9 @@
max-width: 350px;
margin-top: 32px;
}
.team-name {
font-size: 20px;
}
}

/* */
Expand Down
7 changes: 5 additions & 2 deletions src/js/modal-team.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ backdrop.addEventListener('click', onBackdropClick);

teamList.insertAdjacentHTML('beforeend', createDevMarkup(developers));
const devSocials = [...teamList.children];
console.log(devSocials);

// ! функції відкриття-закриття модалки і скидання стилів девів
function onOpenClick() {
backdrop.classList.remove('is-hidden');
window.addEventListener('keydown', onEscKeyPress);
document.body.style.overflow = 'hidden';
}

function onCloseClick() {
backdrop.classList.add('is-hidden');
window.removeEventListener('keydown', onEscKeyPress);
document.body.style.overflow = 'auto';

returnHidden();
}
Expand Down Expand Up @@ -87,6 +90,7 @@ function onDevClick(e) {
const currentMoreArrow = document.querySelector('.arrow-up');
const currentActiveDeveloper = document.querySelector('.active-devel');

console.log(devClick.firstElementChild);
if (currentActiveDeveloper) {
currentActiveDeveloper.classList.remove('active-devel');
// devClick.classList.add('active-devel');
Expand All @@ -95,10 +99,9 @@ function onDevClick(e) {
moreIcon.classList.add('arrow-up');

devClick.classList.add('active-devel');
// console.log(devClick);
if (activeSoc.style.maxHeight) {
activeSoc.style.maxHeight = null;
currentMoreArrow.classList.remove('arrow-up');
devClick.firstElementChild.classList.remove('arrow-up');
} else {
activeSoc.style.maxHeight = activeSoc.scrollHeight + 'px';
moreIcon.classList.add('arrow-up');
Expand Down

0 comments on commit a77536a

Please sign in to comment.