
<?php $__env->startSection('pageTitle', isset($pageTitle) ? $pageTitle : 'Document Title'); ?>
<?php $__env->startSection('meta_tags'); ?>
<?php echo SEO::generate(); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<section class="section department-single">
    <div class="container">
        <div class="row">
            <div class="col-lg-8">
                <!-- Blog Posts Section -->
                <section>
                    <div class="container">
                        <!-- Blog Title and Meta -->
                        <div class="mb-4">
                            <h1 class="fw-bold"><?php echo e($post->title); ?></h1>
                            <ul class="post-meta list-unstyled small">
                                <li><i class="icofont-user"></i> <a href="<?php echo e(route('author_posts', $post->author->username)); ?>"> <?php echo e($post->author->name); ?></a></li>
                                <li><i class="mdi mdi-calendar"></i> <?php echo e(date_formatter($post->created_at)); ?></li>
                                <li><i class="icofont-list"></i> <a href="<?php echo e(route('category_post',$post->post_category->slug)); ?>"><?php echo e($post->post_category->name); ?></a></li>
                                <li><i class="icofont-clock-time"></i> <?php echo e(readDuration($post->title,$post->content)); ?><?php echo e(Str::plural('min', readDuration($post->title, $post->content))); ?></li>
                            </ul>
                        </div>

                        <!-- Post Image -->
                        <div class="mb-4">
                            <img src="/images/posts/<?php echo e($post->featured_image); ?>" class="img-fluid rounded-3" alt="Post Image">
                        </div>

                        <!-- Share Icons -->
                        <div class="d-flex mb-4">
                            <div class="me-3"><strong>Share:</strong></div>
                            <div class="social-icons">
                                <a href="http://www.facebook.com/sharer/sharer.php?u=<?php echo e(urldecode(route('read_post', $post->slug))); ?>" target="_blank"><i class="icofont-facebook" ></i></a>
                                <a href="https://twitter.com/intent/tweet?text=<?php echo e(urldecode($post->title)); ?>&url=<?php echo e(urldecode(route('read_post',$post->slug))); ?>" target="_blank"><i class="icofont-twitter"></i></a>
                                <a href=" http://linkedin.com/shareArticle?mini=true&url=<?php echo e(urldecode(route('read_post',$post->slug))); ?>&title=<?php echo e(urldecode($post->title)); ?>"><i class="icofont-linkedin"></i></a>
                                <a href="mailto:?subject=<?php echo e(urldecode('Check out this post: '. $post->title)); ?>&amp;body=<?php echo e(urldecode('I found this interesting : ' .route('read_post',$post->slug))); ?>" target="_blank"><i class="icofont-envelope"></i></a>
                            </div>
                        </div>

                        <!-- Post Content -->
                        <div class="mb-5 text-justify me-3">
                            <p><?php echo $post->content; ?></p>
                        </div>



                        <!-- Navigation -->
                        <div class="d-flex justify-content-between post-navigation">
                            <?php if($prevPost): ?>
                            <h6>Prev</h6>
                            <?php endif; ?>
                            <?php if($nextPost): ?>
                            <h6>Next</h6>
                            <?php endif; ?>
                        </div>
                        <div class="d-flex justify-content-between post-navigation">
                            <?php if($prevPost): ?>
                            <a href="<?php echo e(route('read_post',$prevPost->slug)); ?>" class="text-decoration-none text-prim">&laquo;<?php echo e($prevPost->title); ?>

                            </a>
                            <?php endif; ?>
                            <?php if($nextPost): ?>
                            <a href="<?php echo e(route('read_post',$nextPost->slug)); ?>" class="text-decoration-none text-prim"><?php echo e($nextPost->title); ?> &raquo;</a>
                            <?php endif; ?>
                        </div>


                    </div>
                    <?php if($relatedPosts): ?>
                    
                   
                    <div class="container mt-5">
                        <section class="section">
                        <h1>Related Posts</h1>
                        <hr>
                        <?php $__currentLoopData = $relatedPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $related): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="row mb-4 align-items-stretch">
                                    <!-- Image -->
                                    <div class="col-md-4 d-flex p-3">
                                        <img src="<?php echo e(asset('/images/posts/resized/resized_' . $related->featured_image)); ?>"
                                            class="img-fluid rounded-3 w-100 object-fit-cover"
                                            style="height: 100%; max-height: 250px; object-fit: cover;"
                                            alt="<?php echo e($related->title ?? 'Post Image'); ?>">
                                    </div>

                                    <!-- Content -->
                                    <div class="col-md-8">
                                        <div class="card-body h-100 d-flex flex-column justify-content-between">
                                            <div>
                                                <h5 class="card-title fw-bold">
                                                    <a href="<?php echo e(route('read_post', $related->slug)); ?>"><?php echo e($related->title); ?></a>
                                                </h5>

                                                <div class="text-muted small mb-2 card-details">
                                                    <i class="icofont-ui-user"></i>
                                                    <a href="<?php echo e(route('author_posts', $related->author->username)); ?>"><?php echo e($related->author->name); ?></a> &nbsp;
                                                    <i class="mdi mdi-calendar-badge"></i> <?php echo e(date_formatter($related->created_at)); ?> &nbsp;
                                                    <i class="icofont-category"></i>
                                                    <a href="<?php echo e(route('category_post', $related->post_category->slug)); ?>" class="ml-1"><?php echo e($related->post_category->name); ?></a>
                                                </div>

                                                <p class="card-text">
                                                    <?php echo Str::ucfirst(words($related->content, 25)); ?>

                                                </p>
                                            </div>

                                            <div>
                                                <a href="<?php echo e(route('read_post', $related->slug)); ?>">Read More...</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </section>
                            </div>
                    <?php endif; ?>
                </section>
                <!-- /Blog Pagination Section -->
            </div>
            <div class="col-lg-4 sidebar">

                <div class="widgets-container">

                    <!-- Search Widget -->
                    <?php if (isset($component)) { $__componentOriginale6ac12e1b4c8ba8b88cc0f498d1979d5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale6ac12e1b4c8ba8b88cc0f498d1979d5 = $attributes; } ?>
<?php $component = App\View\Components\SidebarSearch::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('sidebar-search'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\SidebarSearch::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale6ac12e1b4c8ba8b88cc0f498d1979d5)): ?>
<?php $attributes = $__attributesOriginale6ac12e1b4c8ba8b88cc0f498d1979d5; ?>
<?php unset($__attributesOriginale6ac12e1b4c8ba8b88cc0f498d1979d5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale6ac12e1b4c8ba8b88cc0f498d1979d5)): ?>
<?php $component = $__componentOriginale6ac12e1b4c8ba8b88cc0f498d1979d5; ?>
<?php unset($__componentOriginale6ac12e1b4c8ba8b88cc0f498d1979d5); ?>
<?php endif; ?>
                    <!--/Search Widget -->

                    <!-- Categories Widget -->
                   <?php if (isset($component)) { $__componentOriginal7841edbaca9e54db0dc03bd0fd077cf3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7841edbaca9e54db0dc03bd0fd077cf3 = $attributes; } ?>
<?php $component = App\View\Components\SidebarCategories::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('sidebar-categories'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\SidebarCategories::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7841edbaca9e54db0dc03bd0fd077cf3)): ?>
<?php $attributes = $__attributesOriginal7841edbaca9e54db0dc03bd0fd077cf3; ?>
<?php unset($__attributesOriginal7841edbaca9e54db0dc03bd0fd077cf3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7841edbaca9e54db0dc03bd0fd077cf3)): ?>
<?php $component = $__componentOriginal7841edbaca9e54db0dc03bd0fd077cf3; ?>
<?php unset($__componentOriginal7841edbaca9e54db0dc03bd0fd077cf3); ?>
<?php endif; ?>

                    <!--/Categories Widget -->

                    <!-- Recent Posts Widget -->
                    <div class="recent-posts-widget widget-item mt-5">

                        <h3 class="widget-title">Recent Posts</h3>
                        <?php $__currentLoopData = sidebar_latest_posts(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <div class="post-item">
                            <img src="/images/posts/resized/resized_<?php echo e($item->featured_image); ?>" alt="<?php echo e($item->title); ?>" class="img-fluid" style="max-height: 100px; object-fit: cover;">
                            <div>
                                <h4 style="line-height: 1.5rem;"><a href="<?php echo e(route('read_post', $item->slug)); ?>"><?php echo e($item->title); ?></a></h4>
                                <time><?php echo e(date_formatter($item->created_at)); ?></li></time>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <!-- End recent post item-->
                    </div><!--/Recent Posts Widget -->

                    <!-- Tags Widget -->
                     <?php if (isset($component)) { $__componentOriginaldc5983d57edf1c53b130bb862af1ad1a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginaldc5983d57edf1c53b130bb862af1ad1a = $attributes; } ?>
<?php $component = App\View\Components\SidebarTags::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('sidebar-tags'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\SidebarTags::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginaldc5983d57edf1c53b130bb862af1ad1a)): ?>
<?php $attributes = $__attributesOriginaldc5983d57edf1c53b130bb862af1ad1a; ?>
<?php unset($__attributesOriginaldc5983d57edf1c53b130bb862af1ad1a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaldc5983d57edf1c53b130bb862af1ad1a)): ?>
<?php $component = $__componentOriginaldc5983d57edf1c53b130bb862af1ad1a; ?>
<?php unset($__componentOriginaldc5983d57edf1c53b130bb862af1ad1a); ?>
<?php endif; ?>
                   <!--/Tags Widget -->

                </div>

            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('stylesheets'); ?>
<style>
    .social-icons a {
        display: inline;
        margin-bottom: 0.5rem;
        font-size: 1.25rem;
        color: #6c757d;
    }

    .post-meta li {
        display: inline;
        margin-right: 1rem;
        color: #6c757d;
    }

    .post-navigation a {
        text-decoration: none;
    }

    .text-prim {
        color: #1691b6;
    }
</style>
<?php $__env->stopPush(); ?>
<?php $__env->startPush('scripts'); ?>
<script>
    $(document).on('click', '.social-icons > a', function(e){
        e.preventDefault();
        window.open($(this).attr('href'),'','height=450,width=450,top='+($(window).height()/2-275)+', left='+($(window).width()/2-225)+', toolbar=0, location=0, menubar=0, directionaries=0, scrollbars=0');
        return false;
    })
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('front.layout.pages-layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\larablog\resources\views\front\pages\bulletin\single_post.blade.php ENDPATH**/ ?>