feat: enhance admin layout with navigation and return link; add name field for sign-up in login
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
|
||||
<div class="flex min-h-screen bg-slate-900">
|
||||
<!-- Sidebar -->
|
||||
<aside class="w-64 border-r border-white/5 bg-slate-950">
|
||||
<aside class="flex flex-col w-64 border-r border-white/5 bg-slate-950">
|
||||
<div class="p-6">
|
||||
<h2 class="text-lg font-black uppercase tracking-[0.15em] text-amber-50">Admin</h2>
|
||||
</div>
|
||||
<nav class="space-y-2 px-3">
|
||||
<nav class="flex-1 space-y-2 px-3">
|
||||
{#each navItems as item}
|
||||
<a
|
||||
href={item.href}
|
||||
@@ -42,6 +42,16 @@
|
||||
</a>
|
||||
{/each}
|
||||
</nav>
|
||||
<div class="border-t border-white/5 p-3">
|
||||
<a
|
||||
href="/"
|
||||
class="flex items-center gap-2 rounded-lg px-4 py-3 text-sm font-medium text-gray-300 transition-colors hover:bg-slate-800 hover:text-white"
|
||||
title="Return to site"
|
||||
>
|
||||
<span>←</span>
|
||||
<span>Retour au site</span>
|
||||
</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Main content -->
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
export let form: ActionData;
|
||||
|
||||
let isSignUp = false;
|
||||
let name = '';
|
||||
let email = '';
|
||||
let password = '';
|
||||
let confirmPassword = '';
|
||||
@@ -12,6 +13,7 @@
|
||||
|
||||
const handleToggle = () => {
|
||||
isSignUp = !isSignUp;
|
||||
name = '';
|
||||
email = '';
|
||||
password = '';
|
||||
confirmPassword = '';
|
||||
@@ -55,6 +57,24 @@
|
||||
}}
|
||||
class="space-y-6"
|
||||
>
|
||||
<!-- Name Field (Sign Up Only) -->
|
||||
{#if isSignUp}
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-semibold uppercase tracking-[0.2em] text-amber-100">
|
||||
Nom
|
||||
</label>
|
||||
<input
|
||||
id="name"
|
||||
type="text"
|
||||
name="name"
|
||||
bind:value={name}
|
||||
required
|
||||
placeholder="Votre nom"
|
||||
class="mt-3 w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white placeholder-slate-500 transition focus:border-amber-300 focus:outline-none focus:ring-2 focus:ring-amber-300/30"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Email Field -->
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-semibold uppercase tracking-[0.2em] text-amber-100">
|
||||
|
||||
Reference in New Issue
Block a user