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

   <main>
        <!--start single-blog-->
        <section class="single-blog">
            <div class="container">
                <div class="row">
                    <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
                        <div class="card-news">
                            <div class="single-blog-carousel owl-carousel owl-theme">
                                <div class="item">
                                    <img src="<?php echo e(asset($article->image)); ?>" alt="">
                                </div>
                               
                            </div>
                            <div class="card-header">
                                <h5><?php echo e($article->name); ?></h5>
                                <p class="date">
                                    <i class="far fa-clock"></i> <?php echo e(date_format($article->created_at,"Y/m/d")); ?>

                                </p>
                               
                            </div>
                            <div class="card-body">
                                <p>
                                  <?php echo e($article->description); ?>

                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                        <div class="left-components">
                            <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                                <li class="nav-item" onclick="datablogs(0)" role="presentation">
                                    <a class="nav-link active" id="pills-tab1-tab" data-toggle="pill" href="#pills-tab1" role="tab" aria-controls="pills-tab1" aria-selected="true">الاحدث</a>
                                </li>
                                <li class="nav-item" role="presentation">
                                    <a class="nav-link" onclick="datablogs(1)" id="pills-tab2-tab" data-toggle="pill" href="#pills-tab2" role="tab" aria-controls="pills-tab2" aria-selected="false">الاشهر</a>
                                </li>
                                <li class="nav-item" role="presentation">
                                    <a class="nav-link" onclick="datablogs(2)" id="pills-tab3-tab" data-toggle="pill" href="#pills-tab3" role="tab" aria-controls="pills-tab3" aria-selected="false">المميز</a>
                                </li>
                            </ul>
                            <div class="tab-content" id="pills-tabContent">
                               <div class="tab-pane fade show active" id="pills-tab1" role="tabpanel" aria-labelledby="pills-tab1-tab">
                                    <div class="news-summary" id="datablogs">
                                        <?php $__currentLoopData = $articles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                         <a href="<?php echo e(url('blogs/'.$row->id)); ?>">
                                        <div class="item">
                                           
                                            <img src="<?php echo e(asset($row->image)); ?>" alt="">
                                            <div class="text">
                                                <p><?php echo e(diff($row->created_at)); ?></p>
                                                <h6> <?php echo e(substr_replace($row->description,"...",120)); ?></h6>
                                            </div>
                                          
                                        </div>
                                        </a>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                <h6>تواصل معنا</h6>
                            </div>
                            <div class="card-body">
                                <div class="inner">
                                    <div class="item">
                                        <img src="<?php echo e(url('')); ?>/web/images/icons/call.png" class="icon">
                                        <div class="text contact-text">
                                            <p class="title"><b>إتصل بنا</b></p>
                                            <p class="details">
                                                +12345678987
                                            </p>
                                        </div>
                                    </div>
                                </div>
                                <div class="inner">
                                    <div class="item">
                                        <img src="<?php echo e(url('')); ?>/web/images/icons/email.png" class="icon">
                                        <div class="text contact-text">
                                            <p class="title"><b>البريد الالكتروني</b></p>
                                            <p class="details">
                                                mail@example.com
                                            </p>
                                        </div>
                                    </div>
                                </div>
                                <div class="inner">
                                    <div class="item">
                                        <img src="<?php echo e(url('')); ?>/web/images/icons/location.png" class="icon">
                                        <div class="text contact-text">
                                            <p class="title"><b> العنوان</b></p>
                                            <p class="details">
                                                السعوديه - جده
                                            </p>
                                        </div>
                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>
  

<?php $__env->startPush('js'); ?>
   <script>
      function datablogs(num){
        
         $.ajax({
          url : "<?php echo e(url('datablogs')); ?>"+'/'+num,
          type : 'GET',
          data : 'nothing',
          success:function(data)
          {
            $('#datablogs').html(data);
          }
        })
      }
   </script>
   <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('web.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/green_apple/resources/views/web/pages/blog.blade.php ENDPATH**/ ?>