knowyt/client/src/components/Final.vue

110 lines
2.2 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;
width: 100%;
height: 100%;
padding: 4px;
border-radius: 32px;
2021-09-21 06:23:05 +00:00
// background-color: #8060c0;
background: linear-gradient(45deg, #8060c0 0, #8060c0 45%, #ffffff 50%, #8060c0 55%, #8060c0 100%);
background-size: 400% 400%;
animation: finals-gradient 5s ease infinite;
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-21 06:23:05 +00:00
@keyframes finals-gradient {
0% { background-position: 130% 50%; }
100% { background-position: -30% 50%; }
}
2021-09-21 05:57:15 +00:00
</style>