+
@@ -96,11 +103,29 @@ watch(
outline-offset: -2px;
}
+@keyframes slidein {
+ from {
+ transform: none;
+ filter: drop-shadow(calc(var(--margin-bottom)*.3) var(--margin-bottom) 1px rgba(0, 0, 0, .60));
+ }
+
+ to {
+ transform: translateY(calc(var(--margin-bottom)*-.25));
+ filter: drop-shadow(calc(var(--margin-bottom)*.3) calc(var(--margin-bottom)*1.5) 1px rgba(0, 0, 0, .60));
+ }
+}
+
.card.unlocked {
margin-top: 0px;
-
margin-bottom: var(--margin-bottom);
filter: drop-shadow(calc(var(--margin-bottom)*.3) var(--margin-bottom) 1px rgba(0, 0, 0, .60));
+ animation: 2s infinite alternate ease-in-out slidein;
+ animation-delay: var(--random-seed);
+}
+
+.card.unlocked:hover {
+ animation-play-state: paused;
+ rotate: none !important;
}
.card.wrapped {
From df6d77b8705c438777691f82f25accfef26f9c78 Mon Sep 17 00:00:00 2001
From: legonzaur
Date: Fri, 24 May 2024 13:14:19 +0200
Subject: [PATCH 10/12] Feat : more animations and transitions easing
---
components/CardPreview.vue | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/components/CardPreview.vue b/components/CardPreview.vue
index ab24abd..e6ba8b3 100644
--- a/components/CardPreview.vue
+++ b/components/CardPreview.vue
@@ -76,13 +76,12 @@ onMounted(() => {
.card {
--max-height: 250px;
--margin-bottom: calc(var(--max-height) * 0.05);
- transition: 0.025s rotate linear;
max-width: 256px;
position: relative;
display: flex;
margin-bottom: 0px;
margin-top: var(--margin-bottom);
- transition: all .125s cubic-bezier(0.075, 0.82, 0.165, 1);
+ transition: filter .125s cubic-bezier(0.075, 0.82, 0.165, 1), rotate 0.075s cubic-bezier(1, 1.81, .59, 1.42);
isolation: isolate;
pointer-events: all;
max-height: var(--max-height);
@@ -94,7 +93,6 @@ onMounted(() => {
.card_image {
max-height: var(--max-height);
- transition: all .125s cubic-bezier(0.075, 0.82, 0.165, 1);
z-index: 1;
}
@@ -141,7 +139,7 @@ onMounted(() => {
bottom: 0;
width: 99%;
transform: translateY(-0px);
- transition: 0.1s transform cubic-bezier(0.075, 0.82, 0.165, 1);
+ transition: 0.1s transform cubic-bezier(1, 1.81, .59, 1.42);
}
.card.active:hover #contextMenuButtons {
From 8c7cc199912cfd6464129db1bd3cb2b74207c355 Mon Sep 17 00:00:00 2001
From: legonzaur
Date: Fri, 24 May 2024 13:15:55 +0200
Subject: [PATCH 11/12] Fix : remove rotation on locked cards too
---
components/CardPreview.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/CardPreview.vue b/components/CardPreview.vue
index e6ba8b3..2fcc91d 100644
--- a/components/CardPreview.vue
+++ b/components/CardPreview.vue
@@ -121,7 +121,7 @@ onMounted(() => {
animation-delay: var(--random-seed);
}
-.card.unlocked:hover {
+.card:hover {
animation-play-state: paused;
rotate: none !important;
}
From f570b456ca008f014b51f91b3b92eb5aeb81a0d8 Mon Sep 17 00:00:00 2001
From: legonzaur
Date: Fri, 24 May 2024 14:14:06 +0200
Subject: [PATCH 12/12] Feat : center current player stats
---
components/CardPreview.vue | 19 +++++++++++++++----
components/PlayerSlot.vue | 3 ++-
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/components/CardPreview.vue b/components/CardPreview.vue
index 2fcc91d..d748724 100644
--- a/components/CardPreview.vue
+++ b/components/CardPreview.vue
@@ -47,7 +47,7 @@ watch(
onMounted(() => {
- card.value?.style.setProperty("--random-seed", -Math.abs(Math.random() * 2) + 's')
+ card.value?.style.setProperty("--random-seed", -Math.random() * 10 + 's')
})
@@ -101,7 +101,7 @@ onMounted(() => {
outline-offset: -2px;
}
-@keyframes slidein {
+@keyframes unlocked-float {
from {
transform: none;
filter: drop-shadow(calc(var(--margin-bottom)*.3) var(--margin-bottom) 1px rgba(0, 0, 0, .60));
@@ -113,15 +113,26 @@ onMounted(() => {
}
}
+@keyframes unlocked-rotate {
+ from {
+ rotate: -2deg;
+ }
+
+ to {
+ rotate: 2deg;
+ }
+}
+
.card.unlocked {
margin-top: 0px;
margin-bottom: var(--margin-bottom);
filter: drop-shadow(calc(var(--margin-bottom)*.3) var(--margin-bottom) 1px rgba(0, 0, 0, .60));
- animation: 2s infinite alternate ease-in-out slidein;
+ animation: 2s infinite alternate ease-in-out unlocked-float, 3.1s infinite alternate ease-in-out unlocked-rotate;
animation-delay: var(--random-seed);
+ animation-play-state: running;
}
-.card:hover {
+.card:not(.unlocked):hover {
animation-play-state: paused;
rotate: none !important;
}
diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue
index 4054188..58cb2b6 100644
--- a/components/PlayerSlot.vue
+++ b/components/PlayerSlot.vue
@@ -480,7 +480,8 @@ function check_for_guard(player: Player) {
#player_banner.big {
padding: 0;
- margin-left: 500px;
+ left: 50%;
+ transform: translateX(-50%);
max-width: min-content;
background: burlywood;
border: 5px solid maroon;