{{ $profile->full_name }}
@if ($profile->role_title)“{{ $profile->bio }}”
@endif @if ($phones->isNotEmpty() || $emails->isNotEmpty())@extends('card.layout')
@section('title', $profile->full_name.' — TAPLY')
@php
use Illuminate\Support\Facades\Storage;
$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 ? Storage::url($profile->profile_photo_path) : null;
$companyLogoUrl = $profile->company_logo_path ? 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);
};
$editHref = $isOwner ? route('card.edit') : route('card.login');
@endphp
@section('body')
“{{ $profile->bio }}”
@else
{{ $companyInitials }}
@endif
@else
{{ $initials ?: 'ME' }}
@endif
{{ $profile->full_name }}
@if ($profile->role_title)