Skip to content

Commit

Permalink
Hide brackets on scoreboard if there are no brackets (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdHeat authored Feb 26, 2024
1 parent 3e3fe6b commit b0f1332
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions templates/scoreboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ <h1>
</div>

<div id="scoreboard" class="row" x-data="ScoreboardList">
<div class="col-md-12 py-3">
<nav class="nav nav-pills nav-fill">
<button :class="{'nav-link': true, 'active': !activeBracket}" @click="activeBracket=null">All</button>
<template x-for="bracket in brackets">
<button :class="{'nav-link': true, 'active': activeBracket == bracket.id}" x-text="bracket.name" @click="activeBracket=bracket.id"></button>
</template>
</nav>
</div>
<template x-if="brackets.length">
<div class="col-md-12 py-3">
<nav class="nav nav-pills nav-fill">
<button :class="{'nav-link': true, 'active': !activeBracket}" @click="activeBracket=null">All</button>
<template x-for="bracket in brackets">
<button :class="{'nav-link': true, 'active': activeBracket == bracket.id}" x-text="bracket.name" @click="activeBracket=bracket.id"></button>
</template>
</nav>
</div>
</template>

<div class="col-md-12">
<table class="table table-striped">
Expand Down

0 comments on commit b0f1332

Please sign in to comment.