@extends('frontend.magz.index') @inject('termHelper', 'App\Helpers\TermHelper') @inject('themeHelper', 'App\Helpers\ThemeHelper') @inject('postHelper', 'App\Helpers\PostHelper') @section('content')
@if($sidebarPosition === "left" AND $sidebarActive) @include('frontend.magz.template-parts.sidebar') @endif
@if($post->post_title)

{{ $post->post_title }}

{!! $post->post_summary !!}
@if($post->post_type == "page" OR $post->post_type == "post") @if(!empty($post->post_image) && App\Helpers\ImageHelper::isExists('images', $post->post_image) || App\Helpers\PostHelper::isImageUrlAvailable($post))
{{ $post->post_image }}
{!! $postHelper->getPostThumbnailCaption($post->post_image_meta) !!}
@else
@endif @else @php $postSource = json_decode($post->post_source); $postImageMeta = $postHelper->isImageUrlAvailable($post); if ($postImageMeta) { $poster = json_decode($post->post_image_meta)->image_url; } else { $poster = ($post->post_image) ? asset('storage/images/'.$post->post_image) : asset('img/cover-video.webp'); } @endphp @if($post->post_type == "video_embed" OR $post->post_type == "audio_embed") @if($post->post_type == "video_embed")
@elseif($post->post_type == "audio_embed")
{!! $post->post_source !!}
@endif @elseif($post->post_type == "audio_file" OR $post->post_type == "audio_url") @php $postSource = json_decode($post->post_source); $postImageMeta = $postHelper->isImageUrlAvailable($post); $poster = ''; if ($post->post_image ) { if ($postImageMeta) { $poster = json_decode($post->post_image_meta)->image_url; } else { $poster = asset('storage/images/'.$post->post_image); } } @endphp @if(!empty($poster)) @endif
@php $source = ($post->post_type == 'audio_file') ? asset('storage/audios/'.$post->post_source) : $post->post_source; @endphp
@elseif($post->post_type == "video_url") @php $poster = ($post->post_image) ? asset('storage/images/'.$post->post_image) : asset('img/cover-video.webp'); @endphp
@else
@php $width = ($post->post_type == "video_file") ? '100%' : '640'; $poster = ($post->post_image) ? asset('storage/images/'.$post->post_image) : asset('img/cover-video.webp'); @endphp
@endif @endif {!! $post->post_content !!}
{{ __('Laramagz::magz.author') }}
@if($post->user->photo) @if($post->user->photo) @if(\App\Helpers\ImageHelper::isExists('avatar', $post->user->photo)) {{ $post->user->name }} @else {{ __('Laramagz::magz.no_image') }} @endif @else {{ __('Laramagz::magz.no_image') }} @endif @else {{ __('Laramagz::magz.no_image') }} @endif
@if($post->user->occupation)
{{ $post->user->occupation }}
@endif
{{ $post->user->name }}

@if($post->user->about) {{ $post->user->about }} @endif

@if ($post->user->links) @endif
@include('frontend.magz.inc._comment-disqus') @include('frontend.magz.inc._comment') @endif
@if($sidebarPosition === "right" AND $sidebarActive) @include('frontend.magz.template-parts.sidebar') @endif
@endsection @push('styles') @endpush @push('scripts') @endpush