İçeriğe geç
Tüm kodlar

ER3NSHOP

Kurulum sihirbazlı online mağaza sistemi

15 satır · 914 BHamİndir
<?php
$items = array_values(array_filter($s['items'], fn($item) => $item['image']));
$cols = ['3' => 'grid-cols-3', '4' => 'grid-cols-2 sm:grid-cols-4', '6' => 'grid-cols-3 lg:grid-cols-6'][$s['columns']] ?? 'grid-cols-3 lg:grid-cols-6';
?>
<?php if ($items): ?>
    <?= section_title_html($s['title'], $s['subtitle'], null, true) ?>
    <div class="grid gap-2 sm:gap-3 <?= $cols ?>">
        <?php foreach ($items as $item): ?>
            <a href="<?= e(section_link($item['link']) ?: '#') ?>" class="group relative aspect-square overflow-hidden rounded-2xl bg-zinc-100">
                <img src="<?= e(upload_url($item['image'])) ?>" alt="" class="h-full w-full object-cover transition duration-700 group-hover:scale-105" loading="lazy">
                <span class="absolute inset-0 bg-black/0 transition group-hover:bg-black/20"></span>
            </a>
        <?php endforeach ?>
    </div>
<?php endif ?>

Lisans bilgisi projenin LICENSE dosyasında.