<?php $__env->startSection('title'); ?>
<?php echo e('Latest News'); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('description'); ?>
<?php echo e('Latest News Homeflo'); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div id="test">
<?php if(count($blogCategories)>0): ?>
<section class="page-banner bg-overlay" style="background-image: url(<?php echo e(asset('/front/images/slider-1.jpg')); ?>);">
    <div class="page-inner-box col-md-4 text-white">
        <?php if(!empty($banner_title) && isset($banner_title)): ?>
        <h3 class="text-center h1"><?php echo e($banner_title); ?></h3>
        <?php else: ?>
        <h3 class="h3 text-center mb-3">Latest News</h3>
    
        <?php endif; ?>
    </div>
</section>
<section class="py-lg-5 py-3" >
    <div class="container">
         
        <div class="row">
            <div class="col-md-12 text-lg-center mb-4">
                <ul class="blog-categories d-lg-inline-flex">
                    <?php $__currentLoopData = $blogCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if($key==0): ?>
                        <li><a id="blogCat-<?php echo e($cat->id); ?>" class="<?php echo e($active_cat == "all" ? "active" : " "); ?>" href="<?php echo e(url('blogs')); ?>"><?php echo e($cat->title); ?></a></li>
                        <?php else: ?>
                            <li><a id="blogCat-<?php echo e($cat->id); ?>" class="<?php echo e($active_cat == $cat->key ? "active" : " "); ?>"  href="<?php echo e(url('blogs')); ?>/<?php echo e($cat->key); ?>"><?php echo e($cat->title); ?></a></li>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  
                </ul>
            </div>
        </div>
        <div class="row text-center">
           
            
            <?php if(!empty($blogs[0])): ?>
            <?php $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                
                    <div  class="col-md-4 mb-4">
                        <a href="<?php echo e(url("blog/".$blog->key)); ?>" class="card blog-post">
                          
                            
                            <?php if(!empty($blog->image)): ?>
                            <img class="card-img-top" src="<?php echo e(asset(Config("params.media_path.large").$blog->image)); ?>" alt="">
        
                            <?php else: ?>
                            <img src="<?php echo e(asset('/front/images/slider-1.jpg')); ?>" class="img-fluid card-img-top" alt="">
        
                            <?php endif; ?> 
                            
                            <div class="card-body">
                                <!--<small class="text-uppercase post-cat mb-2 d-block"><?php echo e($blog->title); ?></small>-->
                                <h5 class="card-title"><?php echo e($blog->title); ?></h5>
                            </div>
                        </a>
                    </div>
                
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <div class="col-md-12  text-center blog-pagination">
               <?php echo $blogs->links();; ?>

           </div>
            <?php else: ?>
                <div class="col-md-12">
                    Category Result: Not Found...!
                </div>
            <?php endif; ?>
           
        </div>
    </div>
</section>
<?php endif; ?>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('vendor_script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->startSection('myscript'); ?>

<script>

    $(document).ready(function () {

        $(document).on('click', '#url', function (event) {
            event.preventDefault();
//              $("#url").removeClass("active");

           var url = $("#url").attr('href');
           // alert(page);
//            fetch_data(url);
        });

        function fetch_data(page)
        {
            $.ajax({
                url: page,
                success: function (data)
                {
                    $('#test').html(data);
                }
            });
        }

    });

</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('front.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/seolocaj/public_html/homefloltd/resources/views/front/blogs.blade.php ENDPATH**/ ?>