fedi-feed-router/resources/views/pages/articles/index.blade.php

50 lines
2.5 KiB
PHP
Raw Normal View History

2025-06-29 18:33:18 +02:00
@extends('layouts.app')
2025-07-05 01:17:24 +02:00
@section('page-title', 'Articles')
2025-07-03 21:34:39 +02:00
2025-07-05 01:17:24 +02:00
@section('content')
<div class="bg-white rounded-lg shadow">
<div class="px-6 py-4 border-b border-gray-200">
<h2 class="text-lg font-medium text-gray-900">Article Feed</h2>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">URL</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Created At</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@foreach($articles as $article)
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ $article->id }}</td>
<td class="px-6 py-4 text-sm text-gray-900">
<a href="{{ $article->url }}" target="_blank" class="text-blue-600 hover:text-blue-900 hover:underline">
{{ Str::limit($article->url, 60) }}
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="inline-flex px-2 py-1 text-xs font-semibold rounded-full
{{ $article->articlePublication ? 'bg-green-100 text-green-800' : 'bg-yellow-100 text-yellow-800' }}">
{{ $article->articlePublication ? 'Published' : 'Pending' }}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ $article->created_at->format('Y-m-d H:i') }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@if($articles->hasPages())
<div class="px-6 py-4 border-t border-gray-200">
{{ $articles->links() }}
</div>
@endif
2025-07-03 21:34:39 +02:00
</div>
2025-06-29 18:33:18 +02:00
@endsection