Providers was a hidden page with no nav link. Also adds LiveDashboard and ErrorTracker to the sidebar footer, and styles the provider dropdown menu items. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
135 lines
4.2 KiB
Plaintext
135 lines
4.2 KiB
Plaintext
<div class="admin-layout h-full">
|
|
<input id="admin-drawer" type="checkbox" class="admin-layout-toggle" />
|
|
|
|
<%!-- main content area --%>
|
|
<div class="admin-layout-content">
|
|
<%!-- mobile header --%>
|
|
<header class="admin-topbar">
|
|
<label
|
|
for="admin-drawer"
|
|
class="admin-btn admin-btn-ghost admin-btn-icon"
|
|
aria-label="Open navigation"
|
|
>
|
|
<.icon name="hero-bars-3" class="size-5" />
|
|
</label>
|
|
<span class="admin-topbar-title">Berrypod</span>
|
|
<.link href={~p"/"} class="admin-btn admin-btn-ghost admin-btn-sm">
|
|
<.icon name="hero-arrow-top-right-on-square-mini" class="size-4" /> Shop
|
|
</.link>
|
|
</header>
|
|
|
|
<%!-- page content --%>
|
|
<main class="flex-1 p-4 sm:p-6 lg:p-8">
|
|
<div class="mx-auto max-w-5xl">
|
|
{@inner_content}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<%!-- sidebar --%>
|
|
<div class="admin-sidebar-wrapper">
|
|
<label for="admin-drawer" class="admin-sidebar-overlay" aria-label="Close navigation"></label>
|
|
<aside class="admin-sidebar">
|
|
<%!-- sidebar header --%>
|
|
<div class="p-4 border-b border-base-300">
|
|
<.link navigate={~p"/admin"} class="text-lg font-bold tracking-tight">
|
|
Berrypod
|
|
</.link>
|
|
<p class="text-xs text-base-content/60 mt-0.5 truncate">
|
|
{@current_scope.user.email}
|
|
</p>
|
|
</div>
|
|
|
|
<%!-- nav links --%>
|
|
<nav class="flex-1 p-2" aria-label="Admin navigation">
|
|
<ul class="admin-nav">
|
|
<li :if={!@site_live}>
|
|
<.link
|
|
navigate={~p"/admin/setup"}
|
|
class={admin_nav_active?(@current_path, "/admin/setup")}
|
|
>
|
|
<.icon name="hero-rocket-launch" class="size-5" /> Setup
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
navigate={~p"/admin"}
|
|
class={admin_nav_active?(@current_path, "/admin")}
|
|
>
|
|
<.icon name="hero-home" class="size-5" /> Dashboard
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
navigate={~p"/admin/orders"}
|
|
class={admin_nav_active?(@current_path, "/admin/orders")}
|
|
>
|
|
<.icon name="hero-shopping-bag" class="size-5" /> Orders
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
navigate={~p"/admin/products"}
|
|
class={admin_nav_active?(@current_path, "/admin/products")}
|
|
>
|
|
<.icon name="hero-cube" class="size-5" /> Products
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
navigate={~p"/admin/providers"}
|
|
class={admin_nav_active?(@current_path, "/admin/providers")}
|
|
>
|
|
<.icon name="hero-link" class="size-5" /> Providers
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
href={~p"/admin/theme"}
|
|
class={admin_nav_active?(@current_path, "/admin/theme")}
|
|
>
|
|
<.icon name="hero-paint-brush" class="size-5" /> Theme
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link
|
|
navigate={~p"/admin/settings"}
|
|
class={admin_nav_active?(@current_path, "/admin/settings")}
|
|
>
|
|
<.icon name="hero-cog-6-tooth" class="size-5" /> Settings
|
|
</.link>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<%!-- sidebar footer --%>
|
|
<div class="p-2 border-t border-base-300">
|
|
<ul class="admin-nav">
|
|
<li>
|
|
<.link href={~p"/"}>
|
|
<.icon name="hero-arrow-top-right-on-square" class="size-5" /> View shop
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link href={~p"/admin/dashboard"}>
|
|
<.icon name="hero-chart-bar" class="size-5" /> LiveDashboard
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link href={~p"/admin/errors"}>
|
|
<.icon name="hero-bug-ant" class="size-5" /> Errors
|
|
</.link>
|
|
</li>
|
|
<li>
|
|
<.link href={~p"/users/log-out"} method="delete">
|
|
<.icon name="hero-arrow-right-start-on-rectangle" class="size-5" /> Log out
|
|
</.link>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</aside>
|
|
</div>
|
|
</div>
|
|
|
|
<.flash_group flash={@flash} />
|