| 1 | <script lang="ts"> |
| 2 | import { enhance } from "$app/forms"; |
| 3 | |
| 4 | let { form } = $props(); |
| 5 | </script> |
| 6 | |
| 7 | <svelte:head> |
| 8 | <title>Login</title> |
| 9 | </svelte:head> |
| 10 | |
| 11 | <div class="min-h-screen flex items-center justify-center p-4"> |
| 12 | <div class="w-full max-w-sm"> |
| 13 | <h1 class="text-2xl font-bold mb-8 text-center">Admin Login</h1> |
| 14 | |
| 15 | <form method="POST" use:enhance class="space-y-4"> |
| 16 | <div> |
| 17 | <label for="password" class="block text-sm mb-2">Password</label> |
| 18 | <input |
| 19 | type="password" |
| 20 | id="password" |
| 21 | name="password" |
| 22 | required |
| 23 | class="w-full px-4 py-2 bg-zinc-900 border border-zinc-700 rounded focus:outline-none focus:border-zinc-500" |
| 24 | /> |
| 25 | </div> |
| 26 | |
| 27 | {#if form?.error} |
| 28 | <p class="text-red-500 text-sm">{form.error}</p> |
| 29 | {/if} |
| 30 | |
| 31 | <button |
| 32 | type="submit" |
| 33 | class="w-full py-2 bg-white text-black font-medium rounded hover:bg-zinc-200 transition-colors" |
| 34 | > |
| 35 | Sign In |
| 36 | </button> |
| 37 | </form> |
| 38 | |
| 39 | <p class="mt-6 text-center text-sm text-zinc-500"> |
| 40 | <a href="/" class="hover:text-white transition-colors">← Back to gallery</a> |
| 41 | </p> |
| 42 | </div> |
| 43 | </div> |