Skip to content

Commit

Permalink
feat: MSN wizz on nudge (#655)
Browse files Browse the repository at this point in the history
* feat: MSN wizz on nudge

* feat: MSN wizz on nudge
  • Loading branch information
jdesnoes authored Dec 20, 2024
1 parent 590dd3f commit 8f066b1
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
67 changes: 67 additions & 0 deletions ui/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,70 @@ input[type='search']::-webkit-search-cancel-button {
input:checked + label div {
@apply border-indigo-500 bg-gradient-to-r from-indigo-500 to-purple-600;
}

body.shake {
animation: shake 0.2s ease-in-out 2;
}

@keyframes shake {
5% {
transform: translate(7px, 7px);
}
10% {
transform: translateY(-7px);
}
15% {
transform: translate(-1px, 5px);
}
20% {
transform: translate(-6px, 8px);
}
25% {
transform: translate(-5px, -7px);
}
30% {
transform: translate(6px, 7px);
}
35% {
transform: translate(9px, -6px);
}
40% {
transform: translate(-3px, 9px);
}
45% {
transform: translate(-3px, 4px);
}
50% {
transform: translate(-3px, 1px);
}
55% {
transform: translate(-8px, 3px);
}
60% {
transform: translate(7px, 3px);
}
65% {
transform: translate(-1px);
}
70% {
transform: translate(7px, -4px);
}
75% {
transform: translate(-2px, -8px);
}
80% {
transform: translateY(-9px);
}
85% {
transform: translate(-6px, 7px);
}
90% {
transform: translate(9px, 1px);
}
95% {
transform: translate(-9px, 7px);
}
100% {
transform: translateY(7px);
}
}
9 changes: 9 additions & 0 deletions ui/src/pages/poker/PokerGame.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,15 @@
})}
`,
);
// msn wizz animation and sound
if (userToNudge.id === $user.id) {
document.querySelector('body').classList.toggle('shake');
setTimeout(() => {
document.querySelector('body').classList.toggle('shake');
}, 700);
}
break;
default:
break;
Expand Down

0 comments on commit 8f066b1

Please sign in to comment.