fix: constrain admin layout to container width matching rest of site
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,35 +14,39 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex min-h-screen bg-background">
|
<div class="min-h-screen bg-background">
|
||||||
<!-- Sidebar -->
|
<div class="container mx-auto px-4">
|
||||||
<aside class="w-56 shrink-0 border-r border-border/40 bg-card/60 backdrop-blur-sm flex flex-col">
|
<div class="flex min-h-screen">
|
||||||
<div class="px-4 py-5 border-b border-border/40">
|
<!-- Sidebar -->
|
||||||
<a href="/" class="text-xs text-muted-foreground hover:text-foreground transition-colors">
|
<aside class="w-56 shrink-0 border-r border-border/40 bg-card/60 backdrop-blur-sm flex flex-col">
|
||||||
← Back to site
|
<div class="px-4 py-5 border-b border-border/40">
|
||||||
</a>
|
<a href="/" class="text-xs text-muted-foreground hover:text-foreground transition-colors">
|
||||||
<h1 class="mt-2 text-base font-bold text-foreground">Admin</h1>
|
← Back to site
|
||||||
|
</a>
|
||||||
|
<h1 class="mt-2 text-base font-bold text-foreground">Admin</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav class="flex-1 p-3 space-y-1">
|
||||||
|
{#each navLinks as link (link.href)}
|
||||||
|
<a
|
||||||
|
href={link.href}
|
||||||
|
class={`flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors ${
|
||||||
|
isActive(link.href)
|
||||||
|
? "bg-primary/10 text-primary"
|
||||||
|
: "text-muted-foreground hover:text-foreground hover:bg-muted/50"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<span class={`${link.icon} h-4 w-4`}></span>
|
||||||
|
{link.name}
|
||||||
|
</a>
|
||||||
|
{/each}
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<main class="flex-1 overflow-auto">
|
||||||
|
{@render children()}
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<nav class="flex-1 p-3 space-y-1">
|
|
||||||
{#each navLinks as link (link.href)}
|
|
||||||
<a
|
|
||||||
href={link.href}
|
|
||||||
class={`flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors ${
|
|
||||||
isActive(link.href)
|
|
||||||
? "bg-primary/10 text-primary"
|
|
||||||
: "text-muted-foreground hover:text-foreground hover:bg-muted/50"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<span class={`${link.icon} h-4 w-4`}></span>
|
|
||||||
{link.name}
|
|
||||||
</a>
|
|
||||||
{/each}
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<!-- Main content -->
|
|
||||||
<main class="flex-1 overflow-auto">
|
|
||||||
{@render children()}
|
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user