<?php
    $layout = $post->getMetaData('layout', true);
    $layout = ($layout && in_array($layout, array_keys(get_blog_single_layouts()))) ? $layout : 'blog-full-width';
    Theme::layout($layout);
    Theme::set('title', $post->name);
?>

<div class="container single-content">
    <div class="entry-header entry-header-style-1 mb-50 pt-50">
        <h1 class="entry-title mb-50 font-weight-900">
            <?php echo e($post->name); ?>

        </h1>
        <div class="row">
            <div class="col-md-6">
                <div class="entry-meta align-items-center meta-2 font-small color-muted">
                    <?php if($post->author && $post->author->id): ?>
                        <p class="mb-5">
                            <span class="author-avatar"><img class="img-circle" src="<?php echo e($post->author->avatar_url); ?>" alt="<?php echo e($post->author->name); ?>" loading="lazy"></span>
                                <?php echo e(__('By')); ?> <span class="author-name font-weight-bold"><?php echo e($post->author->name); ?></span>
                        </p>
                    <?php endif; ?>
                    <span class="mr-10"> <?php echo e(Theme::formatDate($post->created_at)); ?></span>
                    <?php if($post->time_reading): ?>
                        <span class="has-dot mr-2"> <?php echo e(__(':number mins read', ['number' => $post->time_reading])); ?></span>
                    <?php endif; ?>
                    <span class="hit-count has-dot"><?php echo e(number_format($post->views)); ?> <?php echo e(__('views')); ?></span>
                </div>
            </div>
            <?php if($sharingButtons = \Botble\Theme\Supports\ThemeSupport::getSocialSharingButtons($post->url, $post->description, $post->image)): ?>
                <div class="col-md-6 text-right d-none d-md-inline">
                    <ul class="header-social-network d-inline-block list-inline mr-15">
                        <li class="list-inline-item text-muted"><span><?php echo e(__('Share this')); ?>: </span></li>
                        <?php $__currentLoopData = $sharingButtons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $button): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li class="list-inline-item">
                                <a
                                    href="<?php echo e($button['url']); ?>"
                                    target="_blank"
                                    title="<?php echo e(__('Share on :social', ['social' => $button['name']])); ?>"
                                    style="<?php echo \Illuminate\Support\Arr::toCssStyles(["background-color: {$button['background_color']}" => $button['background_color'], "color: {$button['color']}" => $button['color']]) ?>"
                                >
                                    <?php echo $button['icon']; ?>

                                </a>
                            </li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            <?php endif; ?>
        </div>
    </div>
    <?php if($post->image): ?>
        <figure class="image mb-30 m-auto text-center border-radius-10">
            <img class="border-radius-10" src="<?php echo e(RvMedia::getImageUrl($post->image)); ?>" alt="<?php echo e($post->name); ?>" loading="lazy">
        </figure>
    <?php endif; ?>
    <article class="entry-wraper mb-50">
        <div class="entry-main-content">
            <?php if(defined('GALLERY_MODULE_SCREEN_NAME') && !empty($galleries = gallery_meta_data($post))): ?>
                <?php echo render_object_gallery($galleries, ($post->first_category ? $post->first_category->name : __('Uncategorized'))); ?>

            <?php endif; ?>
            <div class="ck-content"><?php echo BaseHelper::clean($post->content); ?></div>
        </div>
        <?php if($post->tags->isNotEmpty()): ?>
            <div class="entry-bottom mt-50 mb-30 wow fadeIn  animated" style="visibility: visible; animation-name: fadeIn;">
                <div class="tags">
                    <span><?php echo e(__('Tags')); ?>: </span>
                    <?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"><?php echo e($tag->name); ?></a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        <?php endif; ?>
        <div class="single-social-share clearfix wow fadeIn  animated" style="visibility: visible; animation-name: fadeIn;">
            <ul class="header-social-network d-inline-block list-inline float-md-right mt-md-0 mt-4">
                <li class="list-inline-item text-muted"><span><?php echo e(__('Share this')); ?>: </span></li>
                <?php $__currentLoopData = \Botble\Theme\Supports\ThemeSupport::getSocialSharingButtons($post->url, $post->description, $post->image); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $button): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li class="list-inline-item">
                        <a
                            href="<?php echo e($button['url']); ?>"
                            target="_blank"
                            title="<?php echo e(__('Share on :social', ['social' => $button['name']])); ?>"
                            style="<?php echo \Illuminate\Support\Arr::toCssStyles(["background-color: {$button['background_color']}" => $button['background_color'], "color: {$button['color']}" => $button['color']]) ?>"
                        >
                            <?php echo $button['icon']; ?>

                        </a>
                    </li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
        <?php if($post->author && $post->author->id): ?>
            <div class="author-bio p-30 mt-50 border-radius-10 bg-white wow fadeIn  animated" style="visibility: visible; animation-name: fadeIn;">
                <?php
                    $bio = $post->author->getMetaData('bio', true);
                ?>
                <div class="author-image <?php if($bio): ?> mb-30 <?php endif; ?>">
                    <img class="avatar" src="<?php echo e($post->author->avatar_url); ?>" alt="<?php echo e($post->author->name); ?>" loading="lazy">
                </div>
                <div class="author-info <?php if(! $bio): ?> d-flex align-items-center <?php endif; ?>">
                    <h4 class="font-weight-bold <?php if($bio): ?> mb-20 <?php else: ?> mb-0 <?php endif; ?>">
                        <span class="vcard author"><span class="fn"><?php echo e($post->author->name); ?></span></span>
                    </h4>
                    <?php if($bio): ?>
                        <p><?php echo BaseHelper::clean($bio); ?></p>
                    <?php endif; ?>
                </div>
            </div>
        <?php endif; ?>

        <?php echo apply_filters(BASE_FILTER_PUBLIC_COMMENT_AREA, null, $post); ?>


        <?php $relatedPosts = get_related_posts($post->id, 4); ?>
        <?php if($relatedPosts->isNotEmpty()): ?>
            <div class="related-posts">
                <div class="post-module-3">
                    <div class="widget-header-2 position-relative mb-30">
                        <h5 class="mt-5 mb-30"><?php echo e(__('Related posts')); ?></h5>
                    </div>
                    <div class="loop-list loop-list-style-1">
                        <?php $__currentLoopData = $relatedPosts->take(2); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $relatedItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <article class="hover-up-2 transition-normal wow fadeInUp   animated" style="visibility: visible; animation-name: fadeInUp;">
                                <div class="row mb-40 list-style-2">
                                    <div class="col-md-4">
                                        <div class="post-thumb position-relative border-radius-5">
                                            <div class="img-hover-slide border-radius-5 position-relative" style="background-image: url(<?php echo e(RvMedia::getImageUrl($relatedItem->image)); ?>)">
                                                <a class="img-link" href="<?php echo e($relatedItem->url); ?>" title="<?php echo e($relatedItem->name); ?>"></a>
                                            </div>
                                            <?php echo Theme::partial('social-share-buttons', compact('post')); ?>

                                        </div>
                                    </div>
                                    <div class="col-md-8 align-self-center">
                                        <div class="post-content">
                                            <div class="entry-meta meta-0 font-small mb-10">
                                                <?php $__currentLoopData = $relatedItem->categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <a href="<?php echo e($category->url); ?>"><span class="post-cat <?php echo e(random_color()); ?>"><?php echo e($category->name); ?></span></a>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                            <h4 class="h5 post-title font-weight-900 mb-20">
                                                <a href="<?php echo e($relatedItem->url); ?>"><?php echo e($relatedItem->name); ?></a>
                                                <span class="post-format-icon ml-1"><i class="elegant-icon icon_star_alt"></i></span>
                                            </h4>
                                            <div class="entry-meta meta-1 float-left font-x-small text-uppercase">
                                                <span class="post-on"><?php echo e(Theme::formatDate($relatedItem->created_at)); ?></span>
                                                <span class="time-reading has-dot"><?php echo e(__(':number mins read', ['number' => $relatedItem->time_reading])); ?></span>
                                                <span class="post-by has-dot"><?php echo e(number_format($relatedItem->views)); ?> <?php echo e(__('views')); ?></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </article>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
        <?php endif; ?>
        <?php if($relatedPosts->count() > 2): ?>
            <div class="single-more-articles border-radius-5">
                <div class="widget-header-2 position-relative mb-30">
                    <h5 class="mt-5 mb-30"><?php echo e(__('You might be interested in')); ?></h5>
                    <button class="single-more-articles-close"><i class="elegant-icon icon_close"></i></button>
                </div>
                <div class="post-block-list post-module-1 post-module-5">
                    <ul class="list-post">
                        <?php $__currentLoopData = $relatedPosts->skip(2); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $relatedItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li class="mb-30">
                                <div class="d-flex hover-up-2 transition-normal">
                                    <div class="post-thumb post-thumb-80 d-flex mr-15 border-radius-5 img-hover-scale overflow-hidden">
                                        <a class="color-white" href="<?php echo e($relatedItem->url); ?>">
                                            <img src="<?php echo e(RvMedia::getImageUrl($relatedItem->image)); ?>" alt="<?php echo e($relatedItem->name); ?>" loading="lazy">
                                        </a>
                                    </div>
                                    <div class="post-content media-body">
                                        <h6 class="post-title mb-15 text-limit-2-row font-medium"><a href="<?php echo e($relatedItem->url); ?>"><?php echo e($relatedItem->name); ?></a></h6>
                                        <div class="entry-meta meta-1 float-left font-x-small text-uppercase">
                                            <span class="post-on"><?php echo e(Theme::formatDate($relatedItem->created_at)); ?></span>
                                            <span class="post-by has-dot"><?php echo e(number_format($relatedItem->views)); ?> <?php echo e(__('views')); ?></span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div>
            </div>
        <?php endif; ?>
    </article>
</div>
<?php /**PATH /home/webfvhtq/portfolio.webfrost.net/platform/themes/stories/views/post.blade.php ENDPATH**/ ?>