add pulsing glow animation for the pop-up
Browse files- components/reward-popup.js +24 -6
components/reward-popup.js
CHANGED
|
@@ -32,7 +32,6 @@ class RewardPopup extends HTMLElement {
|
|
| 32 |
background: rgba(0, 0, 0, 0.8);
|
| 33 |
backdrop-filter: blur(5px);
|
| 34 |
}
|
| 35 |
-
|
| 36 |
.popup-content {
|
| 37 |
position: relative;
|
| 38 |
width: 90%;
|
|
@@ -46,9 +45,18 @@ class RewardPopup extends HTMLElement {
|
|
| 46 |
transform: scale(0.9);
|
| 47 |
transition: transform 0.3s ease;
|
| 48 |
z-index: 2;
|
|
|
|
| 49 |
}
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
transform: scale(1);
|
| 53 |
}
|
| 54 |
|
|
@@ -59,7 +67,6 @@ class RewardPopup extends HTMLElement {
|
|
| 59 |
text-transform: uppercase;
|
| 60 |
letter-spacing: 2px;
|
| 61 |
}
|
| 62 |
-
|
| 63 |
.reward-image {
|
| 64 |
width: 120px;
|
| 65 |
height: 120px;
|
|
@@ -70,9 +77,20 @@ class RewardPopup extends HTMLElement {
|
|
| 70 |
align-items: center;
|
| 71 |
justify-content: center;
|
| 72 |
box-shadow: 0 0 20px var(--rarity-color);
|
|
|
|
| 73 |
}
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
color: white;
|
| 77 |
font-size: 1.2rem;
|
| 78 |
margin-bottom: 0.5rem;
|
|
|
|
| 32 |
background: rgba(0, 0, 0, 0.8);
|
| 33 |
backdrop-filter: blur(5px);
|
| 34 |
}
|
|
|
|
| 35 |
.popup-content {
|
| 36 |
position: relative;
|
| 37 |
width: 90%;
|
|
|
|
| 45 |
transform: scale(0.9);
|
| 46 |
transition: transform 0.3s ease;
|
| 47 |
z-index: 2;
|
| 48 |
+
animation: pulse-glow 2s infinite alternate;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
+
@keyframes pulse-glow {
|
| 52 |
+
0% {
|
| 53 |
+
box-shadow: 0 0 20px var(--rarity-color);
|
| 54 |
+
}
|
| 55 |
+
100% {
|
| 56 |
+
box-shadow: 0 0 40px var(--rarity-color);
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
:host([open]) .popup-content {
|
| 60 |
transform: scale(1);
|
| 61 |
}
|
| 62 |
|
|
|
|
| 67 |
text-transform: uppercase;
|
| 68 |
letter-spacing: 2px;
|
| 69 |
}
|
|
|
|
| 70 |
.reward-image {
|
| 71 |
width: 120px;
|
| 72 |
height: 120px;
|
|
|
|
| 77 |
align-items: center;
|
| 78 |
justify-content: center;
|
| 79 |
box-shadow: 0 0 20px var(--rarity-color);
|
| 80 |
+
animation: pulse-glow-image 1.5s infinite alternate;
|
| 81 |
}
|
| 82 |
+
|
| 83 |
+
@keyframes pulse-glow-image {
|
| 84 |
+
0% {
|
| 85 |
+
transform: scale(1);
|
| 86 |
+
box-shadow: 0 0 20px var(--rarity-color);
|
| 87 |
+
}
|
| 88 |
+
100% {
|
| 89 |
+
transform: scale(1.05);
|
| 90 |
+
box-shadow: 0 0 30px var(--rarity-color);
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
.reward-name {
|
| 94 |
color: white;
|
| 95 |
font-size: 1.2rem;
|
| 96 |
margin-bottom: 0.5rem;
|