{{-- Top Nav --}} {{-- Page Header --}} {{-- ═══════════════════════════════════════════ DOMAIN HERO CARD ════════════════════════════════════════════ --}}
{{-- Favicon --}}
@if($domain->favicon_url) {{ $domain->name }} @else
@endif
{{-- Name & URL --}}

{{ $domain->site_name ?? $domain->name }}

{{-- Blocked badge --}} @if($domain->is_blocked) {{ __('Blocked') }} @else {{ __('Active') }} @endif {{-- HTTP status badge --}} @if($domain->last_http_status) @php $statusColor = match(true) { $domain->last_http_status >= 200 && $domain->last_http_status < 300 => 'bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-400', $domain->last_http_status >= 300 && $domain->last_http_status < 400 => 'bg-yellow-100 text-yellow-700 dark:bg-yellow-500/15 dark:text-yellow-400', default => 'bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-400', }; @endphp HTTP {{ $domain->last_http_status }} @endif
@if($domain->homepage_url) {{ $domain->homepage_url }} @endif @if($domain->default_language) {{ strtoupper($domain->default_language) }} @endif
{{-- Trust Score --}}
@php $score = $domain->trust_score; @endphp
{{ $score }}
{{ __('Trust') }}
{{-- ═══════════════════════════════════════════ STATS ROW ════════════════════════════════════════════ --}}
@php $stats = [ [ 'label' => __('Total Pages'), 'value' => number_format($domain->pages_count), 'icon' => ' ', 'color' => 'text-blue-500 dark:text-blue-400', 'bg' => 'bg-blue-50 dark:bg-blue-500/10', ], [ 'label' => __('Crawl Priority'), 'value' => ucfirst($domain->crawl_priority), 'icon' => ' ', 'color' => 'text-purple-500 dark:text-purple-400', 'bg' => 'bg-purple-50 dark:bg-purple-500/10', ], [ 'label' => __('Crawl Delay'), 'value' => $domain->crawl_delay_seconds ? $domain->crawl_delay_seconds . 's' : __('Default'), 'icon' => ' ', 'color' => 'text-amber-500 dark:text-amber-400', 'bg' => 'bg-amber-50 dark:bg-amber-500/10', ], [ 'label' => __('Robots Status'), 'value' => $domain->robots_txt_status ? ucfirst($domain->robots_txt_status) : __('Unknown'), 'icon' => ' ', 'color' => 'text-emerald-500 dark:text-emerald-400', 'bg' => 'bg-emerald-50 dark:bg-emerald-500/10', ], ]; @endphp @foreach($stats as $stat)
{!! $stat['icon'] !!}
{{ $stat['value'] }}
{{ $stat['label'] }}
@endforeach
{{-- ═══════════════════════════════════════════ MAIN CONTENT GRID ════════════════════════════════════════════ --}}
{{-- LEFT COL: Domain details --}}
{{-- ── Crawl Information ── --}}

{{ __('Crawl Information') }}

@php $crawlRows = [ [__('Last Crawled'), $domain->last_crawled_at?->diffForHumans() ?? __('Never')], [__('Last HTTP Status'), $domain->last_http_status ?? '—'], [__('Robots URL'), $domain->robots_txt_url ?? '—'], [__('Robots Fetched'), $domain->robots_fetched_at?->diffForHumans() ?? '—'], [__('Robots Status Code'), $domain->robots_status_code ?? '—'], [__('Added'), $domain->created_at?->format('d M Y, H:i') ?? '—'], [__('Last Updated'), $domain->updated_at?->diffForHumans() ?? '—'], ]; @endphp @foreach($crawlRows as [$label, $value])
{{ $label }} {{ $value }}
@endforeach @if($domain->last_error)
{{ __('Last Error') }}
{{ $domain->last_error }}
@endif
{{-- ── Recent Pages ── --}}

{{ __('Crawled Pages') }}

{{ __('Showing latest') }} {{ $pages->count() }}
@if($pages->isEmpty())
{{ __('No pages crawled yet.') }}
@else
@foreach($pages as $page)
{{ $page->title ?? $page->url }}
{{ $page->url }} @if($page->language) {{ strtoupper($page->language) }} @endif @if($page->content_type) {{ $page->content_type }} @endif @if($page->crawled_at) {{ $page->crawled_at->diffForHumans() }} @endif
@if($page->description)

{{ $page->description }}

@endif
@endforeach
@endif
{{-- RIGHT COL: Relations --}}
{{-- ── Sitemaps ── --}}

{{ __('Sitemaps') }}

{{ $domain->sitemaps->count() }}
@if($domain->sitemaps->isEmpty())
{{ __('No sitemaps found.') }}
@else
@foreach($domain->sitemaps as $sitemap)
{{ $sitemap->url }}
{{ __('From') }}: {{ $sitemap->discovered_from }} @if($sitemap->last_status_code) {{ $sitemap->last_status_code }} @endif @if($sitemap->last_fetched_at) {{ $sitemap->last_fetched_at->diffForHumans() }} @endif
@endforeach
@endif
{{-- ── Feeds ── --}}

{{ __('Feeds') }}

{{ $domain->feeds->count() }}
@if($domain->feeds->isEmpty())
{{ __('No feeds discovered.') }}
@else
@foreach($domain->feeds as $feed)
@if($feed->type) {{ $feed->type }} @endif {{ $feed->url }}
@if($feed->last_status_code) {{ $feed->last_status_code }} @endif @if($feed->last_fetched_at) {{ $feed->last_fetched_at->diffForHumans() }} @endif @if($feed->next_fetch_at) · {{ __('Next') }}: {{ $feed->next_fetch_at->diffForHumans() }} @endif
@endforeach
@endif
{{-- ── Icons ── --}}

{{ __('Icons') }}

{{ $domain->icons->count() }}
@if($domain->icons->isEmpty())
{{ __('No icons discovered.') }}
@else
@foreach($domain->icons as $icon)
{{ $icon->rel ?? 'icon' }}
@if($icon->sizes) {{ $icon->sizes }} @endif @if($icon->is_primary) {{ __('Primary') }} @endif
@endforeach
@endif
{{-- ── Crawl Requests ── --}} @if(isset($crawlRequests) && $crawlRequests->count() > 0)

{{ __('Crawl Requests') }}

@foreach($crawlRequests as $cr)
@php $crColor = match($cr->status) { 'done','completed' => 'bg-emerald-100 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400', 'pending' => 'bg-yellow-100 text-yellow-700 dark:bg-yellow-500/10 dark:text-yellow-400', 'failed' => 'bg-red-100 text-red-700 dark:bg-red-500/10 dark:text-red-400', default => 'bg-gray-100 text-gray-600 dark:bg-white/5 dark:text-white/40', }; @endphp {{ $cr->requested_at?->diffForHumans() ?? $cr->created_at?->diffForHumans() ?? '—' }} {{ ucfirst($cr->status) }}
@endforeach
@endif