mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 03:32:06 +00:00
Full-width list/show pages and trim the admin table
List and show pages now use a wide container (max-w-7xl) while the form and play pages keep the narrow column. The admin table drops Fen, Message, Notes, Attempted and Solved — all already shown on the show page — so it fits without right-overflow. Closes #16
This commit is contained in:
@@ -31,12 +31,16 @@ defmodule ChesstrainerWeb.Layouts do
|
||||
default: nil,
|
||||
doc: "the current [scope](https://phoenix.hexdocs.pm/scopes.html)"
|
||||
|
||||
attr :wide, :boolean,
|
||||
default: false,
|
||||
doc: "use a wide container instead of the default narrow column"
|
||||
|
||||
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">
|
||||
<div class={["mx-auto space-y-4", if(@wide, do: "max-w-7xl", else: "max-w-2xl")]}>
|
||||
{render_slot(@inner_block)}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user