nicer formatting

This commit is contained in:
Adam 2024-08-30 01:29:09 -04:00
parent 5e65765be1
commit 876df286e3

View file

@ -30,12 +30,12 @@ fn Scoreboard() -> impl IntoView {
view! { view! {
<Show when=move || { game_meta().is_some() }> <Show when=move || { game_meta().is_some() }>
<span class="absolute top-0 right-0"> <span class="absolute top-0 right-0">
<p>Players:</p> <table class="min-w-full table-auto">
<table class="min-w-full border border-collapse table-auto">
<thead> <thead>
<tr> <tr>
<th class="border-b">Name</th> <th></th>
<th class="border-b">Score</th> <th></th>
<th>"Score"</th>
</tr> </tr>
</thead> </thead>
{game_meta() {game_meta()
@ -45,14 +45,15 @@ fn Scoreboard() -> impl IntoView {
.map(|player| { .map(|player| {
view! { view! {
<tr> <tr>
<td class="text-center border-b"> <td>
{if game_meta().unwrap().czar == player.name { {if game_meta().unwrap().czar == player.name {
"👑 " "👑 "
} else { } else {
"" ""
}} {player.name} }}
</td> </td>
<td class="text-center border-b">{player.score}</td> <td>{player.name}</td>
<td class="text-center">{player.score}</td>
</tr> </tr>
} }
}) })