184 lines
12 KiB
Plaintext
184 lines
12 KiB
Plaintext
---
|
|
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
|
|
const products = [
|
|
// ท่อพีพีอาร์
|
|
{ name: "ไทยพีพีอาร์", href: "/ท่อ-ppr-thai-ppr", image: "/images/products-cropped/ppr-pipe_000C.jpg", category: "ท่อพีพีอาร์" },
|
|
{ name: "ท่อ PPR ตราช้าง", href: "/ท่อ-ppr-scg", image: "/images/products-cropped/ppr-scg.jpg", category: "ท่อพีพีอาร์" },
|
|
{ name: "ท่อ PP-R Poloplast", href: "/pp-r-poloplast", image: "/images/poloplast/POLOPLAST_001.png", category: "ท่อพีพีอาร์" },
|
|
{ name: "ท่อ HDPE", href: "/ท่อ-hdpe", image: "/images/products-misc/HDPE.jpg", category: "ท่อพีพีอาร์" },
|
|
|
|
// ท่อ UPVC/Specialty
|
|
{ name: "ท่อ UPVC", href: "/ท่อ-upvc", image: "/images/products-cropped/upvc-pipe_000C.jpg", category: "ท่อ UPVC/Specialty" },
|
|
{ name: "ท่อ Syler", href: "/ท่อ-syler", image: "/images/products-misc/SYLER01.jpg", category: "ท่อ UPVC/Specialty" },
|
|
{ name: "ท่อ PVC และข้อต่อ", href: "/ท่อ-pvc-และข้อต่อ", image: "/images/products-cropped/pvc-pipe_000C.jpg", category: "ท่อ UPVC/Specialty" },
|
|
{ name: "ท่อ XYLENT", href: "/ท่อ-xy-lent", image: "/images/products-cropped/XYLENT_001.png", category: "ท่อ UPVC/Specialty" },
|
|
|
|
// เครื่องเชื่อมท่อ
|
|
{ name: "เครื่องเชื่อม HDPE", href: "/เครื่องเชื่อม-hdpe", image: "/images/products-misc/HDPE.jpg", category: "เครื่องเชื่อมท่อ" },
|
|
{ name: "เครื่องเชื่อม PPR", href: "/เครื่องเชื่อม-ppr", image: "/images/products-misc/ppr0001.jpg", category: "เครื่องเชื่อมท่อ" },
|
|
{ name: "Pipe Coupling", href: "/pipe-coupling", image: "/images/pipe-coupling/BG-SMC02.png", category: "เครื่องเชื่อมท่อ" },
|
|
{ name: "เม็กกรู๊ฟ คับปลิ้ง", href: "/เม็กกรู๊ฟ-คับปลิ้ง", image: "/images/products-misc/MECH_001.jpg", category: "เครื่องเชื่อมท่อ" },
|
|
|
|
// วาล์ว
|
|
{ name: "วาล์ว Valve", href: "/วาล์ว-valve", image: "/images/products-cropped/valve_000C.jpg", category: "วาล์ว" },
|
|
{ name: "DURGO วาล์วเติมอากาศ", href: "/durgo-avvs", image: "/images/products-cropped/durgo_000C.jpg", category: "วาล์ว" },
|
|
|
|
// ปั๊มและระบบน้ำ
|
|
{ name: "ปั๊มน้ำ Water Pump", href: "/water-pump", image: "/images/products-cropped/water-pump_000C.jpg", category: "ปั๊มและระบบน้ำ" },
|
|
{ name: "ระบบกรองน้ำ", href: "/water-treatment", image: "/images/products-cropped/water-treatment_000C.jpg", category: "ปั๊มและระบบน้ำ" },
|
|
|
|
{ name: "กริลแอร์", href: "/grilles", image: "/images/products-cropped/grilles_000C.jpg", category: "อุปกรณ์ปรับอากาศ" },
|
|
|
|
// ฉนวนและรั้ว
|
|
{ name: "Armaflex", href: "/armflex", image: "/images/armflex/armaflex-sheet-roll.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "Aeroflex", href: "/aeroflex", image: "/images/aeroflex/aerocel-d-al-real.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "Maxflex", href: "/maxflex", image: "/images/maxflex/maxflex-fsk-foil.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "เทอร์โมเบรค Thermobreak", href: "/เทอร์โมเบรค-thermobreak", image: "/images/thermobreak/thermobreak-solarblock.png", category: "ฉนวนและรั้ว" },
|
|
{ name: "Realflex", href: "/realflex", image: "/images/products-cropped/realflex_000C.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "ตู้ดับเพลิง", href: "/ตู้ดับเพลิง", image: "/images/products-cropped/extinguishers_000C.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "รั้วเทวดา", href: "/รั้วเทวดา", image: "/images/tevada/LINE_ALBUM_รั้วเทวดา_260522_1.jpg", category: "ฉนวนและรั้ว" },
|
|
{ name: "ระบบรั้วไวน์แมน", href: "/ระบบรั้วไวน์แมน", image: "/images/products-cropped/vineman_000C.jpg", category: "ฉนวนและรั้ว" },
|
|
];
|
|
|
|
// Get unique categories based on Header structure
|
|
const categoryCounts = {};
|
|
products.forEach(p => {
|
|
categoryCounts[p.category] = (categoryCounts[p.category] || 0) + 1;
|
|
});
|
|
|
|
const categories = [
|
|
{ name: "ท่อพีพีอาร์", id: "ppr", count: 4 },
|
|
{ name: "ท่อ UPVC/Specialty", id: "upvc", count: 4 },
|
|
{ name: "เครื่องเชื่อมท่อ", id: "welding", count: 4 },
|
|
{ name: "วาล์ว", id: "valve", count: 2 },
|
|
{ name: "ปั๊มและระบบน้ำ", id: "pump", count: 2 },
|
|
{ name: "อุปกรณ์ปรับอากาศ", id: "ac", count: 1 },
|
|
{ name: "ฉนวนและรั้ว", id: "fence", count: 8 },
|
|
];
|
|
---
|
|
|
|
<BaseLayout title="สินค้าทั้งหมด - ดีล พลัส เทค" description="สินค้าระบบน้ำคุณภาพสูง ท่อ PPR ท่อ HDPE อุปกรณ์วาล์ว ปั๊มน้ำ เครื่องเชื่อมท่อ">
|
|
<!-- Hero -->
|
|
<section class="relative bg-gradient-to-br from-primary-800 via-primary-700 to-primary-900 text-white py-16 overflow-hidden relative overflow-hidden">>
|
|
<!-- Animated Background -->
|
|
<div class="absolute inset-0 overflow-hidden pointer-events-none">
|
|
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-gradient-to-br from-primary-400/30 via-primary-500/15 to-transparent rounded-full blur-[100px] animate-mesh-1"></div>
|
|
<div class="absolute top-1/4 left-1/4 w-2 h-2 bg-white/30 rounded-full animate-float"></div>
|
|
<div class="absolute top-1/3 right-1/4 w-3 h-3 bg-primary-300/20 rounded-full animate-float-delayed-1"></div>
|
|
<div class="absolute top-2/3 left-1/3 w-2 h-2 bg-primary-200/20 rounded-full animate-float-delayed-2"></div>
|
|
</div>
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
|
<h1 class="text-4xl lg:text-5xl font-bold mb-4">สินค้าทั้งหมด</h1>
|
|
<p class="text-lg text-primary-100">สินค้าระบบน้ำคุณภาพสูง {products.length} รายการ</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Filter Buttons -->
|
|
<section class="py-8 bg-white border-b border-neutral-200 sticky top-16 z-30">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
|
<div class="flex flex-wrap gap-3" id="filter-buttons">
|
|
<button data-filter="all" class="filter-btn active px-4 py-2 bg-primary-600 text-white rounded-full text-sm font-medium transition-colors">
|
|
ทั้งหมด ({products.length})
|
|
</button>
|
|
{categories.map(cat => (
|
|
<button data-filter={cat.id} class="filter-btn px-4 py-2 bg-neutral-100 text-neutral-700 hover:bg-primary-100 hover:text-primary-700 rounded-full text-sm font-medium transition-colors">
|
|
{cat.name} ({cat.count})
|
|
</button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Products Grid -->
|
|
<section class="py-16 lg:py-24 bg-neutral-50">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
|
<div class="grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6" id="products-grid">
|
|
{products.map(product => (
|
|
<a
|
|
href={product.href}
|
|
class="product-card group bg-white rounded-xl overflow-hidden border border-neutral-200 hover:border-primary-300 hover:shadow-lg transition-all"
|
|
data-category={
|
|
product.category === "ท่อพีพีอาร์" ? "ppr" :
|
|
product.category === "ท่อ UPVC/Specialty" ? "upvc" :
|
|
product.category === "เครื่องเชื่อมท่อ" ? "welding" :
|
|
product.category === "วาล์ว" ? "valve" :
|
|
product.category === "ปั๊มและระบบน้ำ" ? "pump" :
|
|
product.category === "อุปกรณ์ปรับอากาศ" ? "ac" :
|
|
"fence"
|
|
}
|
|
>
|
|
<div class="aspect-square img-hover bg-neutral-100 overflow-hidden">
|
|
<img
|
|
src={product.image}
|
|
alt={product.name}
|
|
class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"
|
|
loading="lazy"
|
|
/>
|
|
</div>
|
|
<div class="p-4">
|
|
<span class="text-xs text-primary-600 font-medium">{product.category}</span>
|
|
<h3 class="font-semibold text-neutral-800 group-hover:text-primary-600 mt-1">{product.name}</h3>
|
|
</div>
|
|
</a>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CTA -->
|
|
<section class="py-16 bg-gradient-to-br from-primary-700 to-primary-600 text-white relative overflow-hidden">>
|
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
|
<h2 class="text-3xl font-bold mb-6">ต้องการสินค้าคุณภาพ ราคาโรงงาน?</h2>
|
|
<p class="text-lg text-primary-100 mb-8">ติดต่อเราวันนี้ 090-555-1415 หรือแอดไลน์ @JPPSELECTION</p>
|
|
<div class="flex flex-wrap justify-center gap-4">
|
|
<a href="/contact-us" class="bg-white text-primary-700 py-3 px-8 rounded-xl font-semibold hover:bg-primary-50 transition-colors">ติดต่อเรา</a>
|
|
<a href="https://line.me/ti/p/~JPPSELECTION" target="_blank" rel="noopener" class="bg-accent-500 hover:bg-accent-600 text-white py-3 px-8 rounded-xl font-semibold transition-colors">แอดไลน์</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const filterBtns = document.querySelectorAll('.filter-btn');
|
|
const productCards = document.querySelectorAll('.product-card');
|
|
|
|
filterBtns.forEach(btn => {
|
|
btn.addEventListener('click', () => {
|
|
const filter = btn.getAttribute('data-filter');
|
|
|
|
// Update active state
|
|
filterBtns.forEach(b => {
|
|
b.classList.remove('bg-primary-600', 'text-white', 'active');
|
|
b.classList.add('bg-neutral-100', 'text-neutral-700');
|
|
});
|
|
btn.classList.add('bg-primary-600', 'text-white', 'active');
|
|
btn.classList.remove('bg-neutral-100', 'text-neutral-700');
|
|
|
|
// Filter products with animation
|
|
productCards.forEach((card, index) => {
|
|
if (filter === 'all' || card.getAttribute('data-category') === filter) {
|
|
card.style.display = 'block';
|
|
card.style.animationDelay = `${index * 50}ms`;
|
|
card.classList.add('animate-fade-in');
|
|
} else {
|
|
card.style.display = 'none';
|
|
card.classList.remove('animate-fade-in');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
.animate-fade-in {
|
|
animation: fadeIn 0.4s ease-out forwards;
|
|
opacity: 0;
|
|
}
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(15px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
</style>
|
|
</BaseLayout> |