post table responsive

This commit is contained in:
2024-05-02 11:47:23 +10:00
parent 822838fe29
commit 4ac1322b8c

View File

@@ -17,18 +17,21 @@
<x-ui.table> <x-ui.table>
<x-slot:header> <x-slot:header>
<th>Title</th> <th>Title</th>
<th>Created</th> <th class="hidden md:table-cell">Created</th>
<th>Status</th> <th class="hidden md:table-cell">Status</th>
<th>Author</th> <th class="hidden lg:table-cell">Author</th>
<th>Action</th> <th>Action</th>
</x-slot:header> </x-slot:header>
<x-slot:body> <x-slot:body>
@foreach ($posts as $post) @foreach ($posts as $post)
<tr> <tr>
<td>{{ $post->title }}</td> <td>
<td>{{ $post->created_at }}</td> <div class="whitespace-normal">{{ $post->title }}</div>
<td>{{ ucwords($post->status) }}</td> <div class="md:hidden text-xs text-gray-500 whitespace-normal">{{ ucwords($post->status) }} - {{ \Carbon\Carbon::parse($post->created_at)->format('M j Y, g:i a') }}</div>
<td>{{ $post->author->getName() }}</td> </td>
<td class="hidden md:table-cell">{{ \Carbon\Carbon::parse($post->created_at)->format('M j Y, g:i a') }}</td>
<td class="hidden md:table-cell">{{ ucwords($post->status) }}</td>
<td class="hidden lg:table-cell">{{ $post->author->getName() }}</td>
<td> <td>
<div class="flex justify-center gap-3"> <div class="flex justify-center gap-3">
<a href="{{ route('admin.post.edit', $post) }}" class="hover:text-primary-color"><i class="fa-solid fa-pen-to-square"></i></a> <a href="{{ route('admin.post.edit', $post) }}" class="hover:text-primary-color"><i class="fa-solid fa-pen-to-square"></i></a>