Skip to content

Commit 3551b0d

Browse files
committed
cleaned up game log / changed colors / added card and bot information
1 parent f14c523 commit 3551b0d

File tree

7 files changed

+101
-17
lines changed

7 files changed

+101
-17
lines changed

public/bot.png

30.7 KB
Loading

src/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
text-align: center;
2424
color: aliceblue;
2525
height: 100%;
26+
background-color: #353535;
2627
}
2728
</style>

src/components/Card.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<div class="card">
33
<div class="card-pic" :class="{'red-card': color === 'red', 'yellow-card': color === 'yellow'}"></div>
4-
<div class="card-count">{{numCards}}</div>
4+
<div class="card-count">
5+
{{numCards}}
6+
</div>
57
</div>
68
</template>
79

@@ -22,6 +24,9 @@
2224
border-width: 0.4vh;
2325
display: inline-block;
2426
margin: 0.1em;
27+
height: 7vmin;
28+
min-width: 130px;
29+
text-align: center;
2530
}
2631
2732
.card-pic {
@@ -30,7 +35,7 @@
3035
height: 5vmin;
3136
margin-left: 1vmin;
3237
display: inline-block;
33-
font-size: initial;
38+
font-size: 12pt;
3439
/* IE 7 hack */
3540
*zoom: 1;
3641
*display: inline;

src/components/CardTimer.vue

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div class="card-timer">
3+
<div class="progressBar" :style="{
4+
'width': `${percentage}%`
5+
}"> </div>
6+
</div>
7+
</template>
8+
9+
<script>
10+
export default {
11+
name: "CardTimer",
12+
props: {
13+
cardTimer: Number,
14+
},
15+
16+
computed: {
17+
percentage() {
18+
return this.cardTimer / 1200000
19+
},
20+
}
21+
}
22+
</script>
23+
24+
<style scoped>
25+
26+
.card-timer {
27+
width: 90%;
28+
height: 16px;
29+
display: block;
30+
border: 1px yellow solid;
31+
margin-left: 5%;
32+
margin-right: 5%;
33+
margin-bottom: 8px;
34+
}
35+
36+
.card-timer .progressBar {
37+
background: yellow;
38+
display: inline-block;
39+
height: 100%;
40+
vertical-align: top;
41+
}
42+
43+
</style>

src/components/GameEvents.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
}
5454
5555
.table-striped tbody tr:nth-of-type(odd) {
56-
background-color: rgba(111, 158, 208, 0.6);
56+
background-color: #222;
5757
}
5858
5959
.table-striped tbody tr:nth-of-type(even) {
60-
background-color: rgba(194, 195, 208, 0.6);
60+
background-color: #444
6161
}
6262
6363
</style>

src/components/StatusBoard.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,18 @@
4242
4343
.upper-container {
4444
width: 100%;
45-
height: 58%;
4645
align-items: center;
46+
height: 62%
4747
}
4848
4949
.lower-container {
50-
height: 39%;
50+
height: 35%;
5151
}
5252
5353
.upper-lower-separator {
5454
margin-top: 0.2em;
5555
margin-bottom: 0.2em;
56+
display: block;
5657
}
5758
5859
.match-status-container {

src/components/TeamStatus.vue

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
<template>
2-
<div :class="{'bot-substitution-intent': botSubstitutionIntent}">
2+
<div class="teamStatus" :class="{'bot-substitution-intent': botSubstitutionIntent}">
33
<div :class="{'team-yellow': color === 'yellow', 'team-blue': color === 'blue'}" class="team-name">
44
<div class="team-name-text">{{team.name}}</div>
55
</div>
66

77
<img :src="logoUrl" alt="team logo" class="team-logo"/>
88

9-
<hr class="logo-card-separator">
10-
119
<div class="cards">
1210
<Card color="red" :num-cards="team.redCards"/>
1311
<span> | </span>
1412
<Card color="yellow"
1513
:class="{'marked-card': markYellowCard}"
1614
:num-cards="team.yellowCards"/>
15+
<span> | </span>
16+
<span class="botinfo">
17+
<img class="boticon" src="bot.png"/>
18+
{{team.maxAllowedBots}}
19+
</span>
20+
<div class="cardTimers">
21+
<CardTimer v-for="cardTime in team.yellowCardTimes.slice(0,3)"
22+
:cardTimer="cardTime" />
23+
24+
<div class="additional-cards" v-if="team.yellowCardTimes.length > 3"> + {{ team.yellowCardTimes.length - 3}} more </div>
25+
</div>
1726
</div>
1827
</div>
1928
</template>
@@ -22,10 +31,11 @@
2231
import {Referee} from "@/sslProto"
2332
import teamLogoUrl from "@/teamLogoUrl"
2433
import Card from "./Card";
34+
import CardTimer from "./CardTimer";
2535
2636
export default {
2737
name: "TeamStatus",
28-
components: {Card},
38+
components: {Card, CardTimer},
2939
props: {
3040
color: String,
3141
team: Referee.ITeamInfo,
@@ -46,30 +56,31 @@
4656

4757
<style scoped>
4858
59+
.teamStatus {
60+
transition: background-color 500ms ease;
61+
62+
}
63+
4964
.bot-substitution-intent {
5065
background-color: #c2c3d0;
5166
}
5267
5368
.team-name {
54-
height: 15vh;
69+
height: 12vh;
5570
display: flex;
5671
flex-direction: column;
5772
justify-content: flex-end;
5873
}
5974
6075
.team-logo {
61-
max-width: 20vw;
62-
max-height: 30vh;
76+
max-width: 27vw;
77+
max-height: 27vh;
6378
}
6479
6580
.marked-card {
6681
border-color: yellow;
6782
}
6883
69-
.cards {
70-
vertical-align: middle;
71-
}
72-
7384
.inline {
7485
display: inline;
7586
}
@@ -78,4 +89,27 @@
7889
margin: 0.2em;
7990
}
8091
92+
.cardTimers {
93+
margin-top: 6px;
94+
display: block;
95+
}
96+
97+
98+
.boticon {
99+
height: 4.5vmin;
100+
vertical-align: middle;
101+
}
102+
103+
.botinfo {
104+
display: inline-block;
105+
border-style: dotted;
106+
border-width: 0.4vh;
107+
min-width: 130px;
108+
height: 7vmin;
109+
}
110+
111+
.additional-cards {
112+
font-size: 24pt;
113+
color: yellow;
114+
}
81115
</style>

0 commit comments

Comments
 (0)