Skip to content

Commit

Permalink
Cute button arrow transitions on hover news cards
Browse files Browse the repository at this point in the history
  • Loading branch information
tutaru99 committed Jul 2, 2024
1 parent 0ae0002 commit 7940d34
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions components/base/NewsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ const cardBodyText: any = ref(stripHtmlFromString(props.data.body) || '');
transform: scale(1.2);
transition: transform 5s;
}
.news-card__footer-button {
opacity: 0.8;
}
.news-card__button-icon {
animation: transformArrow 0.5s ease-in-out alternate;
}
}
:deep(img) {
Expand Down Expand Up @@ -208,4 +216,15 @@ const cardBodyText: any = ref(stripHtmlFromString(props.data.body) || '');
}
}
}
@keyframes transformArrow {
0% {
transform: translateX(0);
}
50% {
transform: translateX(4px);
}
100% {
transform: translateX(0);
}
}
</style>

0 comments on commit 7940d34

Please sign in to comment.