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>
29 lines
768 B
Elixir
29 lines
768 B
Elixir
defmodule BerrypodWeb.Shop.ComingSoon do
|
|
use BerrypodWeb, :live_view
|
|
|
|
@impl true
|
|
def mount(_params, _session, socket) do
|
|
{:ok, assign(socket, :page_title, "Coming soon")}
|
|
end
|
|
|
|
@impl true
|
|
def render(assigns) do
|
|
~H"""
|
|
<main class="coming-soon" role="main">
|
|
<div>
|
|
<div :if={@logo_image} class="coming-soon-logo">
|
|
<img src={logo_url(@logo_image)} alt={@site_name} />
|
|
</div>
|
|
<h1 class="coming-soon-title">{@site_name}</h1>
|
|
<p class="coming-soon-message">
|
|
We're getting things ready. Check back soon.
|
|
</p>
|
|
</div>
|
|
<a href="/admin" class="coming-soon-admin-link">Admin</a>
|
|
</main>
|
|
"""
|
|
end
|
|
|
|
defp logo_url(logo_image), do: "/image_cache/#{logo_image.id}.webp"
|
|
end
|