Files
chess-endgame-trainer/lib/chesstrainer_web/controllers/page_html/home.html.heex
T
owenrees aebb2aecfb Fix the error-state regressions from the #164 verification (#171) (#173)
T8: the invalid-FEN flash is generic; the client message and FEN go to the
log. A2: an expired confirmation link says so and lands on log-in, where an
unconfirmed account resends the email. W3: the connection banner gains Reload
and Home actions. D1: a failed export logs and redirects to the data tab with
a support address instead of a bare 500. D2: an unknown export format renders
the styled 404. H1: the empty-database home CTA points at the guest trainer
instead of auth-gated /endgames. X2/X3: the importer hides inspect(reason)
behind generic copy and logs it.

Adds coverage for the T8 copy, A2 destination, D2 404 page, H1 CTA and the W3
actions; the H1 tests now restore the curated-code override so async page
tests cannot poison each other.
2026-11-13 16:46:29 +01:00

93 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Layouts.flash_group flash={@flash} />
<main id="main-content" tabindex="-1">
<section class="hero">
<div class="hero-copy">
<div class="eyebrow">
<.icon_spark /> Endgames, simplified
</div>
<h1>
Master the <em>endgame.</em>
</h1>
<p>
Train your intuition to find the winning moves under pressure. Puzzle sessions focused purely on technical execution.
</p>
<div class="hero-actions">
<%= if @active_endgame do %>
<.pill_button variant={:primary} navigate={play_path(@active_endgame)}>
Try today's puzzle <.icon_arrow />
</.pill_button>
<% else %>
<.pill_button variant={:primary} navigate={play_path(nil)}>
Start training <.icon_arrow />
</.pill_button>
<% end %>
<div class="rating-note">
<span class="avatar-stack">
<i>♟</i>
<i>♙</i>
<i>♜</i>
</span>
<span>
<strong>{count_label(@logged_in_count)}</strong> players training
</span>
</div>
</div>
</div>
<div class="board-stage" id="trainer">
<div class="coral-orbit" />
<div class="mint-orbit" />
<.board_preview endgame={@active_endgame} date={@today} />
</div>
</section>
<%!-- <section class="learning-strip" id="method">
<p>Built for the part of chess that decides everything.</p>
<div class="stat">
<strong>{count_label(@puzzle_count)}</strong>
<span>puzzles</span>
</div>
<div class="stat">
<strong>{@user_count}</strong>
<span>Players improving their endgame</span>
</div>
</section> --%>
<%!-- <section class="puzzle-section" id="puzzles">
<div class="section-heading">
<div>
<span class="section-kicker">Choose your lesson</span>
<h2>
One position. <br /> One idea.
</h2>
</div>
<p>
Each exercise teaches a pattern
that you’ll recognise over the board.
</p>
</div>
<div class="puzzle-grid">
<%= for {endgame, index} <- Enum.with_index(@endgames) do %>
<.puzzle_card
endgame={endgame}
index={index}
active={@active_endgame && endgame.id == @active_endgame.id}
/>
<% end %>
</div>
</section> --%>
<.mailing_list_signup :if={@mailing_list_enabled} />
<%!-- <section class="progress-banner" id="progress">
<div>
<span class="section-kicker">A calmer way to improve</span>
<h2>
Make the endgame <br /> your strongest phase.
</h2>
</div>
<.pill_button variant={:light} navigate={play_path(@active_endgame)}>
Begin with the basics <.icon_arrow />
</.pill_button>
</section> --%>
</main>