Feature/endgame play (#1)

* create endgame play section

* add cache tests

* normalise FENs - trim and fuill move to 1 on addition

* remove svg on root and allow navbar to exist across all pages

* update nav items
This commit is contained in:
2026-08-11 22:38:18 +02:00
committed by GitHub
parent ca51546be0
commit 7717278561
20 changed files with 771 additions and 78 deletions
+18 -12
View File
@@ -34,6 +34,20 @@ defmodule ChesstrainerWeb.Layouts do
slot :inner_block, required: true
def app(assigns) do
~H"""
<main class="px-4 py-20 sm:px-6 lg:px-8">
<div class="mx-auto max-w-2xl space-y-4">
{render_slot(@inner_block)}
</div>
</main>
<.flash_group flash={@flash} />
"""
end
@doc """
Renders the application navbar.
"""
def navbar(assigns) do
~H"""
<header class="navbar px-4 sm:px-6 lg:px-8">
<div class="flex-1">
@@ -45,30 +59,22 @@ defmodule ChesstrainerWeb.Layouts do
<div class="flex-none">
<ul class="flex flex-column px-1 space-x-4 items-center">
<li>
<a href="https://phoenixframework.org/" class="btn btn-ghost">Website</a>
<a href="/endgames" class="btn btn-ghost">Endgames</a>
</li>
<li>
<a href="https://github.com/phoenixframework/phoenix" class="btn btn-ghost">GitHub</a>
<a href="/admin/endgames" class="btn btn-ghost">Admin</a>
</li>
<li>
<.theme_toggle />
</li>
<li>
<a href="https://phoenix.hexdocs.pm/overview.html" class="btn btn-primary">
Get Started <span aria-hidden="true">&rarr;</span>
<a href="/" class="btn btn-primary">
Login / Signup
</a>
</li>
</ul>
</div>
</header>
<main class="px-4 py-20 sm:px-6 lg:px-8">
<div class="mx-auto max-w-2xl space-y-4">
{render_slot(@inner_block)}
</div>
</main>
<.flash_group flash={@flash} />
"""
end