format refactored admin templates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-01 19:39:56 +00:00
parent 867a69109e
commit 22d3e36ed5
4 changed files with 160 additions and 54 deletions

View File

@@ -205,7 +205,10 @@ defmodule BerrypodWeb.Admin.Newsletter do
</div>
<button
phx-click="toggle_enabled"
class={["admin-switch", if(@newsletter_enabled, do: "admin-switch-on", else: "admin-switch-off")]}
class={[
"admin-switch",
if(@newsletter_enabled, do: "admin-switch-on", else: "admin-switch-off")
]}
role="switch"
aria-checked={to_string(@newsletter_enabled)}
aria-label="Toggle newsletter signups"
@@ -231,10 +234,18 @@ defmodule BerrypodWeb.Admin.Newsletter do
</div>
<div class="admin-row" style="--admin-row-gap: 0.75rem;">
<.link navigate={~p"/admin/newsletter?tab=subscribers"} class="admin-link" style="font-weight: 500;">
<.link
navigate={~p"/admin/newsletter?tab=subscribers"}
class="admin-link"
style="font-weight: 500;"
>
View subscribers
</.link>
<.link navigate={~p"/admin/newsletter?tab=campaigns"} class="admin-link" style="font-weight: 500;">
<.link
navigate={~p"/admin/newsletter?tab=campaigns"}
class="admin-link"
style="font-weight: 500;"
>
View campaigns
</.link>
</div>
@@ -328,7 +339,9 @@ defmodule BerrypodWeb.Admin.Newsletter do
<div :if={@subscriber_count == 0} class="admin-empty-state">
<.icon name="hero-envelope" class="admin-empty-state-icon" />
<p class="admin-empty-state-title">No subscribers yet</p>
<p class="admin-empty-state-text">Subscribers will appear here when people sign up via your shop.</p>
<p class="admin-empty-state-text">
Subscribers will appear here when people sign up via your shop.
</p>
</div>
</div>
"""