fix: Update all-products - add images to category products, remove top grid, keep description

This commit is contained in:
Kunthawat
2026-03-16 11:34:10 +07:00
parent 57a8a1eb88
commit b0fd8b3163

View File

@@ -132,21 +132,6 @@ const productCategories = [
</p>
</div>
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6">
{productCategories.map(category => (
<a href={category.slug} class="product-card group">
<div class="product-card-image">
<img src={category.image} alt={category.name} onerror="this.src='/images/logo/dealplustech-logo.png'" />
</div>
<div class="p-4">
<h3 class="text-lg font-bold text-secondary-900 group-hover:text-green-600 transition-colors text-center">{category.name}</h3>
</div>
</a>
))}
</div>
<div class="mt-16">
<h2 class="text-xl sm:text-2xl font-bold text-secondary-900 mb-8 text-center">สินค้าทั้งหมดตามหมวดหมู่</h2>
<div class="space-y-8">
{productCategories.map(category => (
<div class="border border-gray-200 rounded-2xl overflow-hidden">
@@ -157,6 +142,7 @@ const productCategories = [
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
{category.products.map(product => (
<a href={product.slug} class="block p-4 rounded-xl border border-gray-200 hover:border-green-500 hover:bg-green-50 transition-all text-center">
<img src={category.image} alt={product.name} class="w-full h-24 object-cover rounded-lg mb-3" onerror="this.src='/images/logo/dealplustech-logo.png'" />
<span class="text-sm sm:text-base text-secondary-700 font-medium">{product.name}</span>
</a>
))}
@@ -165,7 +151,6 @@ const productCategories = [
</div>
))}
</div>
</div>
<div class="mt-12 text-center">
<p class="text-lg text-secondary-600 mb-6">ติดต่อเราเพื่อรับคำแนะนำและราคาพิเศษ</p>