

<?php $__env->startSection('content'); ?>
<main class="main-content" style="background: #f8f9fa; min-height: 100vh;">
    <header class="header">
        <div class="user-greeting">
            <h3>Berita & Pengumuman</h3>
            <p style="font-size: 0.8rem; color: #636e72;">Informasi terbaru seputar layanan PAMSIMAS</p>
        </div>
    </header>

    <section class="info-section" style="padding: 5px;">
        <div class="news-list">
            <?php $__empty_1 = true; $__currentLoopData = $allNews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <a href="<?php echo e(route('news.show', $item->id)); ?>" class="news-item">
                    <div class="news-thumbnail">
                        <?php if($item->image): ?>
                            <img src="<?php echo e(rtrim(config('app.admin_url'), '/') . '/storage/' . $item->image); ?>">
                        <?php else: ?>
                            <img src="https://via.placeholder.com/100" alt="No Image">
                        <?php endif; ?>
                    </div>

                    <div class="news-info">
                        <h5><?php echo e($item->title); ?></h5>
                        <div class="news-meta">
                            <div>
                                <i class="far fa-calendar-alt"></i>
                                <?php echo e($item->created_at->translatedFormat('M d, Y')); ?>

                            </div>
                            <div>
                                <i class="far fa-clock"></i>
                                <?php echo e(ceil(str_word_count($item->content) / 200)); ?> min read
                            </div>
                        </div>
                    </div>
                </a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="empty-state-card">
                    <h4>Belum ada berita</h4>
                    <p>Silakan kembali lagi nanti untuk informasi terbaru.</p>
                </div>
            <?php endif; ?>
        </div>

        <div style="margin-top: 20px;">
            <?php echo e($allNews->links()); ?>

        </div>
    </section>
</main>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\UsEr\Documents\0 Mata Kuliah\Tugas Akhir\Project Pamsimas\PAMSIMAS_User\resources\views/news/index.blade.php ENDPATH**/ ?>