Skip to content

Commit

Permalink
v1.10.18 - Animações nos modais (logout e ajuda).
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarlos-ig committed May 17, 2022
1 parent 532d5f9 commit ac2ca19
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "igai",
"version": "1.10.17",
"version": "1.10.18",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
2 changes: 1 addition & 1 deletion public/css/styles.min.css

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions public/js/logoutModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ openLogoutModal.addEventListener("click", () => {
});

closeLogoutModal.addEventListener("click", () => {
logoutModal.close();
});
logoutModal.classList.add("hide");
logoutModal.addEventListener("animationend", function () {
logoutModal.classList.remove("hide");
logoutModal.close();
logoutModal.removeEventListener("animationend", arguments.callee, false);
}, false)
});
31 changes: 31 additions & 0 deletions tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,37 @@ footer img {
filter: var(--bg-gray-50-shadow-filter);
}

dialog[open] {
animation: show .5s ease normal;
}

dialog[open]::backdrop {
animation: show 0.25s ease normal;
}

dialog.hide {
animation: hide .25s ease normal;
}

dialog.hide::backdrop {
animation: hide 0.5s ease normal;
}

@keyframes show {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

@keyframes hide {
to {
opacity: 0;
}
}

.card {
@apply flex justify-center mx-auto py-8;
}
Expand Down
7 changes: 6 additions & 1 deletion views/partials/ajuda.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
helpModal.showModal();
});
helpModalClose.addEventListener("click", () => {
helpModal.close();
helpModal.classList.add("hide");
helpModal.addEventListener("animationend", function () {
helpModal.classList.remove("hide");
helpModal.close();
helpModal.removeEventListener("animationend", arguments.callee, false);
}, false)
});
let activeSlide = 1;
Expand Down

0 comments on commit ac2ca19

Please sign in to comment.