knowyt/client/src/components/Final.vue

133 lines
2.7 KiB
Vue
Raw Normal View History

2021-09-21 05:57:15 +00:00
<template>
<div class="final">
<div class="final__container">
<div class="final__table-outer-border">
<div class="final__table-head">
<div class="final__title">{{ title }}</div>
</div>
<div class="final__table-body">
<table>
<tr v-for="player in players" :key="player.id">
<td>{{ player.name }}</td>
<td>{{ player.score }}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
computed: {
title() {
return 'Team Banana Mania'
},
players() {
2021-09-21 06:23:05 +00:00
var players = [...this.$store.state.players.players]
players.sort((a, b) => {
return b.score - a.score
})
return players
2021-09-21 05:57:15 +00:00
},
},
}
</script>
<style lang="scss">
.final {
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
&__container {
margin: 64px 0;
width: 600px;
min-height: 600px;
}
&__table-outer-border {
display: flex;
flex-direction: column;
2021-09-24 19:40:36 +00:00
position: relative;
2021-09-21 05:57:15 +00:00
width: 100%;
height: 100%;
padding: 4px;
border-radius: 32px;
2021-09-24 19:40:36 +00:00
background: linear-gradient(45deg, #8060c0 0, #8060c0 65%, #ffffff 70%, #8060c0 75%, #8060c0 100%);
2021-09-21 06:23:05 +00:00
background-size: 400% 400%;
2021-09-24 19:40:36 +00:00
animation: finals-gradient 5s linear infinite 5s;
&::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
padding: 4px;
border-radius: 32px;
background: linear-gradient(45deg, rgba(128, 96, 192, 0) 50%, #402080 60%);
background-size: 400% 400%;
animation: finals-gradient__fade-in 5s ease;
}
2021-09-21 05:57:15 +00:00
}
&__table-head {
display: flex;
width: 100%;
height: 100px;
align-items: center;
justify-content: center;
background-color: #402080;
border-radius: 32px 32px 0 0;
margin-bottom: 4px;
}
&__title {
color: #ffffff;
font-family: "Wendy One";
font-size: 48px;
}
&__table-body {
width: 100%;
height: 100%;
background-color: #402080;
border-radius: 0 0 32px 32px;
color: #ffffff;
font-family: Dosis;
font-size: 32px;
table {
width: 100%;
padding: 64px;
}
td {
max-width: 300px;
white-space: nowrap;
overflow: hidden;
}
td ~ td {
text-align: right;
}
}
}
2021-09-24 19:40:36 +00:00
@keyframes finals-gradient__fade-in {
0% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
2021-09-21 06:23:05 +00:00
@keyframes finals-gradient {
0% { background-position: 130% 50%; }
2021-09-24 19:40:36 +00:00
30% { background-position: 130% 50%; }
70% { background-position: 0% 50%; }
100% { background-position: 0% 50%; }
2021-09-21 06:23:05 +00:00
}
2021-09-21 05:57:15 +00:00
</style>