remise du tableau de score

This commit is contained in:
batche
2023-01-09 11:09:33 +01:00
parent 3f9abea672
commit a346b7d5a2

View File

@@ -27,30 +27,24 @@
} }
</script> </script>
<Header /> <Header />
<br />
<div class="container"> <div class="principal-div">
<div class="row"> <table class="stats-table">
<div class="col-12">
<h1>Ranking</h1>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th scope="col">#</th> <th>#</th>
<th scope="col">Username</th> <th>Username</th>
<th scope="col">Win</th> <th>Win</th>
<th scope="col">Lose</th> <th>Lose</th>
<th scope="col">Draw</th> <th>Draw</th>
<th scope="col">Games Played</th> <th>Games Played</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each allUsers as user, i} {#each allUsers as user, i}
<tr> <tr>
<th scope="row">{i + 1}</th> <th>{i + 1}</th>
{#if user.username === currentUser.username} {#if user.username === currentUser.username}
<td><b>You ({user.username})</b></td> <td><b>You ({user.username})</b></td>
{:else} {:else}
@@ -65,10 +59,46 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</div>
<style> <style>
.principal-div {
display: flex;
justify-content: center;
align-items: center;
}
.stats-table {
margin-left: auto;
margin-right: auto;
font-size: 0.9em;
font-family: sans-serif;
min-width: 400px;
}
.stats-table thead tr {
background-color: #618174;
color: #ffffff;
}
.stats-table th,
.stats-table td {
padding: 12px 15px;
}
.stats-table tbody tr {
border-bottom: 1px solid #dddddd;
}
.stats-table tbody tr:nth-of-type(even) {
background-color: #f3f3f3;
}
.stats-table tbody tr:last-of-type {
border-bottom: 2px solid #618174;
}
.stats-table tbody tr.active-row {
font-weight: bold;
color: #618174;
}
</style> </style>