@endsection
@section('script')
function initMap()
{
var address = "{{ $eventData->event_address }}";
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ address: address }, function (results, status)
{
if (status === google.maps.GeocoderStatus.OK) {
var initialLocation = results[0].geometry.location;
var map = new google.maps.Map(document.getElementById('map'),
{
center: initialLocation,
zoom: 17,
mapId: "53beff4b503b503a",
});
var marker = new google.maps.marker.AdvancedMarkerElement({
map: map,
position: initialLocation,
title: 'Event Location'
});
}
else
{
console.error('Geocode was not successful for the following reason: ' + status);
}
});
}
@endsection
@foreach($socialLinks as $socialLink)-
@php
$sLink = route('categoryPage', ['slug' => $eventData->event_slug]);
if($socialLink->platform == 'facebook')
$sLink = "https://www.facebook.com/sharer/sharer.php?u=".route('categoryPage', ['slug' => $eventData->event_slug]);
elseif ($socialLink->platform == 'whatsapp') {
$sLink = "https://api.whatsapp.com/send?text=" . rawurlencode("Check out this link: " . route('categoryPage', ['slug' => $eventData->event_slug]));
}
elseif ($socialLink->platform == 'pinterest') {
$sLink = "https://www.pinterest.com/pin/create/button/?url=" . route('categoryPage', ['slug' => $eventData->event_slug]);
if ($eventData->eventHeaderImg && $eventData->eventHeaderImg->filename) {
$mediaUrl = asset('storage/' . $eventData->eventHeaderImg->filename);
if ($eventData->event_metadesc !== null && trim($eventData->event_metadesc) !== "") {
$sLink .= "&media=" . $mediaUrl . "&description=" . $eventData->event_metadesc;
} else {
$sLink .= "&media=" . $mediaUrl . "&description=" . $eventData->event_name;
}
}
}elseif ($socialLink->platform == 'x-twitter'){
$sLink = "https://twitter.com/intent/tweet?url=".route('categoryPage', ['slug' => $eventData->event_slug]);
if ($eventData->event_metadesc !== null && trim($eventData->event_metadesc) !== "") {
$sLink .= "&text=" . $eventData->event_metadesc;
} else {
$sLink .= "&text=" . $eventData->event_name;
}
}
@endphp
platform == 'link')? "copyToClipboard(event,'$sLink')":"" }}>
@if($socialLink->platform == 'x-twitter')
@elseif($socialLink->platform == 'facebook')
@elseif($socialLink->platform == 'whatsapp')
@elseif($socialLink->platform == 'pinterest')
@elseif($socialLink->platform == 'link')
{{-- @elseif($socialLink->platform == 'like')
@auth('frontend')
@endauth
@elseif($socialLink->platform == 'bookmark')
@auth('frontend')
@endauth --}}
@endif
@endforeach