Files
chess-endgame-trainer/lib/chesstrainer_web/components/layouts/root.html.heex
T
owenrees 69b89f68ef Add a public health probe and monitoring runbook (#166)
* move theme picker position in add endgames form

* Add branded favicons and web manifest

- Replace the placeholder favicon with the knight mark: .ico (16/32/48),
  SVG, and 16/32 PNGs.
- Add opaque apple-touch and Android launcher icons plus a site
  webmanifest naming the app and using the brand palette.
- Link the icon set, manifest, and theme-color from the root layout and
  the 404/500 pages.
- Whitelist the new static files in static_paths/0 and the prelaunch
  allowlist so they are served in production and behind the gate.
- Sync the coming-soon site's favicon.ico and drop the unused Phoenix
  logo.

* Add a public health probe and monitoring runbook

Probe https://<PHX_HOST>/health through Cloudflare every two minutes and
report to a healthchecks.io check. A healthy run posts the raw health JSON;
a tablebase mismatch is a green check-in with the mismatch recorded; a
non-200, non-JSON, down database or network failure posts one fail ping with
the response body and a loopback cross-check as evidence.

--dry-run evaluates the success, degraded, fail, non-JSON and unreachable
fixtures without reading config or touching the network. The runbook covers
the healthchecks.io check, install, what /health proves, Beszel's blind spot
and the drills.

* Fix theme picker search after moving it into the endgame form

The picker moved inside the endgame form, which nested the component's
own <form>. Browsers, and the LiveView test DOM, drop a nested form along
with its phx-change and phx-submit bindings, so the search box did nothing
and three form tests lost their #theme-form selector.

The component now renders no form: phx-change sits on the search input,
which works both inside the endgame form and standalone on the bulk
importer. The unreachable create_theme_from_search handlers go away; theme
creation uses the existing button. Tests search through the input and
click that button.
2026-11-13 13:24:35 +01:00

90 lines
3.0 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta :if={assigns[:noindex]} name="robots" content="noindex" />
<meta name="csrf-token" content={get_csrf_token()} />
<.live_title
default={Branding.home_title()}
suffix={assigns[:title_suffix] || " · #{Branding.name()}"}
phx-no-format
>{assigns[:page_title]}</.live_title>
<meta
:if={assigns[:meta_description]}
name="description"
content={assigns[:meta_description]}
/>
<link :if={assigns[:canonical_url]} rel="canonical" href={assigns[:canonical_url]} />
<meta :if={assigns[:meta_description]} property="og:type" content="website" />
<meta :if={assigns[:meta_description]} property="og:site_name" content={Branding.name()} />
<meta
:if={assigns[:meta_description]}
property="og:title"
content={assigns[:page_title] || Branding.home_title()}
/>
<meta
:if={assigns[:meta_description]}
property="og:description"
content={assigns[:meta_description]}
/>
<meta :if={assigns[:canonical_url]} property="og:url" content={assigns[:canonical_url]} />
<meta :if={assigns[:meta_description]} name="twitter:card" content="summary" />
<meta
:if={assigns[:meta_description]}
name="twitter:title"
content={assigns[:page_title] || Branding.home_title()}
/>
<meta
:if={assigns[:meta_description]}
name="twitter:description"
content={assigns[:meta_description]}
/>
<link rel="icon" href="/favicon.ico" sizes="48x48" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32" />
<link rel="icon" href="/favicon-16x16.png" type="image/png" sizes="16x16" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="theme-color" content="#17352d" />
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
<link
rel="preload"
href="/fonts/dm-sans-variable.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="preload"
href="/fonts/dm-serif-display.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<script
defer
phx-track-static
type="text/javascript"
src={assigns[:js_entry] || ~p"/assets/js/app.js"}
>
</script>
<Layouts.theme_script />
</head>
<body>
<a
href="#main-content"
class="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-base-100 focus:px-4 focus:py-2 focus:text-base-content focus:shadow-lg"
>
Skip to main content
</a>
<Layouts.navbar current_scope={@current_scope} />
{@inner_content}
<Layouts.footer />
<Layouts.analytics current_scope={@current_scope} />
</body>
</html>