<?php
    Theme::layout('full');
    $totalComment = get_total_comment($post);
    MetaBox::getMetaData($post, 'time_to_read', true);
    $singleLayout = MetaBox::getMetaData($post, 'layout', true);
    if (empty($singleLayout)) {
        $singleLayout = theme_option('single_layout', 'default');
    }

    $videoLink = MetaBox::getMetaData($post, 'video_link', true);
    $videoEmbedCode = MetaBox::getMetaData($post, 'video_embed_code', true);
    $videoUploadId = MetaBox::getMetaData($post, 'video_upload_id', true);
    if ($videoLink || $videoUploadId) {
        $singleLayout = 'default';
    }

    if (is_plugin_active('pro-posts')) {
        Theme::asset()->container('footer')->usePath(false)->add('favorite-post', 'vendor/core/plugins/pro-posts/js/favorite-posts.js');
        Theme::asset()->container('footer')->usePath()->add('post-js', 'js/post.js');
    }
?>

<!--main content-->
<div class="main_content sidebar_right pb-50 <?php if($singleLayout == 'default' || empty($singleLayout)): ?> pt-50 <?php endif; ?>">
    <div data-post-id="<?php echo e($post->id); ?>"></div>
    <?php switch($singleLayout):
        case ('top-full'): ?>
            <?php echo Theme::partial('components.single.headers.top-full', compact('post', 'totalComment')); ?>

            <?php break; ?>;

        <?php case ('inline'): ?>
            <?php echo Theme::partial('components.single.headers.inline', compact('post', 'totalComment')); ?>

            <?php break; ?>;
    <?php endswitch; ?>

    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-12 col-sm-12">
                <?php if($singleLayout == 'default' || empty($singleLayout)): ?>
                    <?php echo Theme::partial('components.single.headers.default', compact('post', 'totalComment', 'videoLink', 'videoEmbedCode', 'videoUploadId')); ?>

                <?php endif; ?>

                <div class="single-excerpt">
                    <p class="font-large"><?php echo clean($post->description); ?></p>
                </div>
                <div class="entry-main-content wow fadeIn animated">
                    <?php if(defined('GALLERY_MODULE_SCREEN_NAME') && !empty($galleries = gallery_meta_data($post))): ?>
                        <?php echo render_object_gallery($galleries, ($post->categories()->first() ?
                        $post->categories()->first()->name
                        : __('Uncategorized'))); ?>

                    <?php endif; ?>
                    <div class="ck-content"><?php echo BaseHelper::clean($post->content); ?></div>
                </div>

                <?php if(is_plugin_active('external-source') && !empty($post->source_link)): ?>
                    <div class="entry-bottom mt-50 mb-30">
                        <p><?php echo e(__('Source link')); ?>:
                            <a href="<?php echo e($post->source_link); ?>" class="blue" target="_blank"><?php echo e($post->source_link); ?></a>
                        </p>
                    </div>
                <?php endif; ?>

                <div class="entry-bottom mt-50 mb-30">
                    <?php if(!$post->tags->isEmpty()): ?>
                        <div class="tags">
                            <?php $__currentLoopData = $post->tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <a href="<?php echo e($tag->url); ?>" rel="tag" class="tag-cloud-link"><?php echo e($tag->name); ?></a>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php endif; ?>
                </div>

                <div class="single-social-share clearfix wow fadeIn animated">
                    <ul class="d-inline-block list-inline float-right">
                        <?php echo Theme::partial('components.social-share-post', compact('post')); ?>

                    </ul>
                </div>

                <div class="bt-1 border-color-1 mt-30 mb-30"></div>
                <?php if(theme_option('enable_show_post_author_detail', 'yes') == 'yes' && $post->author && $post->author->id): ?>
                    <div class="author-bio mt-50 border-radius-10 bg-white wow fadeIn animated">
                        <div class="author-image mb-md-30">
                            <a href="<?php echo e($post->author->url); ?>">
                                <img class="avatar"
                                     src="<?php echo e(RvMedia::getImageUrl($post->author->avatar->url, 'thumb', false, RvMedia::getDefaultImage())); ?>"
                                     loading="lazy"
                                     alt="<?php echo e($post->author->name); ?>">
                            </a>
                        </div>
                        <div class="author-info">
                            <a href="<?php echo e($post->author->url); ?>">
                                <h4 class="font-weight-bold mb-20">
                                    <span class="vcard author">
                                        <span class="fn"><?php echo e($post->author->name); ?></span>
                                    </span>
                                </h4>
                            </a>
                            <p><?php echo clean($post->author->description); ?></p>
                        </div>
                    </div>
                <?php endif; ?>

                <?php switch(theme_option('comment_type_in_post', '')):
                    case ('facebook'): ?>
                        <?php echo apply_filters(BASE_FILTER_PUBLIC_COMMENT_AREA, Theme::partial('comments')); ?>

                        <?php break; ?>

                    <?php case ('member'): ?>
                        <?php if(is_plugin_active('comment') && comment_object_enable($post)): ?>
                            [comment type="<?php echo e(addslashes(get_class($post))); ?>" type_id="<?php echo e($post->id); ?>"][/comment]
                        <?php endif; ?>
                        <?php break; ?>
                <?php endswitch; ?>

                <?php $relatedPosts = get_related_posts($post->id, 3); ?>

                <?php if($relatedPosts->count() > 0): ?>
                    <?php echo Theme::partial('components.single.related-posts', ['relatedPosts' => $relatedPosts ]); ?>

                <?php endif; ?>

            </div>

            <div class="col-lg-4 col-md-12 col-sm-12 primary-sidebar sticky-sidebar">
                <div class="widget-area pl-30">
                    <?php echo dynamic_sidebar('primary_sidebar'); ?>

                </div>
            </div>
        </div>

        <?php if(theme_option('recently_viewed_posts_enable', 'yes') == 'yes'): ?>
            <div class="row recently-viewed-posts">
                <div class="col-md-12">
                    [recently-viewed-posts title="<?php echo e(__('Recently Viewed Posts')); ?>"
                    subtitle="<?php echo e(__('Your currently viewed posts.')); ?>"][/recently-viewed-posts]
                </div>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php /**PATH C:\Users\Admin\Documents\UltraNews v4.0.0 Nulled\UltraNews v4.0.0 Nulled\ultra-news\platform\themes/ultra/views/post.blade.php ENDPATH**/ ?>