fix coming soon page: crash, logo centering, admin login link

Add AnalyticsHook to the coming_soon live session — the shop layout
fires an analytics:screen JS event but the session had no handler,
crashing the page on connect.

Centre the logo image (display:block from CSS reset needs
margin-inline:auto). Add a subtle "Admin" link at the bottom using
flex flow rather than fixed/absolute positioning so it works in
iframes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-04 00:41:15 +00:00
parent 1a2a6f5d56
commit 92a008926e
4 changed files with 21 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ defmodule BerrypodWeb.Shop.ComingSoon do
We're getting things ready. Check back soon.
</p>
</div>
<a href="/admin" class="coming-soon-admin-link">Admin</a>
</main>
"""
end

View File

@@ -243,7 +243,8 @@ defmodule BerrypodWeb.Router do
layout: {BerrypodWeb.Layouts, :shop},
on_mount: [
{BerrypodWeb.SetupHook, :require_admin},
{BerrypodWeb.ThemeHook, :mount_theme}
{BerrypodWeb.ThemeHook, :mount_theme},
{BerrypodWeb.AnalyticsHook, :track}
] do
live "/coming-soon", Shop.ComingSoon, :index
end