👁 查看:c3024d26f5eef5ed9c17b9342ff61e90c23ab59b.php
路径:/home/boguraj1/.trash/storage/framework/views/c3024d26f5eef5ed9c17b9342ff61e90c23ab59b.php
大小:4.88 KB · 修改:2026-07-23 16:30:54 · 权限:0644 · 可写
<?php $__env->startSection('title', $settings['site_name'] ?? 'TMITStore'); ?>

<?php $__env->startSection('content'); ?>


<?php if($sliders->count() > 0): ?>
<div id="heroCarousel" class="carousel slide hero-slider" data-bs-ride="carousel" data-bs-interval="4000">
    <div class="carousel-indicators">
        <?php $__currentLoopData = $sliders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $slide): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="<?php echo e($i); ?>" class="<?php echo e($i === 0 ? 'active' : ''); ?>"></button>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <div class="carousel-inner">
        <?php $__currentLoopData = $sliders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $slide): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="carousel-item <?php echo e($i === 0 ? 'active' : ''); ?>">
            <img src="<?php echo e($slide->image_url); ?>" alt="Slide <?php echo e($i+1); ?>" class="d-block w-100">
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <button class="carousel-control-prev" type="button" data-bs-target="#heroCarousel" data-bs-slide="prev">
        <span class="carousel-control-prev-icon"></span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#heroCarousel" data-bs-slide="next">
        <span class="carousel-control-next-icon"></span>
    </button>
</div>
<?php else: ?>
<div style="background:linear-gradient(135deg,#1d3557 0%,#457b9d 100%);padding:80px 0;text-align:center;color:#fff">
    <div class="container">
        <h1 style="font-size:42px;font-weight:800">Welcome to TMITStore</h1>
        <p style="font-size:18px;opacity:.85">Best Online Shopping in Bangladesh</p>
        <a href="<?php echo e(route('shop')); ?>" class="btn btn-danger btn-lg mt-3 px-5">Shop Now</a>
    </div>
</div>
<?php endif; ?>


<section class="py-5">
    <div class="container">
        <h2 class="section-title">Our Products</h2>

        <?php if($products->count() > 0): ?>
        <div class="row row-cols-2 row-cols-sm-3 row-cols-md-4 row-cols-lg-5 g-3">
            <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col">
                <div class="product-card h-100">
                    <a href="<?php echo e(route('product.show', $product->slug)); ?>">
                        <img src="<?php echo e($product->thumbnail_url); ?>" alt="<?php echo e($product->name); ?>" loading="lazy">
                    </a>
                    <div class="card-body">
                        <a href="<?php echo e(route('product.show', $product->slug)); ?>" class="text-decoration-none">
                            <p class="product-title"><?php echo e($product->name); ?></p>
                        </a>
                        <div class="d-flex align-items-center gap-2 mb-2">
                            <?php if($product->is_on_sale): ?>
                            <span style="font-weight:700;color:var(--primary)">৳<?php echo e(number_format($product->sale_price, 0)); ?></span>
                            <span style="text-decoration:line-through;font-size:12px;color:#999">৳<?php echo e(number_format($product->regular_price, 0)); ?></span>
                            <?php else: ?>
                            <span style="font-weight:700;color:var(--primary)">৳<?php echo e(number_format($product->regular_price, 0)); ?></span>
                            <?php endif; ?>
                        </div>
                        <a href="<?php echo e(route('product.show', $product->slug)); ?>" class="btn-buy d-block text-center text-decoration-none">
                            Buy Now
                        </a>
                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        
        <?php if($products->hasPages()): ?>
        <div class="d-flex justify-content-center mt-5">
            <?php echo e($products->links('pagination::bootstrap-5')); ?>

        </div>
        <?php endif; ?>

        <?php else: ?>
        <div class="text-center py-5">
            <i class="bi bi-box-seam" style="font-size:64px;color:#ddd"></i>
            <p class="mt-3 text-muted">No products available yet. Check back soon!</p>
        </div>
        <?php endif; ?>
    </div>
</section>

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\back\resources\views/frontend/home.blade.php ENDPATH**/ ?>