|
1 | 1 | <script lang="ts"> |
2 | 2 | import * as Form from '$components/ui/form' |
3 | 3 | import { Input } from '$components/ui/input' |
4 | | - import * as Card from '$components/ui/card' |
| 4 | + import { Checkbox } from '$components/ui/checkbox' |
| 5 | + import { Label } from '$components/ui/label' |
5 | 6 | import { type LoginFormSchema, loginSchema } from './schema' |
6 | 7 | import { type Infer, type SuperValidated, superForm } from 'sveltekit-superforms' |
7 | 8 | import { zodClient } from 'sveltekit-superforms/adapters' |
|
26 | 27 | }) |
27 | 28 |
|
28 | 29 | const { form: formData, enhance } = form |
29 | | - $formData.email = 'test@test.com' |
30 | | - $formData.password = 'passwordAÖOGDÖADG' |
31 | 30 | </script> |
32 | 31 |
|
33 | | -<form method="POST" use:enhance> |
34 | | - <Card.Root class="m-auto w-[350px]"> |
35 | | - <Card.Header> |
36 | | - <Card.Title>Log In</Card.Title> |
37 | | - <Card.Description>Log In to tiny-tms and start doing you translations</Card.Description> |
38 | | - </Card.Header> |
39 | | - <Card.Content> |
| 32 | +<div class="flex items-center justify-center"> |
| 33 | + <div class="w-full max-w-2xl"> |
| 34 | + <div class="text-center"> |
| 35 | + <h2 class="mt-6 text-center text-3xl font-extrabold">Sign in to your account</h2> |
| 36 | + <p class="mt-2 text-center text-sm"> |
| 37 | + Or <a href="/signup" class="font-medium underline">sign up for a new account</a> |
| 38 | + </p> |
| 39 | + </div> |
| 40 | + <form method="POST" use:enhance> |
40 | 41 | <Form.Field {form} name="email"> |
41 | 42 | <Form.Control let:attrs> |
42 | | - <Form.Label>E-Mail</Form.Label> |
43 | | - <Input {...attrs} bind:value={$formData.email} /> |
| 43 | + <Form.Label>Email</Form.Label> |
| 44 | + <Input {...attrs} placeholder="m@example.com" bind:value={$formData.email} /> |
44 | 45 | </Form.Control> |
45 | | - <Form.Description>This is your e-mail.</Form.Description> |
46 | 46 | <Form.FieldErrors /> |
47 | 47 | </Form.Field> |
48 | 48 | <Form.Field {form} name="password"> |
49 | 49 | <Form.Control let:attrs> |
50 | 50 | <Form.Label>Password</Form.Label> |
51 | | - <Input {...attrs} type="password" bind:value={$formData.password} /> |
| 51 | + <Input |
| 52 | + {...attrs} |
| 53 | + type="password" |
| 54 | + placeholder="enter password" |
| 55 | + bind:value={$formData.password} |
| 56 | + /> |
52 | 57 | </Form.Control> |
53 | | - <Form.Description>This is your password</Form.Description> |
54 | 58 | <Form.FieldErrors /> |
55 | 59 | </Form.Field> |
56 | | - </Card.Content> |
57 | | - <Card.Footer class="flex justify-end"> |
58 | | - <Form.Button>Log In</Form.Button> |
59 | | - </Card.Footer> |
60 | | - </Card.Root> |
61 | | -</form> |
| 60 | + <div class="mb-5 mt-7 flex items-center justify-between"> |
| 61 | + <div class="flex items-center"> |
| 62 | + <Checkbox id="stay-logged-in" /> |
| 63 | + <Label for="stay-logged-in" class="ml-2 text-sm">Stay logged in</Label> |
| 64 | + </div> |
| 65 | + <div class="text-sm"> |
| 66 | + <a href="/forgot-password" class="font-medium underline">Forgot your password?</a> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + <Form.Button class="w-full">Log In</Form.Button> |
| 70 | + </form> |
| 71 | + <div class="mt-5 text-sm"> |
| 72 | + Check out our <a href="/code-of-conduct" class="font-medium underline">Code of Conduct</a> |
| 73 | + and |
| 74 | + <a href="privacy-policy" class="font-medium underline">Privacy Policy</a> |
| 75 | + page. |
| 76 | + </div> |
| 77 | + </div> |
| 78 | +</div> |
0 commit comments