@extends('card.layout') @section('title', 'Preview — TAPLY') @php $coverGradients = [ 'Teal' => 'linear-gradient(160deg,#14b8a6,#0ea5e9)', 'Violet' => 'linear-gradient(160deg,#7c5cff,#4b2fb8)', 'Indigo' => 'linear-gradient(160deg,#5e6cff,#2a3aa1)', 'Sunset' => 'linear-gradient(160deg,#ff7a59,#c83a1f)', 'Emerald' => 'linear-gradient(160deg,#34d399,#0f766e)', 'Fuchsia' => 'linear-gradient(160deg,#f472b6,#9d174d)', 'Midnight' => 'linear-gradient(160deg,#222,#000)', ]; $coverName = $profile->cover_name->value; $profilePhotoUrl = $profile->profile_photo_path ? \Illuminate\Support\Facades\Storage::url($profile->profile_photo_path) : null; $companyLogoUrl = $profile->company_logo_path ? \Illuminate\Support\Facades\Storage::url($profile->company_logo_path) : null; $initials = collect(preg_split('/\s+/', trim($profile->full_name))) ->filter()->take(2)->map(fn ($w) => mb_strtoupper(mb_substr($w, 0, 1)))->implode(''); $companyInitials = mb_strtoupper(mb_substr($profile->company_display_name ?: 'CO', 0, 3)); $platformIcons = [ 'linkedin' => 'bi-linkedin', 'x' => 'bi-twitter-x', 'instagram' => 'bi-instagram', 'facebook' => 'bi-facebook', 'youtube' => 'bi-youtube', 'tiktok' => 'bi-tiktok', 'github' => 'bi-github', 'whatsapp' => 'bi-whatsapp', 'telegram' => 'bi-telegram', 'snapchat' => 'bi-snapchat', 'pinterest' => 'bi-pinterest', 'website' => 'bi-globe2', 'other' => 'bi-link-45deg', ]; $platformLabels = [ 'linkedin' => 'LinkedIn', 'x' => 'X / Twitter', 'instagram' => 'Instagram', 'facebook' => 'Facebook', 'youtube' => 'YouTube', 'tiktok' => 'TikTok', 'github' => 'GitHub', 'whatsapp' => 'WhatsApp', 'telegram' => 'Telegram', 'snapchat' => 'Snapchat', 'pinterest' => 'Pinterest', 'website' => 'Website', 'other' => 'Other', ]; $handleFromUrl = function (string $platform, string $url) { $u = parse_url($url); $path = trim($u['path'] ?? '', '/'); if ($platform === 'x' || $platform === 'twitter') return '@'.basename($path); if ($platform === 'linkedin') return basename($path); if ($platform === 'instagram') return '@'.basename($path); if ($platform === 'youtube' || $platform === 'tiktok') return basename($path); return $path !== '' ? $path : ($u['host'] ?? $url); }; @endphp @section('body') TAPLY™ Preview @if (session('status')) {{ session('status') }} @endif @if ($companyLogoUrl) @else {{ $companyInitials }} @endif Working at {{ $profile->company_display_name ?: '—' }} {{ $profile->is_published ? 'Live' : 'Draft' }} @if ($profilePhotoUrl) @else {{ $initials ?: 'ME' }} @endif {{ $profile->full_name }} {{ $profile->role_title }} SAVE CONTACT EDIT PROFILE @if ($phones->first()) Call @endif @if ($profile->whatsapp) WhatsApp @endif @if ($emails->first()) Email @endif @if ($profile->website) Web @endif Share @if ($profile->bio) “{{ $profile->bio }}” @endif @if ($phones->isNotEmpty() || $emails->isNotEmpty()) Contact @foreach ($phones as $phone) {{ $phone->label->value }} {{ $phone->number }} @endforeach @foreach ($emails as $email) {{ $email->label->value }} {{ $email->address }} @endforeach @endif @if ($profile->address) Where to find me Address {{ $profile->address }} @endif @if ($socials->isNotEmpty()) Find me online @foreach ($socials as $social) @php $p = $social->platform->value; @endphp {{ $platformLabels[$p] ?? ucfirst($p) }} {{ $handleFromUrl($p, $social->url) }} @endforeach @endif Share back Don't have TAPLY? Scan the QR with your contacts to send back, or get your own card. BACK TO EDIT PUBLISH @endsection @push('scripts') @endpush
“{{ $profile->bio }}”