File tree 2 files changed +20
-17
lines changed
2 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 7
7
<meta http-equiv =" X-UA-Compatible" content =" ie=edge" >
8
8
<title >Laravel 10 Task List App</title >
9
9
<script src =" https://cdn.tailwindcss.com" ></script >
10
+ <style type =" text/tailwindcss" >
11
+ .btn {
12
+ @apply rounded-md px- 2 py- 1 text-center font-medium shadow-sm ring- 1 ring-slate- 700/10 hover :bg-slate-50 text-slate-700
13
+ }
14
+ </style >
10
15
@yield (' styles' )
11
16
</head >
12
17
Original file line number Diff line number Diff line change 8
8
class =" font-medium text-gray-700 underline decoration-pink-500" >← Go back to the task list!</a >
9
9
</div >
10
10
11
- <p >{{ $task -> description } } </p >
11
+ <p class = " mb-4 text-slate-700 " >{{ $task -> description } } </p >
12
12
@if ($task -> long_description )
13
- <p >{{ $task -> long_description } } </p >
13
+ <p class = " mb-4 text-slate-700 " >{{ $task -> long_description } } </p >
14
14
@endif
15
15
16
- <p >{{ $task -> created_at } } </p >
17
- <p >{{ $task -> updated_at } } </p >
16
+ <p class =" mb-4 text-sm text-slate-500" >Created {{ $task -> created_at -> diffForHumans () } } · Updated {{ $task -> updated_at -> diffForHumans () } } </p >
18
17
19
- <p >
18
+ <p class = " mb-4 " >
20
19
@if ($task -> completed )
21
- Completed
20
+ <span class =" font-medium text-green-500" >
21
+ Completed
22
+ </span >
22
23
@else
23
- Not completed
24
+ <span class =" font-medium text-red-500" >
25
+ Not completed
26
+ </span >
24
27
@endif
25
28
</p >
26
29
27
- <div >
28
- <a href =" {{ route (' tasks.edit' , [' task' => $task ]) } }" >Edit</a >
29
- </div >
30
-
31
- <div >
30
+ <div class =" flex gap-2" >
31
+ <a href =" {{ route (' tasks.edit' , [' task' => $task ]) } }"
32
+ class =" btn" >Edit</a >
32
33
<form method =" POST" action =" {{ route (' tasks.toggle-complete' , [' task' => $task ]) } }" >
33
34
@csrf
34
35
@method (' PUT' )
35
- <button type =" submit" >
36
+ <button type =" submit" class = " btn " >
36
37
Mark as {{ $task -> completed ? ' not completed' : ' completed ' } }
37
38
</button >
38
39
</form >
39
- </div >
40
-
41
- <div >
42
40
<form action =" {{ route (' tasks.destroy' , [' task' => $task ]) } }" method =" post" >
43
41
@csrf
44
42
@method (' DELETE ' )
45
- <button type =" submit" >Delete</button >
43
+ <button type =" submit" class = " btn " >Delete</button >
46
44
</form >
47
45
</div >
48
46
@endsection
You can’t perform that action at this time.
0 commit comments