@if ($post != null && isset($post->slug))
@php $bottomText = ''; $isLink = false; $linkUrl = ''; $mediaOwner = isset($post->media_owner) && !empty($post->media_owner) ? $post->media_owner : ''; if (isset($post->author_id) && !empty($post->author_id)) { $bottomText = $post->author; $isLink = true; $linkUrl = url('user/' . $post->author_id); } elseif (isset($post->media_caption) && !empty($post->media_caption)) { $bottomText = $post->media_caption; } elseif (isset($post->content) && !empty($post->content)) { $bottomText = strip_tags($post->content); } @endphp
@if ($media != null && method_exists($media, '__invoke'))
{{ $media('hero', ['class' => 'w-full h-auto']) }}
@if (!empty($bottomText) || !empty($mediaOwner))
@if (!empty($bottomText))

@if ($isLink && isset($post->author_profile_photo_path) && $post->author_profile_photo_path) {{ $bottomText }} @endif @if ($isLink) {{ $bottomText }} @else {{ $bottomText }} @endif

@endif @if (!empty($mediaOwner))
{{ $mediaOwner }}
@endif
@endif @elseif (isset($post->excerpt) && !empty($post->excerpt))

{{ $post->excerpt }}

@endif
@endif