@extends('layouts.app') @section('title', $profile->user->name ?? 'Profil Pengguna') @section('meta-og') {{-- Open Graph / SEO Meta Tags --}} {{-- Optional: Twitter card --}} @endsection @push('styles') @endpush @section('content')
{{-- Flash Messages (Success/Error) for endorsement or other actions --}} @if(session('success')) @endif @if(session('error')) @endif
{{-- Header Banner --}}
{{-- Add overlay or pattern here if desired --}}
{{-- Edit Profile button if user is the profile owner --}} @auth @if(Auth::id() === $profile->user_id) Edit Profil @endif @endauth
{{-- Main Profile Section --}}
Foto Profil {{ $profile->user->name ?? 'Pengguna' }}

{{ ($profile->user->name ?? 'Profil Pengguna') }} @if($profile->is_verified) Terverifikasi @endif

{{ $profile->headline }}

@php $statusClass = ''; $statusText = ''; $statusIcon = ''; switch($profile->status_interest) { case 'open_job': $statusClass = 'bg-green-100 text-green-800 dark:bg-green-700 dark:text-green-100'; $statusText = 'Siap Kerja'; $statusIcon = '💼'; break; case 'open_collab': $statusClass = 'bg-indigo-100 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-100'; $statusText = 'Siap Kolaborasi'; $statusIcon = '🤝'; break; default: // not_available $statusClass = 'bg-red-100 text-red-800 dark:bg-red-700 dark:text-red-100'; $statusText = 'Tidak Tersedia'; $statusIcon = '🚫'; break; } @endphp {{ $statusIcon }} {{ $statusText }}

{{ number_format($profile->view_count) }} views

{{-- Profile Content (2-Column Grid for Desktop) --}}
{{-- Left Column (Main Content) --}}
{{-- About Section --}} @if($profile->about)

📖 Tentang Saya

{!! $profile->about !!} {{-- Render actual HTML from TinyMCE --}}
@endif {{-- Skills Section --}} @if($profile->skills && count($profile->skills) > 0)

🛠️ Keterampilan

@foreach($profile->skills as $skill) {{ $skill }} @endforeach
@endif {{-- Experience Section --}} @if($profile->experience && count($profile->experience) > 0)

💼 Pengalaman

@foreach($profile->experience as $exp)

{{ $exp['title'] ?? 'N/A' }}

{{ $exp['year'] ?? 'N/A' }}

@endforeach
@endif {{-- Education Section --}} @if($profile->education && count($profile->education) > 0)

🎓 Pendidikan

@foreach($profile->education as $edu)

{{ $edu['degree'] ?? 'N/A' }}

{{ $edu['year'] ?? 'N/A' }}

@endforeach
@endif {{-- Portfolio Section --}} @if($profile->portfolio && count($profile->portfolio) > 0)

🌐 Portofolio

@endif
{{-- Right Column (Social, QR, Endorsements, Endorse Form) --}}
{{-- Lokasi Saya (NEW SECTION) --}} @if($profile->user->alamat || $profile->user->kota || $profile->user->provinsi || $profile->user->negara || ($profile->user->latitude && $profile->user->longitude))

📍 Lokasi Saya

{{-- Embedded Google Maps using iframe --}} @if($profile->user->alamat || ($profile->user->latitude && $profile->user->longitude)) {{-- Render map if address OR coordinates exist --}}
@else {{-- Fallback if no address or coordinates for map display --}}

Alamat atau koordinat lokasi belum tersedia untuk ditampilkan di peta.

@endif
@if($profile->user->alamat)

{{ $profile->user->alamat }}

@endif
@if($profile->user->kota)

{{ $profile->user->kota }}

@endif @if($profile->user->provinsi)

{{ $profile->user->provinsi }}

@endif @if($profile->user->negara)

{{ $profile->user->negara }}

@endif
{{-- Optional: Display coordinates if available --}} @if($profile->user->latitude && $profile->user->longitude)

Lat: {{ $profile->user->latitude }} / Long: {{ $profile->user->longitude }}

@endif
@endif {{-- END Lokasi Saya (NEW SECTION) --}} {{-- Social Links --}}

🔗 Tautan Sosial

{{-- LinkedIn --}} @if($profile->linkedin) LinkedIn LinkedIn @endif {{-- GitHub --}} @if($profile->github) GitHub GitHub @endif {{-- WhatsApp --}} @if($profile->whatsapp) WhatsApp WhatsApp @endif {{-- Website --}} @if($profile->website) Website @endif {{-- ORCID --}} @if($profile->orcid) ORCID ORCID @endif {{-- YouTube --}} @if($profile->youtube) YouTube YouTube @endif {{-- TikTok --}} @if($profile->tiktok) TikTok TikTok @endif {{-- Facebook --}} @if($profile->facebook) Facebook Facebook @endif {{-- Instagram --}} @if($profile->instagram) Instagram Instagram @endif
{{-- QR Code Section --}}

📲 Kode QR

{!! QrCode::size(180)->generate(url()->current()) !!}

Pindai untuk melihat profil ini.

{{-- Endorsement List Section --}} @if($endorsements->count())

🌟 Endorsement

@foreach($endorsements as $endorsement)
{{ $endorsement->user->name }}
@if($endorsement->skill)
Skill: {{ $endorsement->skill }}
@endif @if($endorsement->comment)

"{{ $endorsement->comment }}"

@endif {{-- Delete endorsement button (only for the logged-in user's own endorsements) --}} @if (auth()->check() && auth()->id() === $endorsement->user_id)
@csrf @method('DELETE')
@endif
@endforeach
@endif {{-- Endorse Form Section --}} @auth @if(Auth::id() !== $profile->user_id) {{-- Only show form if it's not the user's own profile --}}

✍️ Beri Endorsement

@csrf
@error('skill')

{{ $message }}

@enderror
@error('comment')

{{ $message }}

@enderror
@endif @endauth
{{-- JavaScript for Flash Message Dismissal --}} @endsection @section('schema') @endsection