Skip to content

Commit

Permalink
Add standings to team theme page
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Jan 21, 2022
1 parent eed7125 commit 34d2061
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions website/src/views/sub-views/TeamTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@
</div>

<h3>Bracket</h3>
<div class="overlay-area">
<div class="overlay-area mb-3">
<div class="bracket-match">
<BracketTeam :team="team" score="0"/>
</div>
</div>

<h3>Standings</h3>
<div class="standings mb-3">
<StandingsTeam :team="standingsData" />
</div>

</div>
</template>

Expand All @@ -54,16 +59,25 @@ import { getImage } from "@/utils/content-utils";
import { logoBackground } from "@/utils/theme-styles";
import ContentRow from "@/components/website/ContentRow";
import ContentThing from "@/components/website/ContentThing";
import StandingsTeam from "@/components/broadcast/StandingsTeam";
function cleanKey(key) {
return key.replace(/_/g, " ");
}
export default {
name: "TeamTheme.vue",
components: { BracketTeam, IngameTeam, ContentRow, ContentThing },
components: { BracketTeam, IngameTeam, ContentRow, ContentThing, StandingsTeam },
props: ["team"],
computed: {
standingsData() {
return {
...this.team,
standings: {
wins: 0, losses: 0, map_wins: 0, map_losses: 0, rank: 1, winrate: 0.5
}
};
},
theme() {
if (!this.team || this.team.has_theme === 0 || !this.team.theme?.id) return null;
return this.team.theme;
Expand Down Expand Up @@ -191,4 +205,13 @@ export default {
transform-origin: left;
}
}
.standings {
font-size: 24px;
width: fit-content;
}
.standings >>> .team-name {
margin-right: 32px;
min-width: 250px;
}
</style>

0 comments on commit 34d2061

Please sign in to comment.