<?php $__env->startSection('content'); ?>
<section class="berita-page-section theTop container">
        <h1 class="text-center" style="text-transform: uppercase;">Tag: <?php echo e($dataTag); ?></h1>
        <br>
        <div class="row">
            <!-- First Card -->
            <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data1): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-md-4 d-flex" style="margin-bottom: 20px">
            <div class="card" style="
            box-shadow: 0 2px 5px rgba(0,0,0,.2);
            display: flex;
            flex-direction: column;
            ">
            <img src="<?php echo e(asset('storage/img/' . $data1->photo)); ?>" style=" object-fit: cover; max-height: 250px; min-height: 250px;" class="card-img-top" alt="Berita Image">
                <div class="card-body d-flex flex-column" style="padding: 5%;">
                    <h5 class="card-title" title="<?php echo e($data1->title); ?>"><?php echo e($data1->title); ?></h5>
                    <br>
                    <p class="card-text" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;">
                        <?php echo e(\Illuminate\Support\Str::words($data1->data, 10, '...')); ?>

                    </p>
                    <br>
                    <a class="text-decoration-none text-primary mt-auto" href="/berita/<?php echo e($data1->slug); ?>" style="text-decoration: none; font-size: 14px;">BACA SELENGKAPNYA »</a>
                    <hr>
                    <p class="card-text" style="cursor: default;"><?php echo e(\Carbon\Carbon::parse($data1->created_at)->locale('id')->isoFormat('D MMMM YYYY')); ?></p>
                </div>
            </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
        <br>
        <div class="pagination-container text-center d-flex justify-content-center align-items-center">
            <?php if($data->onFirstPage()): ?>
                <button class="btn btn-secondary" style="margin-right: 20px" disabled>Selanjutnya</button>
            <?php else: ?>
                <a href="<?php echo e($data->previousPageUrl()); ?>" class="btn btn-primary" style="margin-right: 20px">Selanjutnya</a>
            <?php endif; ?>
            <span class="mx-3 text-center">
                Menampilkan Total <?php echo e($data->firstItem()); ?> - <?php echo e($data->lastItem()); ?> dari <?php echo e($data->total()); ?> Berita
            </span>
            <?php if($data->hasMorePages()): ?>
                <a href="<?php echo e($data->nextPageUrl()); ?>" class="btn btn-primary" style="margin-left: 20px">Sebelumnya</a>
            <?php else: ?>
                <button class="btn btn-secondary" style="margin-left: 20px" disabled>Sebelumnya</button>
            <?php endif; ?>
        </div>
</section>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\ROED\2025\UPTpasar_laravel\website\upt\resources\views/pages/tag.blade.php ENDPATH**/ ?>