-
Notifications
You must be signed in to change notification settings - Fork 3
/
Overview.vue
129 lines (115 loc) · 3.35 KB
/
Overview.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<template>
<div class="view-overview">
<h1 class="page-title">Overview</h1>
<div class="container">
<div class="overview-container overview-container__groups">
<card type="group" v-for="group in groups" :key="group.id" v-if="groups && groups.length > 0">
<template slot="title">Group {{ group.name }}</template>
<template slot="content">
<group-teams :teams="teamsById(group.teams)"></group-teams>
<group-footer :group="group"></group-footer>
</template>
</card>
</div>
<div class="overview-container overview-container__misc">
<card type="playoffs">
<template slot="title">Playoffs</template>
<template slot="content">
<playoffs></playoffs>
</template>
</card>
<card type="top10">
<template slot="title">
<ranking-header :topTen="true"></ranking-header>
</template>
<template slot="content">
<ranking-row
v-for="(user, index) in rankingSorted"
:key="user.id"
:user="user"
:place="index + 1"
v-if="rankingSorted && index < 10"
></ranking-row>
</template>
</card>
</div>
<div class="overview-container overview-container__misc">
<card type="upcoming">
<template slot="title">Upcoming Games</template>
<template slot="link"><router-link to="/games">All Games</router-link></template>
<template slot="content">
<upcoming-games></upcoming-games>
</template>
</card>
<card type="vote-winner">
<template slot="title">Who will win the {{ appTitle }}?</template>
<template slot="content">
<winner-vote></winner-vote>
</template>
</card>
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import Card from '../components/Card.vue';
import GroupFooter from '../components/GroupFooter.vue';
import GroupTeams from '../components/GroupTeams.vue';
import Playoffs from '../components/Playoffs.vue';
import TopTen from '../components/TopTen.vue';
import UpcomingGames from '../components/UpcomingGames.vue';
import RankingHeader from '../components/RankingHeader.vue';
import RankingRow from '../components/RankingRow.vue';
import WinnerVote from '../components/WinnerVote.vue';
export default {
name: 'view-overview',
components: {
RankingRow,
RankingHeader,
Card,
GroupFooter,
GroupTeams,
Playoffs,
TopTen,
UpcomingGames,
WinnerVote
},
computed: {
...mapGetters([
'appTitle',
'groups',
'teamsById',
'rankingSorted'
])
}
}
</script>
<style lang="scss">
@import '../sass/imports';
.overview-container {
display: flex;
flex-wrap: wrap;
@include rem(margin, 0 0 0 -10px);
}
.overview-container__groups {
.card__group {
width: 50%;
@include respond-to-min(640px) {
width: 25%;
}
@include respond-to-min(1280px) {
width: 12.5%;
}
}
}
.overview-container__misc {
.card {
width: 100%;
@include rem(padding-top, 20px);
@include respond-to-min(640px) {
width: 50%;
}
}
}
</style>