@if ($ad_banner_w && $ad_banner_h)
@endif
@push('scripts')
@endpush
@endif
{{-- Top Navigation --}}
{{-- Display Profile Picture --}}
{{-- cover photo --}}
@if ($profile_layout == 'default_cover')
 : asset('/img/profile-placeholder.jpg') }})
@endif
{{-- Cover Only --}}
@if ($profile_layout == 'cover_only')
 : asset('/img/cover-placeholder.jpg') }})
@endif
{{-- circled profile pic --}}
@if ($profile_layout == 'default')
 : asset('/img/profile-placeholder.jpg') }})
@endif
{{-- rounded profile pic --}}
@if ($profile_layout == 'rounded')
 : asset('/img/profile-placeholder.jpg') }})
@endif
{{-- full width profile pic --}}
@if ($profile_layout == 'full_width')
 : asset('/img/profile-placeholder.jpg') }})
@endif
{{ isset($card_title) ? $card_title : $firstname . ' ' . $lastname }}
@if ($user->user_type == 'Gold')
{{-- --}}
@elseif($user->user_type == 'Platinum')
@endif
{{-- Display Bio --}}
@if ($bio && $short_bio_enabled == true)
{{ $bio }}
@endif
{{-- Display Job Title --}}
@if (!empty($user->job_title) && empty($user->company))
{{ $user->job_title }}
@endif
{{-- Display Job Title and company --}}
@if (!empty($user->job_title) && !empty($user->company))
{{ $user->job_title }}
@if (!empty($user->company_website))
at {{ $user->company }}
@else
at {{ $user->company }}
@endif
@endif
@if (($user->address || $user->country) && $display_country)
@endif
@if ($contacts || $user->user_type != 'Free')
{{ $contact_text }}
@endif
@if (in_array($user->user_type, ['Basic', 'Sponsored', 'Influencer', 'Gold', 'Platinum']) && $connect_icon == true)
@endif
@if (in_array($user->user_type, ['Free', 'Basic', 'Sponsored', 'Influencer', 'Gold', 'Platinum']) && $communities)
@endif
@if (in_array($user->user_type, ['Sponsored', 'Gold', 'Platinum']) && $directions)
@endif
{{-- Other contact points here --}}
@if ($contacts)
@foreach ($contacts as $contact)
@if ($contact['type'] === 'sms')
@elseif ($contact['type'] === 'phone')
@elseif ($contact['type'] === 'email')
@elseif ($contact['type'] === 'whatsapp')
@elseif ($contact['type'] === 'wechat')
@elseif ($contact['type'] === 'zalo')
@elseif ($contact['type'] === 'telegram')
@elseif ($contact['type'] === 'zoom')
{{-- --}}
@elseif ($contact['type'] === 'community')
@endif
@endforeach
@endif
@if ($socials)
{{ $follow_text }}
@foreach ($socials as $social)
{{-- @php
dd($social->id);
@endphp --}}
@endforeach
@endif
@if ($page && is_array($page->contents))
@foreach ($page->contents as $element)
{{-- Button --}}
@if ($element['type'] === 'button')
{{ $element['title'] }}
{{-- Heading --}}
@elseif ($element['type'] === 'heading')
{!! Purifier::clean($element['value']) !!}
{{-- HTML --}}
@elseif ($element['type'] === 'html')
{!! Purifier::clean($element['value']) !!}
{{-- Image --}}
@elseif ($element['type'] === 'image')
@if ($element['call_to_action'])
@endif
{{-- Video --}}
@elseif ($element['type'] === 'video')
@php
$videoUrl = $element['value'];
$videoId = null;
$videoHash = null;
$isVimeo = false;
$isInstagram = false;
$isTikTok = false;
$instagramType = null;
// -----------------------------
// YOUTUBE
// -----------------------------
if (preg_match('#youtu\.be/([a-zA-Z0-9_-]+)#', $videoUrl, $matches)) {
$videoId = $matches[1];
} elseif (preg_match('#youtube\.com/watch\?v=([a-zA-Z0-9_-]+)#', $videoUrl, $matches)) {
$videoId = $matches[1];
} elseif (preg_match('#youtube\.com/shorts/([a-zA-Z0-9_-]{11})#', $videoUrl, $matches)) {
$videoId = $matches[1];
}
// -----------------------------
// VIMEO (any format)
// -----------------------------
// if (str_contains($videoUrl, 'vimeo.com')) {
// $isVimeo = true;
// $clean = preg_replace(
// ['#https?://(www\.)?vimeo\.com/#', '#https?://player\.vimeo\.com/video/#'],
// '',
// $videoUrl,
// );
// $parts = explode('/', $clean);
// $videoId = $parts[0] ?? null;
// if (isset($parts[1]) && !str_contains($parts[1], '?')) {
// $videoHash = $parts[1];
// }
// if (str_contains($videoUrl, '?h=')) {
// parse_str(parse_url($videoUrl, PHP_URL_QUERY), $query);
// $videoHash = $query['h'] ?? $videoHash;
// }
// }
if (str_contains($videoUrl, 'vimeo.com')) {
$isVimeo = true;
// 1) Extract ID
if (preg_match('#vimeo\.com/(?:video/)?(\d+)#', $videoUrl, $m)) {
$videoId = $m[1];
}
// 2) Extract hash from path
if (preg_match('#vimeo\.com/\d+/([a-zA-Z0-9]+)#', $videoUrl, $m)) {
$videoHash = $m[1];
}
// 3) Extract hash from ?h= query
parse_str(parse_url($videoUrl, PHP_URL_QUERY) ?? '', $query);
if (isset($query['h'])) {
$videoHash = $query['h'];
}
}
// -----------------------------
// INSTAGRAM – reels, posts, IGTV
// -----------------------------
if (str_contains($videoUrl, 'instagram.com')) {
if (preg_match('#instagram\.com/(reel|reels|p|tv)/([^/?]+)/?#', $videoUrl, $matches)) {
// $instagramType = $matches[1];
$instagramType = $matches[1] === 'reels' ? 'reel' : $matches[1];
$videoId = $matches[2];
$isInstagram = true;
}
}
// -----------------------------
// TIKTOK
// -----------------------------
if (str_contains($videoUrl, 'tiktok.com')) {
if (preg_match('#/video/(\d+)#', $videoUrl, $matches)) {
$videoId = $matches[1];
$isTikTok = true;
}
}
// -----------------------------
// Aspect ratio control
// -----------------------------
$padding = '56.25%'; // default 16:9
if ($isInstagram) {
$padding = '130%'; // tall vertical layout
}
if ($isTikTok) {
$padding = '135%'; // taller vertical layout
}
@endphp
@if ($isVimeo)
@elseif ($isInstagram)
@elseif ($isTikTok)
@else
{{-- Default YouTube --}}
@endif
@endif
@endforeach
@endif
@if ($ads_bottom->count() > 0)
@if ($ad_banner_w && $ad_banner_h)
{{--
@push('scripts')
@endpush
@endif