animations tweak

This commit is contained in:
Alberto Xamin 2020-11-20 23:21:52 +01:00
parent 79f363a5a0
commit 31508dbb94
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
4 changed files with 80 additions and 32 deletions

View File

@ -139,4 +139,41 @@ h1,h2,h3,h4,p,span{
opacity: 0;
transform: translateY(30px);
}
.fade-enter-active, .fade-leave-active {
transition: opacity 0.25s ease-out;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
.bounce-enter-active, .bounce-leave-active {
animation: bounce-in .5s;
}
.fade-enter, .bounce-leave-to {
animation: bounce-out .5s;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(0);
}
}
</style>

View File

@ -26,19 +26,19 @@ export default {
<style>
.card {
cursor: pointer;
width: 60pt;
min-width:60pt;
height: 100pt;
cursor: pointer;
width: 60pt;
min-width:60pt;
height: 100pt;
margin: 12pt;
background: white;
box-shadow:
0 0 0 3pt #987e51,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
border-radius: 6pt;
position: relative;
transition: all 0.5s ease-in-out;
background: white;
box-shadow:
0 0 0 3pt #987e51,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
border-radius: 6pt;
position: relative;
transition: all 0.5s ease-in-out;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
@ -46,8 +46,8 @@ export default {
/* word-wrap: break-word; */
}
.card.back{
color:white;
background: repeating-linear-gradient(
color:white;
background: repeating-linear-gradient(
45deg,
#987e51,
#987e51 5px,
@ -57,33 +57,33 @@ export default {
}
.card.equipment {
box-shadow:
0 0 0 3pt #5c5e83,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
box-shadow:
0 0 0 3pt #5c5e83,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
}
.card.character {
box-shadow:
0 0 0 3pt #7c795b,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
box-shadow:
0 0 0 3pt #7c795b,
0 0 0 6pt white,
0 0 5pt 6pt #aaa;
}
.card h4 {
position: absolute;
text-align: center;
width: 100%;
top: -10pt;
text-align: center;
width: 100%;
top: -10pt;
}
.card .emoji {
position: absolute;
text-align: center;
width: 100%;
font-size:26pt;
top: 35%;
text-align: center;
width: 100%;
font-size:26pt;
top: 35%;
}
.card .suit {
position: absolute;
bottom: 3pt;
left:3pt;
bottom: 3pt;
left:3pt;
}
</style>

View File

@ -45,4 +45,13 @@ export default {
align-items: center;
justify-content: center;
}
.card {
width: 72pt;
min-width:72pt;
height: 120pt;
}
.card:hover {
transform: translate(0, -5px) scale(1.05, 1.05);
}
</style>

View File

@ -14,7 +14,9 @@
<player/>
</div>
<chat/>
<Chooser v-if="showChooser" text="Scegli il tuo personaggio" :cards="availableCharacters" :select="setCharacter"/>
<transition name="bounce">
<Chooser v-if="showChooser" text="Scegli il tuo personaggio" :cards="availableCharacters" :select="setCharacter"/>
</transition>
</div>
</template>