

<?php $__env->startSection('title', 'Blog'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('layouts.partials.page_header', [
        'title' => 'Blog List',
        'breadcrumbs' => [
            ['label' => 'Home', 'url' => route('home')],
            ['label' => 'Blog List', 'url' => '']
        ]
    ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
    <!--Blog List Start-->
    <section class="blog-list">
        <div class="container">
            <div class="row">
                <!-- Left Column: Blog Posts -->
                <div class="col-xl-8 col-lg-7">
                    <div class="blog-list__left">

                        <!-- Filter Row (Improved) -->


                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                            <!--Blog List Single Start-->
                            <div class="blog-list__single <?php echo e($loop->even ? 'blog-list__single-2' : ''); ?>">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($loop->odd || !$post->featured_image): ?>
                                    
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($post->featured_image): ?>
                                        <div class="blog-list__img-box">
                                            <div class="blog-list__img">
                                                <img src="<?php echo e(asset('storage/'.$post->featured_image)); ?>"
                                                     alt="<?php echo e($post->title); ?>">
                                            </div>
                                            <div class="blog-list__date">
                                                <p>
                                                    <span
                                                        class="icon-calendar"></span><?php echo e($post->published_at->format('M d, Y')); ?>

                                                </p>
                                            </div>
                                        </div>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                <div class="blog-list__content">

                                    <h3 class="blog-list__title-1"><a
                                            href="<?php echo e(route('blog.show', $post->slug)); ?>"><?php echo e($post->title); ?></a></h3>
                                    <p class="blog-list__text"><?php echo e(Str::limit(strip_tags($post->content), 150)); ?></p>
                                    <div class="blog-list__btn-box">
                                        <a href="<?php echo e(route('blog.show', $post->slug)); ?>" class="thm-btn-two">
                                            <span>More Details</span>
                                            <i class="icon-angles-right"></i>
                                        </a>
                                    </div>
                                    <br/>
                                    <div class="blog-list__client-and-meta">
                                        <div class="blog-list__client-box">
                                            <div class="blog-list__client-img">
                                                <img
                                                    src="<?php echo e($post->author->profile_photo_path ? asset('storage/'.$post->author->profile_photo_path) : asset('assets/images/blog/blog-list-client-img-1.jpg')); ?>"
                                                    alt="">
                                            </div>
                                            <div class="blog-list__client-content">
                                                <p>Published By</p>
                                                <h4><?php echo e($post->author->name); ?></h4>
                                            </div>
                                        </div>
                                        <ul class="blog-list__client-meta list-unstyled">
                                            <li>
                                                <div class="icon"><span class="icon-tags"></span></div>
                                                <p><?php echo e($post->category->name); ?></p>
                                            </li>
                                            <li>
                                                <div class="icon"><span class="icon-calendar"></span></div>
                                                <p><?php echo e($post->published_at->format('M d, Y')); ?></p>
                                            </li>
                                            <li>
                                                <div class="icon"><span class="icon-comments"></span></div>
                                                <p>(<?php echo e($post->views); ?> Views)</p>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <!--Blog List Single End-->
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                            <div class="text-center py-5">
                                <h4>No posts found.</h4>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                        <!-- Pagination -->
                        <div class="blog-list__pagination">
                            <?php echo e($posts->appends(request()->query())->links('vendor.pagination.custom')); ?>

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

                <!-- Right Sidebar -->
                <div class="col-xl-4 col-lg-5">

                    <?php echo $__env->make('blog.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                </div>
            </div>
        </div>
    </section>
    <!--Blog List End-->


    <!--Contact Info One End -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\Sasi\resources\views\blog\index.blade.php ENDPATH**/ ?>