Skip to content

Commit

Permalink
A: show card animation
Browse files Browse the repository at this point in the history
  • Loading branch information
N1c0Dev committed Dec 5, 2024
1 parent b443617 commit 230c83f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ body {
font-family: DM Sans, Avenir, Helvetica, Arial, sans-serif;
}

.show-card {
opacity: 0;
transform: translateY(50px);
animation: show-animation 1s ease-out forwards;
}

@keyframes show-animation {
0% {
opacity: 0;
transform: translateY(50px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}


7 changes: 4 additions & 3 deletions src/views/pages/home/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@
for(let index = 0; index < 7; index++) {
const groupArray = document.getElementsByName(`group-${index}`)
groupArray.forEach((item) => {
index > 0 ? item.classList.add('hidden') : item.classList.remove('hidden')
})
groupArray.forEach(
(item) => index > 0 ? item.classList.add('hidden') : item.classList.remove('hidden')
)
}
}
function revealSection(index: number) {
const groupArray = document.getElementsByName(`group-${index}`)
groupArray.forEach((item) => {
item.classList.remove('hidden')
item.classList.add('show-card')
})
}
Expand Down

0 comments on commit 230c83f

Please sign in to comment.