fix overlapping text and make game header take up less space
This commit is contained in:
parent
71bd306ffb
commit
912741acb4
1 changed files with 44 additions and 46 deletions
|
@ -6,12 +6,12 @@ fn Meta() -> impl IntoView {
|
||||||
let game_meta = expect_context::<ReadSignal<Option<GameMeta>>>();
|
let game_meta = expect_context::<ReadSignal<Option<GameMeta>>>();
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<span>
|
<div class="shrink-0">
|
||||||
<p>Name: {move || game_meta().unwrap().name}</p>
|
<p>{move || game_meta().unwrap().name}</p>
|
||||||
<p>White Deck: {move || game_meta().unwrap().white_count}</p>
|
<p>"⬜ " {move || game_meta().unwrap().white_count}</p>
|
||||||
<p>White Discard: {move || game_meta().unwrap().white_discard_count}</p>
|
<p>"⬛ " {move || game_meta().unwrap().black_count}</p>
|
||||||
<p>Black Deck: {move || game_meta().unwrap().black_count}</p>
|
<p>"♻ " {move || game_meta().unwrap().white_discard_count}</p>
|
||||||
</span>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ 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">
|
<table class="table-auto">
|
||||||
<table class="min-w-full table-auto">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
@ -59,7 +58,6 @@ fn Scoreboard() -> impl IntoView {
|
||||||
})
|
})
|
||||||
.collect_view()}
|
.collect_view()}
|
||||||
</table>
|
</table>
|
||||||
</span>
|
|
||||||
</Show>
|
</Show>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +65,7 @@ fn Scoreboard() -> impl IntoView {
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Header() -> impl IntoView {
|
pub fn Header() -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<div class="relative">
|
<div class="flex flex-wrap justify-between">
|
||||||
<Meta />
|
<Meta />
|
||||||
<Scoreboard />
|
<Scoreboard />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue