@@ -13,31 +13,27 @@ definePageMeta({
13
13
middleware: ' guest'
14
14
})
15
15
16
-
17
-
18
16
async function postLoginForm() {
19
17
response = await loginWithEmail (usernameOrEmail .value , password .value )
20
18
errors .value = response .errors
21
19
}
22
20
</script >
23
21
24
22
<template >
25
- <div class =" h-screen bg-white dark:bg-black" >
26
- <div class =" flex items-center justify-center px-4 sm:px-6 lg:px-8" >
27
- <div class =" max-w-md w-full space-y-8" >
23
+ <div class =" dark:bg-black h-screen" >
24
+ <div class =" flex items-center justify-center px-4 sm:px-6 lg:px-8" >
25
+ <div class =" max-w-md w-full" >
26
+ <div class =" lg:flex mt-10" >
27
+ <img class =" mx-auto h-24 w-auto" src =" /img/logo_clear_fsj.png" alt =" full stack jack logo" />
28
+ <h1 class =" py-9 text-center text-5xl font-extrabold text-gray-900 dark:text-gray-400" >
29
+ Full Stack Jack
30
+ </h1 >
31
+ </div >
28
32
<div >
29
- <div class =" h-25 w-25" >
30
- </div >
31
- <div class =" lg:flex mt-10" >
32
- <img class =" mx-auto h-24 w-auto" src =" /img/logo_clear_fsj.png" alt =" full stack jack logo" />
33
- <br >
34
- <h1 class =" py-9 text-center text-5xl font-extrabold text-gray-900 dark:text-gray-400" >
35
- Full Stack Jack</h1 >
36
- </div >
37
-
38
- <h2 class =" mt-6 py-9 text-center text-3xl font-extrabold text-gray-900 dark:text-gray-400" >Sign in</h2 >
33
+ <h2 class =" text-center text-3xl font-extrabold mt-5 text-gray-900 dark:text-white" >
34
+ Sign In
35
+ </h2 >
39
36
</div >
40
-
41
37
<div v-if =" response?.hasErrors && errors"
42
38
class =" bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mt-3" role =" alert" >
43
39
<ul class =" block sm:inline" >
@@ -46,55 +42,37 @@ async function postLoginForm() {
46
42
</li >
47
43
</ul >
48
44
</div >
45
+ <form v-on:submit.prevent class =" mt-8 space-y-6" action =" #" method =" POST" >
49
46
50
- <form v-if =" true" v-on:submit.prevent class =" mt-8 space-y-6" action =" #" method =" POST" >
51
- <input type =" hidden" name =" remember" value =" true" >
52
47
<div class =" rounded-md shadow-sm -space-y-px mb-1" >
53
48
<div >
54
49
<label for =" email-address" class =" sr-only" >Username or Email</label >
55
- <input v-model =" usernameOrEmail" id =" email-address" name =" email" type =" email" autocomplete =" email"
56
- required
57
- class =" appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
58
- placeholder =" Username or Email" >
50
+ <input type =" email" v-model =" usernameOrEmail" id =" username" name =" username" required
51
+ class =" dark:bg-slate-500 dark:text-white dark:placeholder-white appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
52
+ :class =" errors?.has('username') ? ' border-red-500' : ''" placeholder =" username" />
59
53
</div >
60
54
</div >
61
55
<div >
62
56
<label for =" password" class =" sr-only" >Password</label >
63
- <input v-model =" password" id =" password" name =" password" required type =" password"
64
- autocomplete =" current-password"
65
- class =" appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
66
- placeholder =" Password" >
67
- </div >
68
-
69
- <div class =" flex items-center justify-between" >
70
- <div class =" flex items-center" >
71
- <input id =" remember-me" name =" remember-me" type =" checkbox"
72
- class =" h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded" >
73
- <label for =" remember-me" class =" ml-2 block text-sm text-gray-900 dark:text-white" > Remember me </label >
74
- </div >
75
-
76
- <div class =" text-sm" >
77
- <a href =" #" class =" font-medium text-indigo-600 hover:text-indigo-500 dark:text-white" > Forgot your
78
- password? </a >
79
- </div >
80
- </div >
81
-
82
- <div >
83
- <button @click.prevent =" postLoginForm"
84
- class =" group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" >
85
- <span class =" absolute left-0 inset-y-0 flex items-center pl-3" >
86
- <!-- Heroicon name: solid/lock-closed -->
87
- <svg class =" h-5 w-5 text-indigo-500 group-hover:text-indigo-400" xmlns =" http://www.w3.org/2000/svg"
88
- viewBox =" 0 0 20 20" fill =" currentColor" aria-hidden =" true" >
89
- <path fill-rule =" evenodd"
90
- d =" M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
91
- clip-rule =" evenodd" />
92
- </svg >
93
- </span >
94
- Sign in
95
- </button >
57
+ <input v-model =" password" id =" password" name =" password" type =" password" autocomplete =" current-password"
58
+ required
59
+ class =" dark:bg-slate-500 dark:text-white dark:placeholder-white appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
60
+ :class =" errors?.has('password') ? ' border-red-500' : ''" placeholder =" Password" />
96
61
</div >
97
62
</form >
63
+ <button @click.prevent =" postLoginForm"
64
+ class =" mt-5 group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" >
65
+ <span class =" absolute left-0 inset-y-0 flex items-center pl-3" >
66
+ <!-- Heroicon name: solid/lock-closed -->
67
+ <svg class =" h-5 w-5 text-indigo-500 group-hover:text-indigo-400" xmlns =" http://www.w3.org/2000/svg"
68
+ viewBox =" 0 0 20 20" fill =" currentColor" aria-hidden =" true" >
69
+ <path fill-rule =" evenodd"
70
+ d =" M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
71
+ clip-rule =" evenodd" />
72
+ </svg >
73
+ </span >
74
+ register
75
+ </button >
98
76
</div >
99
77
</div >
100
78
</div >
0 commit comments