
<?php $__env->startSection('title'); ?>
    <title><?php echo e($blog->translated_title); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('meta'); ?>
    <meta name="description" content="<?php echo e($blog->seo_description); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('user-content'); ?>


  <!--===BREADCRUMB PART START====-->
  <section class="wsus__breadcrumb" style="background: url(<?php echo e($banner_image ? url($banner_image->image) : ''); ?>);">
    <div class="wsus_bread_overlay">
        <div class="container">
            <div class="row">
                <div class="col-12 text-center">
                    <h4><?php echo e(__('user.Blog')); ?></h4>
                    <nav style="--bs-breadcrumb-divider: '-';" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>"><?php echo e(__('user.Home')); ?></a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('user.Blog')); ?></li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
    </div>
  </section>
  <!--===BREADCRUMB PART END====-->


  <!--=====BLOG DETAILS START=====-->
  <section class="wsus__blog_details mt_45 mb_45 xs_mb_20">
    <div class="container">
      <div class="row">
        <div class="col-xl-8 col-lg-7">
          <div class="wsus__blog_det_area">
            <div class="wsus__blog_det_img">
              <img src="<?php echo e(asset($blog->image)); ?>" alt="blod images" class="img-fluid w-100">
              <p>
                <span><i class="fal fa-user-clock"></i> <?php echo e($blog->admin->name); ?></span>
                <span><i class="fal fa-comment-alt-dots"></i> <?php echo e($blog->total_comment); ?> <?php echo e(__('user.Comments')); ?></span>
                <span><i class="far fa-eye"></i><?php echo e($blog->views); ?> <?php echo e(__('user.Views')); ?></span>
                </p>
            </div>
            <h3><?php echo e($blog->translated_title); ?></h3>
            <p class="details mb-3"><?php echo e($blog->translated_short_description); ?></p>

            <?php echo clean($blog->translated_description); ?>


            <?php if($blog_comment_setting->comment_type==1): ?>
            <div class="wsus__blog_comment">
              <h3><?php echo e($blog->total_comment); ?> <?php echo e(__('user.Comments')); ?></h3>

              <?php $__currentLoopData = $blogComments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <div class="wsus__single_comment">
                <div class="wsus__comm_img">
                  <img src="<?php echo e(asset($default_profile_image)); ?>" alt="comment img" class="img-fluid img-thumbnail">
                </div>
                <div class="wsus__comm_text">
                  <h4><?php echo e($item->name); ?></h4>
                  <span><?php echo e($item->created_at->format('d M Y')); ?></span>
                  <p><?php echo e($item->comment); ?></p>
                </div>
              </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              <div class="col-12">
                <?php echo e($blogComments->links('custom_paginator')); ?>

              </div>
              <h3 class="border-0 pt-0"><?php echo e(__('user.Submit Comment')); ?></h3>
              <form action="<?php echo e(route('blog.comment',$blog->id)); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="row">
                  <div class="col-xl-6">
                    <input type="text" name="name" placeholder="<?php echo e(__('user.Name')); ?>">
                  </div>
                  <div class="col-xl-6">
                    <input type="email" name="email" placeholder="<?php echo e(__('user.Email')); ?>">
                  </div>
                  <div class="col-xl-12">
                    <textarea cols="3" rows="4" placeholder="<?php echo e(__('user.Comment')); ?>" name="comment"></textarea>
                    <?php if($recaptcha_setting->status==1): ?>
                    <p class="g-recaptcha mb-3" data-sitekey="<?php echo e($recaptcha_setting->site_key); ?>"></p>
                    <?php endif; ?>

                    <button class="common_btn" type="submit"><?php echo e(__('user.Submit')); ?></button>

                  </div>
                </div>
              </form>
            </div>
            <?php else: ?>
                <div class="wsus__blog_comment">
                    <div class="fb-comments" data-href="<?php echo e(Request::url()); ?>" data-width="" data-numposts="10"></div>
                </div>
            <?php endif; ?>
          </div>
        </div>
        <div class="col-xl-4 col-lg-5">
          <div class="wsus__property_sidebar mb-0" id="sticky_sidebar">
            <div class="wsus__blog_search">
              <h5><?php echo e(__('user.Search Blog')); ?></h5>
              <form action="<?php echo e(route('blog')); ?>" method="GET">
                <input type="text" placeholder="<?php echo e(__('user.Type')); ?>" name="search" required>
                <button class="common_btn" type="submit"><i class="fal fa-search"></i></button>
              </form>
            </div>
            <div class="wsus__search_categoy">
              <h5><?php echo e(__('user.Categories')); ?></h5>
              <ul>
                <?php $__currentLoopData = $blogCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li><a href="<?php echo e(route('blog',['category' => $item->slug])); ?>"><?php echo e($item->translated_name); ?> <span><?php echo e($item->blogs->count()); ?></span></a></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

              </ul>
            </div>
            <div class="wsus__blog_post">
              <h5><?php echo e(__('user.Popular Blog')); ?></h5>
              <div class="row">
                <?php
                    $colorId=1;
                ?>
                <?php $__currentLoopData = $popularBlogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $popular_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    if($index %4 ==0){
                        $colorId=1;
                    }

                    $color="";
                    if($colorId==1){
                        $color="";
                    }else if($colorId==2){
                        $color="oreangr";
                    }else if($colorId==3){
                        $color="gren";
                    }else if($colorId==4){
                        $color="blur";
                    }
                ?>

                <div class="col-xl-12 col-md-6 col-lg-12">
                  <div class="wsus__single_blog">
                    <div class="wsus__blog_img">
                      <img src="<?php echo e(asset($popular_item->image)); ?>" alt="blog items" class="img-fluid w-100">
                      <span class="category <?php echo e($color); ?>"><?php echo e($popular_item->category->translated_name); ?></span>
                    </div>
                    <div class="wsus__blog_text">
                      <p class="blog_date">
                        <span><?php echo e($popular_item->created_at->format('d')); ?></span>
                        <span><?php echo e($popular_item->created_at->format('m')); ?></span>
                        <span><?php echo e($popular_item->created_at->format('Y')); ?></span>
                      </p>
                      <span class="comment"><i class="fal fa-comment-dots"></i> <?php echo e($popular_item->total_comment); ?></span>
                      <div class="wsus__blog_header d-flex flex-wrap align-items-center justify-content-between">
                        <div class="blog_header_images d-flex flex-wrap align-items-center w-100">
                          <img src="<?php echo e($popular_item->admin->image ? url($popular_item->admin->image) : url($default_profile_image)); ?>" alt="bloger" class="img-fluid img-thumbnail">
                          <span><?php echo e($popular_item->admin->name); ?></span>
                        </div>
                      </div>
                      <a href="<?php echo e(route('blog.details',$popular_item->slug)); ?>" class="blog_title"><?php echo e($popular_item->translated_title); ?></a>
                      <p><?php echo e($popular_item->translated_short_description); ?></p>
                    </div>
                  </div>
                </div>

                <?php
                    $colorId ++;
                ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <!--=====BLOG DETAILS  END=====-->


<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v11.0&appId=<?php echo e($blog_comment_setting->app_id); ?>&autoLogAppEvents=1" nonce="MoLwqHe5"></script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/paprdcor/topriserealtors.com/resources/views/show_blog.blade.php ENDPATH**/ ?>