{{-- ExploreLayout — hero header + mode tabs + filters + paginated grid. Used by /explore/*, /tag/:slug, and gallery pages. Expected variables: $hero_title, $hero_description, $breadcrumbs (collection), $current_sort, $sort_options, $artworks, $contentTypes (collection, optional), $activeType (string, optional) $page_title, $page_meta_description, $page_canonical, $page_robots --}} @extends('layouts.nova') @php use App\Banner; $seoPage = max(1, (int) request()->query('page', 1)); $seoBase = url()->current(); $seoQ = request()->query(); unset($seoQ['page']); $seoUrl = fn(int $p) => $seoBase . ($p > 1 ? '?' . http_build_query(array_merge($seoQ, ['page' => $p])) : (count($seoQ) ? '?' . http_build_query($seoQ) : '')); $seoPrev = $seoPage > 1 ? $seoUrl($seoPage - 1) : null; $seoNext = (isset($artworks) && method_exists($artworks, 'nextPageUrl')) ? $artworks->nextPageUrl() : null; @endphp @push('head') @if($seoPrev)@endif @if($seoNext)@endif {{-- Breadcrumb structured data --}} @if(isset($breadcrumbs) && $breadcrumbs->isNotEmpty()) @endif @endpush @section('content')
@php Banner::ShowResponsiveAd(); @endphp
{{-- ══ HERO HEADER ══ --}}
{{-- Breadcrumbs --}} @include('components.breadcrumbs', ['breadcrumbs' => $breadcrumbs ?? collect()]) {{-- Title panel --}}

{{ $hero_title ?? 'Explore' }}

@if(!empty($hero_description))

{!! $hero_description !!}

@endif @if(is_object($artworks) && method_exists($artworks, 'total') && $artworks->total() > 0)
{{ number_format($artworks->total()) }} artworks
@endif
{{-- Content type chips (Explore only) --}} @if(isset($contentTypes) && $contentTypes->isNotEmpty())
@foreach($contentTypes as $ct) {{ $ct->name }} @endforeach
@endif
{{-- ══ RANKING TABS ══ --}} @php $rankingTabs = $sort_options ?? [ ['value' => 'trending', 'label' => '🔥 Trending'], ['value' => 'new-hot', 'label' => '🚀 New & Hot'], ['value' => 'best', 'label' => '⭐ Best'], ['value' => 'latest', 'label' => '🕐 Latest'], ]; $activeTab = $current_sort ?? 'trending'; @endphp {{-- ══ ARTWORK GRID ══ --}} @yield('explore-grid') {{-- ══ PAGINATION ══ --}} @if(is_object($artworks) && method_exists($artworks, 'links'))
{{ $artworks->withQueryString()->links() }}
@endif
@endsection