<?php echo $__env->make('layouts.main_temp_top', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  <div class="main">
      <!-- Content -->
      <div class="main-content">
          <div class="trending-posts-line" style="height: 20px;"></div>
          <div class="section">
              <div class="row">
                  <?php if(count($model) > 0): ?>
                    <div class="content">
                      <div class="pst-block">
                          <div class="pst-block-main">
                              <div class="post-content">
                                  <article>
                                      <div class="post-main-img">
                                          <figure>
                                              <img src="<?php echo e($model[0]->thumbnail); ?>" height="582" width="750" alt="<?php echo e($model[0]->title); ?>" class="adaptive" />
                                          </figure>
                                          <div class="post-main-overlay">
                                              <div class="post-main-data">
                                                  
                                                  <h2 class="title-21"><?php echo e($model[0]->title); ?></h2>
                                                  <div class="meta-tp-5">
                                                      
                                                      <div class="date-tp-4"><i class="li_clock"></i><?php echo e($model[0]->insert_date); ?></div>
                                                      <div class="ptp-1-views">
                                                          <a href=""><i class="li_eye"></i><span><?php echo e($model[0]->views); ?></span></a>
                                                      </div>
                                                      <div class="ptp-1-comments">
                                                          <a href=""><i class="li_bubble"></i><span><?php echo e($model[0]->comment_count); ?></span></a>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div>
                                      <?php echo $model[0]->source; ?>

                                  </article>

                                  <div class="sharing-block">
                                      <div class="post-sharing-tp-2">
                                          <ul>
                                              <li class="fb"><a href="#" onclick="window.open( 'https://www.facebook.com/sharer.php?caption=&description=<?php echo e($model[0]->title); ?>&u=<?php echo e(Request::url()); ?>&picture=https://i.stack.imgur.com/AzSGQ.png', 'Facebook' ); return false" target="_blank"><i class="fa fa-facebook"></i><span class="mb-pt-hide">Facebook</span></a></li>
                                          </ul>
                                          <div class="comments">
                                              <i class="li_bubble"></i><?php echo e($model[0]->comment_count); ?> <?php echo e(trans('resource.comments')); ?>

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

                                  <div class="comments-block">
                                      <div class="title-blc-2">
                                          <div class="title-blc-inner">
                                              <h4><?php echo e(trans('resource.comments')); ?></h4>
                                          </div>
                                      </div>
                                      <div class="comments">
                                          <ul class="comment-list">
                                              <?php $__currentLoopData = $comment; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                                                <li class="comment">
                                                    <article>
                                                        <div class="comment-photo">
                                                            <img src="/img/comment-photo.png" height="49" width="49" alt="<?php echo e($item->name); ?>">
                                                        </div>
                                                        <h6 class="title-20"><a href=""><?php echo e($item->name); ?></a></h6>
                                                        <p><?php echo e($item->comment); ?></p>
                                                        <div class="comment-date"><?php echo e($item->insert_date); ?></div>
                                                    </article>
                                                </li>
                                              <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
                                          </ul>
                                      </div>
                                  </div>
                                  <div class="live-comments-block">
                                      <div class="title-blc-2">
                                          <div class="title-blc-inner">
                                              <h4><?php echo e(trans('resource.liveAComment')); ?></h4>
                                              <?php if(count($errors) > 0): ?>
                                                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                                                    <p style="color:red"><?php echo e($error); ?></p>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
                                              <?php endif; ?>
                                          </div>
                                      </div>
                                      <div class="comments-form">
                                          <form action="/comment" method="post">
                                              <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                                              <input name="post_id" type="hidden" value="<?php echo e($model[0]->id); ?>"/>
                                              <div class="form-control">
                                                  <label>
                                                      <?php echo e(trans('resource.name')); ?>*
                                                      <input type="text" name="guest_name" value="<?php echo e(old('guest_name')); ?>">
                                                  </label>
                                              </div>
                                              
                                              
                                              <div class="form-control">
                                                  <label>
                                                      <?php echo e(trans('resource.comment')); ?>*
                                                      <textarea name="guest_comment"><?php echo e(old('guest_comment')); ?></textarea>
                                                  </label>
                                              </div>
                                              <button class="btn-3"><?php echo e(trans('resource.post')); ?></button>
                                          </form>
                                      </div>
                                  </div>
                              </div>
                          </div>
                      </div>
                    </div>
                  <?php else: ?>
                    <img src="/img/noresult.png" style="width: 100%" />
                  <?php endif; ?>
                  <aside class="side-bar sticky-wrap">

                      <?php if(count($model)): ?>
                        <?php echo $__env->make('layouts.category_sidebar',['cat_id' => $model[0]->cat_id], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                      <?php endif; ?>

                      <?php echo $__env->make('layouts.weather', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                  </aside>
              </div>
          </div>
      </div>
      <!-- Content END -->
      <!-- Footer -->
      <?php echo $__env->make('layouts.main_temp_footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <!-- Footer END -->
<?php echo $__env->make('layouts.main_temp_bot', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
