@extends('layouts.app') @section('title', 'Direktori Profil Profesional') @push('head') {{-- Swiper CSS untuk carousel modern --}} @endpush @section('content') {{-- Pesan Flash (Sukses/Error) --}} {{-- Dipindahkan ke sini agar styling lebih mudah dan konsisten di dalam konten utama --}} @if(session('success'))
@endif @if(session('error'))
@endif {{-- Hero Section dengan Swiper Profesional Terpopuler --}}

🌟 Temukan Profesional Unggul Kami

Jelajahi direktori lengkap profil profesional, dari talenta baru hingga yang paling dicari.

{{-- Swiper Slider untuk Top Profiles --}} @if($topProfiles->count())

🔥 Profesional Terpopuler Minggu Ini

{{-- Swiper Pagination --}}
@endif
{{-- Decorative Waves --}}
{{-- Main Profile Directory Section --}}

Direktori Profil Profesional

{{-- Filter & Search Form --}}
{{-- Search Input --}}
{{-- Status Interest Select --}}
{{-- Sort By Select --}}
{{-- Submit Button --}}
{{-- Grid of Profiles --}}
@php // Pastikan $topProfiles sudah di-pluck sebelumnya di controller atau di tempat lain yang relevan // Misalnya: $popularIds = $topProfiles->pluck('id')->toArray(); // Jika belum ada, asumsikan ini sebagai array kosong untuk menghindari error $popularIds = isset($topProfiles) ? $topProfiles->pluck('id')->toArray() : []; @endphp @forelse($profiles as $profile) {{-- Pastikan hanya menampilkan profil yang 'is_visible' jika ada kolom ini --}} @if(isset($profile->is_visible) && !$profile->is_visible) @continue {{-- Lewati profil yang tidak terlihat --}} @endif
{{ $profile->user->name }}

{{ $profile->user->name }} {{-- Badge VERIFIED --}} @if($profile->is_verified) ✔️ VERIFIED @endif {{-- Badge NEW --}} @if(\Carbon\Carbon::parse($profile->created_at)->gt(now()->subDays(7))) 🆕 NEW @endif {{-- Badge POPULAR --}} @if(in_array($profile->id, $popularIds)) 🔥 POPULAR @endif

{{ $profile->headline }}

{{ Str::limit(strip_tags($profile->about), 100) }}

{{-- Status Interest Badge --}} {{-- Icon + Label --}} @if($profile->status_interest == 'open_job') 🔎 Open to Work @elseif($profile->status_interest == 'open_collab') 🤝 Open for Collaboration @else 🚫 Not Available @endif {{-- View Count --}} 👁️ {{ number_format($profile->view_count) }}
@empty

Tidak ada profil ditemukan berdasarkan filter yang diterapkan.

@endforelse
{{-- Pagination Links --}}
{{ $profiles->appends(request()->except('page'))->links() }}
@endsection @section('scripts') {{-- Swiper JS for modern carousel --}} @endsection