|
| 1 | +@extends('filament-flexible-content-block-pages::tailwind.components.layouts.base') |
| 2 | + |
| 3 | +@section('content') |
| 4 | +<div class="container mx-auto px-6 py-8"> |
| 5 | + <div class="mb-8"> |
| 6 | + <h1 class="text-3xl font-bold mb-4"> |
| 7 | + {{ $tag->getTranslation('name', app()->getLocale()) }} |
| 8 | + </h1> |
| 9 | + |
| 10 | + @if($tag->seo_description) |
| 11 | + <p class="text-lg text-gray-600 mb-6"> |
| 12 | + {{ $tag->getTranslation('seo_description', app()->getLocale()) }} |
| 13 | + </p> |
| 14 | + @endif |
| 15 | + |
| 16 | + @if($contentCounts && count($contentCounts) > 0) |
| 17 | + <div class="flex flex-wrap gap-2 mb-6"> |
| 18 | + @foreach($contentCounts as $type => $count) |
| 19 | + <span class="px-3 py-1 bg-gray-100 rounded-full text-sm"> |
| 20 | + {{ $count }} {{ $type }} |
| 21 | + </span> |
| 22 | + @endforeach |
| 23 | + </div> |
| 24 | + @endif |
| 25 | + </div> |
| 26 | + |
| 27 | + @if($taggedContent->count() > 0) |
| 28 | + <div class="space-y-6"> |
| 29 | + @foreach($taggedContent as $item) |
| 30 | + <article class="border-b border-gray-200 pb-6 last:border-b-0"> |
| 31 | + <div class="flex justify-between items-start mb-2"> |
| 32 | + <span class="text-sm text-blue-600 font-medium uppercase"> |
| 33 | + {{ $modelLabels[$item::class] ?? class_basename($item) }} |
| 34 | + </span> |
| 35 | + @if(method_exists($item, 'publishing_begins_at') && $item->publishing_begins_at) |
| 36 | + <time class="text-sm text-gray-500"> |
| 37 | + {{ $item->publishing_begins_at->format('M j, Y') }} |
| 38 | + </time> |
| 39 | + @endif |
| 40 | + </div> |
| 41 | + |
| 42 | + <h2 class="text-xl font-semibold mb-2"> |
| 43 | + @if(method_exists($item, 'getUrl')) |
| 44 | + <a href="{{ $item->getUrl() }}" class="hover:text-blue-600"> |
| 45 | + {{ $item->title }} |
| 46 | + </a> |
| 47 | + @else |
| 48 | + {{ $item->title }} |
| 49 | + @endif |
| 50 | + </h2> |
| 51 | + |
| 52 | + @if(method_exists($item, 'intro') && $item->intro) |
| 53 | + <p class="text-gray-600 mb-3"> |
| 54 | + {{ Str::limit(strip_tags($item->intro), 200) }} |
| 55 | + </p> |
| 56 | + @endif |
| 57 | + |
| 58 | + @if(method_exists($item, 'tags') && $item->tags->count() > 0) |
| 59 | + <div class="flex flex-wrap gap-1"> |
| 60 | + @foreach($item->tags->take(5) as $itemTag) |
| 61 | + <span class="px-2 py-1 bg-gray-50 rounded text-xs text-gray-700"> |
| 62 | + {{ $itemTag->getTranslation('name', app()->getLocale()) }} |
| 63 | + </span> |
| 64 | + @endforeach |
| 65 | + </div> |
| 66 | + @endif |
| 67 | + </article> |
| 68 | + @endforeach |
| 69 | + </div> |
| 70 | + |
| 71 | + @if($taggedContent->hasPages()) |
| 72 | + <div class="mt-8"> |
| 73 | + {{ $taggedContent->links() }} |
| 74 | + </div> |
| 75 | + @endif |
| 76 | + @else |
| 77 | + <div class="text-center py-12"> |
| 78 | + <p class="text-gray-600 text-lg"> |
| 79 | + @lang('filament-flexible-content-block-pages::tag_pages.no_content', ['tag' => $tag->getTranslation('name', app()->getLocale())]) |
| 80 | + </p> |
| 81 | + </div> |
| 82 | + @endif |
| 83 | +</div> |
| 84 | +@endsection |
0 commit comments