@endauth
{{-- 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
{{-- Display Full Name --}}
{{ isset($card_title) ? $card_title : $firstname . ' ' . $lastname }}
@if ($user->user_type == 'Gold')
{{-- --}}
@elseif($user->user_type == 'Platinum')
@endif
@if ($username_enabled == true)
{{ '@' . $user->username }}
@endif
{{-- Display Bio --}}
@if ($user->bio && $short_bio_enabled == true)
{{ $user->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 ($event->event_type === 'Photo') --}}
@if ($event->event_poster && $event->poster_active)
@endif
@if ($videos && in_array($user->user_type, ['Basic', 'Gold', 'Sponsored', 'Influencer', 'Platinum']))
{{--
--}}
@php
if (!function_exists('vimeo_aspect_ratio')) {
function vimeo_aspect_ratio(string $videoId, ?string $videoHash = null): string
{
$cacheKey = 'vimeo_oembed_ar_' . $videoId . '_' . ($videoHash ?? 'nohash');
return cache()->remember($cacheKey, 86400, function () use (
$videoId,
$videoHash,
) {
try {
$playerUrl =
'https://player.vimeo.com/video/' .
$videoId .
($videoHash ? '?h=' . $videoHash : '');
$oembedUrl =
'https://vimeo.com/api/oembed.json?url=' . urlencode($playerUrl);
$resp = \Illuminate\Support\Facades\Http::timeout(5)
->retry(2, 100)
->get($oembedUrl);
if ($resp->ok()) {
$data = $resp->json();
if (!empty($data['width']) && !empty($data['height'])) {
return $data['height'] > $data['width'] ? '9/16' : '16/9';
}
}
} catch (\Throwable $e) {
// fallback
}
return '16/9';
});
}
}
@endphp
@foreach ($videos as $index => $video)
@php
$videoUrl = $video;
$videoId = null;
$videoHash = null;
$isVimeo = false;
$isInstagram = false;
$isTikTok = false;
$isShorts = false;
$instagramType = null;
$aspectRatio = '16/9';
$maxWidth = '800px';
// -----------------------------
// YOUTUBE
// -----------------------------
if (preg_match('#youtu\.be/([a-zA-Z0-9_-]+)#', $videoUrl, $m)) {
$videoId = $m[1];
} elseif (preg_match('#youtube\.com/watch\?v=([a-zA-Z0-9_-]+)#', $videoUrl, $m)) {
$videoId = $m[1];
} elseif (preg_match('#youtube\.com/shorts/([a-zA-Z0-9_-]{11})#', $videoUrl, $m)) {
$videoId = $m[1];
$isShorts = true;
} elseif (preg_match('#youtu\.be/([a-zA-Z0-9_-]{11})#', $videoUrl, $m)) {
$videoId = $m[1];
}
if ($isShorts) {
$aspectRatio = '9/16';
$maxWidth = '450px';
}
// -----------------------------
// VIMEO (all formats)
// -----------------------------
if (str_contains($videoUrl, 'vimeo.com')) {
$isVimeo = true;
if (preg_match('#vimeo\.com/(?:video/)?(\d+)#', $videoUrl, $m)) {
$videoId = $m[1];
}
if (preg_match('#vimeo\.com/\d+/([a-zA-Z0-9]+)#', $videoUrl, $m)) {
$videoHash = $m[1];
}
parse_str(parse_url($videoUrl, PHP_URL_QUERY) ?? '', $q);
if (!empty($q['h'])) {
$videoHash = $q['h'];
}
// Aspect ratio helper (your existing function)
if ($videoId) {
$aspectRatio = vimeo_aspect_ratio($videoId, $videoHash);
if ($aspectRatio === '9/16') {
$maxWidth = '450px';
}
}
}
// -----------------------------
// INSTAGRAM (reels, posts, IGTV)
// -----------------------------
if (str_contains($videoUrl, 'instagram.com')) {
if (preg_match('#instagram\.com/(reel|p|tv)/([^/?]+)#', $videoUrl, $m)) {
$instagramType = $m[1];
$videoId = $m[2];
$isInstagram = true;
$aspectRatio = '9/16';
$maxWidth = '450px';
}
}
// -----------------------------
// TIKTOK
// -----------------------------
if (str_contains($videoUrl, 'tiktok.com')) {
if (preg_match('#/video/(\d+)#', $videoUrl, $m)) {
$videoId = $m[1];
$isTikTok = true;
$aspectRatio = '9/16';
$maxWidth = '450px';
}
}
@endphp
@if ($isVimeo && $videoId)
@elseif ($isInstagram && $videoId)
@elseif ($isTikTok && $videoId)
@elseif ($videoId)
@endif
@endforeach
@endif
@if ($event->title_active)
{{ $event->title }}
@endif
@if ($event->start_datetime)
{{ \Carbon\Carbon::parse($event->start_datetime)->format('M j, Y') }}
@endif
@if ($event->description)
{!! Purifier::clean($event->description) !!}
@endif
{{--
{!! Purifier::clean($event->description) !!}
--}}
{{-- Small Button --}}
{{--
{{ $event->button_title }}
--}}
@if ($event->button_link)
@endif
{{-- @if ($event->optional_cta) --}}
@php
$validCtas = array_filter((array) $event->optional_cta, function ($cta) {
return !empty($cta['title']) || !empty($cta['link']);
});
@endphp
@if (count($validCtas) > 0)
@endif
{{-- Partner Link --}}
@if ($event->partner_link)
@endif
{{-- Shopping Cart --}}
@if ($event->shop_active)
@if ($event->shop_link)
@endif
@if (!$event->shop_link && $products->isNotEmpty())
@endif
@endif
@if ($contacts && $event->contact_active)
Contact me
@foreach ($contacts as $contact)
@if ($contact_settings[$contact->id] ?? false)
@switch($contact->type)
@case('sms')
@break
@case('phone')
@break
@case('email')
@break
@case('whatsapp')
@break
@case('telegram')
@break
@case('zoom')
@break
@case('wechat')
@break
@case('zalo')
@break
@case('amazon_shop')
@break
@endswitch
@endif
@endforeach
{{-- Partner Link --}}
@if ($event->partner_link)
@endif
{{-- Shopping Cart --}}
@if ($event->shop_active)
@if ($event->shop_link)
@endif
@if (!$event->shop_link && $products->isNotEmpty())
@endif
@endif
@endif
{{-- Direction Links --}}
@if (in_array($user['user_type'], ['Basic', 'Gold', 'Platinum', 'Influencer', 'Sponsored']))
@if ($directions)
Driving Directions
@foreach ($directions as $direction)
@if ($direction['type'] == 'google_map')
@elseif($direction['type'] == 'apple_map')
@elseif($direction['type'] == 'waze')
@endif
@endforeach
@endif
@endif
{{-- PAY WITH PAYPAL --}}
{{--
--}}
@if ($ad_banner_w && $ad_banner_h)
{{--
--}}
@endif
{{-- @if ($ads_bottom->count() > 1)
@endif --}}
@push('scripts')
@endpush
@endif