2021-08-30 10:46:18 +00:00
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
Alert,
|
|
|
|
Card,
|
|
|
|
CardBody,
|
|
|
|
CardTitle,
|
|
|
|
Col,
|
|
|
|
Container,
|
|
|
|
Icon,
|
|
|
|
Row,
|
|
|
|
} from 'sveltestrap';
|
|
|
|
|
|
|
|
import { my } from '../stores/my.js';
|
|
|
|
import { rank } from '../stores/teams.js';
|
|
|
|
import { settings } from '../stores/settings.js';
|
|
|
|
|
|
|
|
import CardTheme from '../components/CardTheme.svelte';
|
|
|
|
|
|
|
|
let search = "";
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<Container fluid class="my-3">
|
2021-08-31 23:47:44 +00:00
|
|
|
<h1 class="text-dark">
|
2021-08-30 10:46:18 +00:00
|
|
|
{$settings.title}
|
|
|
|
<small class="text-muted">Classement</small>
|
|
|
|
</h1>
|
|
|
|
<div class="card niceborder text-light">
|
|
|
|
<div class="card-body">
|
|
|
|
<input type="text" class="form-control" placeholder="Rechercher" bind:value={search}>
|
|
|
|
</div>
|
|
|
|
<table class="table table-hover table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Rang</th>
|
|
|
|
<th>Équipe</th>
|
|
|
|
<th>Points</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{#each $rank as team (team.id)}
|
|
|
|
{#if team.rank != 0 || ($my && $my.team_id == team.id)}
|
|
|
|
<tr class:bg-info={$my && $my.team_id == team.id} class:bg-warning={search.length && team.name.toLowerCase().indexOf(search.toLowerCase()) >= 0}>
|
|
|
|
<td>{team.rank}</td>
|
|
|
|
<td>{team.name}</td>
|
2021-09-02 09:15:35 +00:00
|
|
|
<td>{Math.round(team.score*100)/100}</td>
|
2021-08-30 10:46:18 +00:00
|
|
|
</tr>
|
|
|
|
{/if}
|
|
|
|
{/each}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</Container>
|