mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
change header size and rating placement
This commit is contained in:
@@ -10,13 +10,15 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
|
|||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<Layouts.app flash={@flash}>
|
<Layouts.app flash={@flash}>
|
||||||
<.header>
|
<header class="flex flex-wrap items-start justify-between gap-4 pb-4">
|
||||||
Play endgame {@endgame.key}
|
<div>
|
||||||
<:subtitle>
|
<h1 class="settings-header">Play endgame {@endgame.key}</h1>
|
||||||
|
<p class="settings-subtitle mt-4">
|
||||||
{@endgame.color |> Atom.to_string() |> String.capitalize()} to move · Rating: {round(
|
{@endgame.color |> Atom.to_string() |> String.capitalize()} to move · Rating: {round(
|
||||||
@endgame.rating
|
@endgame.rating
|
||||||
)} · Attempts: {@endgame.times_attempted ||
|
)} · Attempts: {@endgame.times_attempted ||
|
||||||
0} · Solved: {@endgame.times_solved || 0}
|
0} · Solved: {@endgame.times_solved || 0}
|
||||||
|
</p>
|
||||||
<p class="text-xs text-muted flex items-center mt-1">
|
<p class="text-xs text-muted flex items-center mt-1">
|
||||||
<span>FEN: {@endgame.fen}</span>
|
<span>FEN: {@endgame.fen}</span>
|
||||||
<button
|
<button
|
||||||
@@ -29,20 +31,16 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
|
|||||||
<.icon name="hero-document-duplicate" class="w-3.5 h-3.5" />
|
<.icon name="hero-document-duplicate" class="w-3.5 h-3.5" />
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</:subtitle>
|
</div>
|
||||||
<:actions>
|
<div class="flex flex-none gap-2">
|
||||||
<.button :if={Scope.premium?(@current_scope)} navigate={~p"/endgames"}>
|
<.button :if={Scope.premium?(@current_scope)} navigate={~p"/endgames"}>
|
||||||
<.icon name="hero-arrow-left" /> Back to endgames
|
<.icon name="hero-arrow-left" /> Back to endgames
|
||||||
</.button>
|
</.button>
|
||||||
<.button :if={!Scope.premium?(@current_scope)} navigate={~p"/"}>
|
<.button :if={!Scope.premium?(@current_scope)} navigate={~p"/"}>
|
||||||
<.icon name="hero-arrow-left" /> Back home
|
<.icon name="hero-arrow-left" /> Back home
|
||||||
</.button>
|
</.button>
|
||||||
</:actions>
|
|
||||||
</.header>
|
|
||||||
|
|
||||||
<div :if={@user_rating} class="mb-4">
|
|
||||||
<.rating_guide rating={@user_rating} deviation={@user_deviation} />
|
|
||||||
</div>
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
<PlayComponents.play_surface
|
<PlayComponents.play_surface
|
||||||
endgame={@endgame}
|
endgame={@endgame}
|
||||||
@@ -59,6 +57,10 @@ defmodule ChesstrainerWeb.EndgameLive.Play do
|
|||||||
last_grade={@last_grade}
|
last_grade={@last_grade}
|
||||||
awaiting_best_line={@awaiting_best_line}
|
awaiting_best_line={@awaiting_best_line}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div :if={@user_rating} class="mb-4">
|
||||||
|
<.rating_guide rating={@user_rating} deviation={@user_deviation} />
|
||||||
|
</div>
|
||||||
</Layouts.app>
|
</Layouts.app>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user