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

  <main>
        <!--start about header-->
        <section class="pg-header">
            <div class="text text-center">
                <h4 class="mb-0"> المقالات </h4>
            </div>
        </section>
        <!--start blog-->
        <section class="blog-pg">
            <div class="container">
                <div class="row">
                    <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
                        <div class="blog-carousel owl-carousel owl-theme">
                            <?php $__currentLoopData = $articles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="item">
                                <div class="blog-card">
                                    <img src="<?php echo e(asset($row->image)); ?>" alt="">
                                    <div class="text">
                                        <span><?php echo e(date_format($row->created_at,"Y/m/d")); ?></span>
                                        <h6><?php echo e($row->name); ?> </h6>
                                        <p>
                                             <?php echo e(substr_replace($row->description,"...",80)); ?>

                                        </p>
                                    </div>
                                </div>
                            </div>
                           <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </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 = $news; $__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>
                    <?php $__currentLoopData = $article_paginates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 ">
                        <div class="card">
                            <div class="image-content">
                                <img src="<?php echo e(asset($row->image)); ?>">
                            </div>
                            <div class="card-body">
                                <p><?php echo e(date_format($row->created_at,"Y/m/d")); ?></p>
                                <h6><?php echo e($row->name); ?></h6>
                                <p class="summary">
                                   <?php echo e(substr_replace($row->description,"...",120)); ?>

                                    <a href="<?php echo e(url('blogs/'.$row->id)); ?>">المزيد</a>
                                </p>
                            </div>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
               <div class="text-center"><ul><?php echo e($article_paginates->render()); ?></ul> </div>
                <!--
                <div class="pagination text-center">
                    <ul>
                        <li><a href="#"><i class="fas fa-chevron-right"></i></a></li>
                        <li><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">...</a></li>
                        <li><a href="#"><i class="fas fa-chevron-left"></i></a></li>
                    </ul>
                </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/blogs.blade.php ENDPATH**/ ?>