Files
chess-endgame-trainer/lib/chesstrainer_web/controllers/page_html/home.html.heex
T
owenrees 93806b9ab2 landing page (#63)
* remove daisyui and rebuild styles

* very basic setup of new design - missing components etc

* basic navbar with reusable landing components

* basic puzzle of the day

* update todos

* update todos

* add curated landing puzzle cards with selectable board (#55)

* update with footer

* add button to solve today's puzzle

* Make landing page a dead view

Render the home page from PageController with a static board preview, link puzzle cards and CTAs to public-code play routes, count puzzles from the DB, and add a global footer.

* Serve a marketing-only JS bundle on the landing page

Build a small marketing entry point with phoenix_html and the plain-DOM navbar, select it on controller-rendered pages, and keep the full LiveView bundle for LiveView pages.

* Add landing page SEO metadata

Replace the Phoenix default title with a descriptive Lucid Chess title, and add description, canonical, Open Graph, and Twitter card tags to the landing page.

* Complete the hero copy block

Add the spark icon primitive and the Endgames, made clear eyebrow. The primary CTA keeps linking to the active puzzle rather than scrolling to the board.

* Add a persisted global daily puzzle

Assign one endgame per UTC day in a daily_puzzles table with a unique date, preferring endgames unused in the last 30 days and falling back to any. Concurrent first requests insert with on-conflict-ignore and read the winning row. The landing board now shows the daily puzzle.

* remove unused CSS, nav links, time pill

* allow devices to connect to dev server by changing IP address to 0.0.0.0

* Restore the colour-mode switch and add a dark palette

* Use brand colour tokens on the play page

* self host fonts  - closes issue #62

* begin splitting CSS into modules

* remove hover on hero chessboard, split more css modules

* remove interactivity from hero chessboard

* update todo
2026-11-05 13:52:14 +01:00

90 lines
2.5 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>
<section class="hero">
<div class="hero-copy">
<div class="eyebrow">
<.icon_spark /> Endgames, made clear
</div>
<h1>
Learn to see the <em>winning move.</em>
</h1>
<p>
Short, focused endgame sessions that build the instincts you need
when every move matters.
</p>
<div class="hero-actions">
<.pill_button variant={:primary} navigate={play_path(@active_endgame)}>
Try today's puzzle <.icon_arrow />
</.pill_button>
<div class="rating-note">
<span class="avatar-stack">
<i>♟</i>
<i>♙</i>
<i>♜</i>
</span>
<span>
<strong>12,400+</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} />
</div>
</section>
<section class="learning-strip" id="method">
<p>Built for the part of chess that decides everything.</p>
<div class="stat">
<strong>10</strong>
<span>minutes a day</span>
</div>
<div class="stat">
<strong>{puzzle_count_label(@puzzle_count)}</strong>
<span>puzzles</span>
</div>
<div class="stat">
<strong>3.2×</strong>
<span>faster pattern recall</span>
</div>
</section>
<section class="puzzle-section" id="puzzles">
<div class="section-heading">
<div>
<span class="section-kicker">Choose your challenge</span>
<h2>
One position. <br /> One clear idea.
</h2>
</div>
<p>
No noise, no endless variations. Each exercise teaches a pattern
you’ll recognize 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>
<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>