fix: Update homepage categories, product images, all-products page, mobile fixes
This commit is contained in:
188
src/pages/all-products/index.astro
Normal file
188
src/pages/all-products/index.astro
Normal file
@@ -0,0 +1,188 @@
|
||||
---
|
||||
import BaseLayout from '@/layouts/BaseLayout.astro';
|
||||
import Header from '@/components/common/Header.astro';
|
||||
import Footer from '@/components/common/Footer.astro';
|
||||
|
||||
const productCategories = [
|
||||
{
|
||||
name: 'ท่อ | Pipe',
|
||||
slug: '/pipe',
|
||||
image: '/images/products-cropped/foot-ppr1.jpg',
|
||||
products: [
|
||||
{ name: 'ท่อ PPR', slug: '/ท่อ-ppr-thai-ppr' },
|
||||
{ name: 'ท่อ PPR ตราช้าง', slug: '/ท่อพีพีอาร์ตราช้าง' },
|
||||
{ name: 'ท่อ PP-R Poloplast', slug: '/pp-r-pp-rct-poloplast' },
|
||||
{ name: 'ท่อ HDPE', slug: '/ท่อhdpe' },
|
||||
{ name: 'ท่อ UPVC', slug: '/ท่อ-upvc' },
|
||||
{ name: 'ท่อไซเลอร์', slug: '/ท่อไซเลอร์' },
|
||||
{ name: 'ท่อ PVC', slug: '/ท่อและข้อต่อpvc' },
|
||||
{ name: 'ท่อระบายน้ำ 3 ชั้น', slug: '/ท่อระบายน้ำ-3-ชั้น-ไซเลนท' },
|
||||
{ name: 'ท่อพีพีอาร์', slug: '/ท่อพีพีอาร์' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'เครื่องเชื่อมท่อ',
|
||||
slug: '/เครื่องเชื่อมท่อ-pipe-coupling-machine',
|
||||
image: '/images/products-cropped/pipe-coupling-machine_000.jpg',
|
||||
products: [
|
||||
{ name: 'เครื่องเชื่อม HDPE', slug: '/เครื่องเชื่อม-hdpe' },
|
||||
{ name: 'เครื่องเชื่อม PPR', slug: '/เครื่องเชื่อมท่อพีพีอา' },
|
||||
{ name: 'กรู๊ฟท่อ', slug: '/groove-coupling' },
|
||||
{ name: 'Pipe Coupling', slug: '/pipe-coupling' },
|
||||
{ name: 'Dukelarrsen', slug: '/dukelarrsen' },
|
||||
{ name: 'เม็กกรู๊ฟ', slug: '/เม็กกรู๊ฟ-คับปลิ้ง' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'แฮงเกอร์ แคล้ม โบลท์',
|
||||
slug: '/แฮงเกอร์-แคล้ม-โบลท์-แหว',
|
||||
image: '/images/products-cropped/Hanger-Clamp-Bolt_000.jpg',
|
||||
products: [
|
||||
{ name: 'สปริทริงแฮงเกอร์', slug: '/สปริทริงแฮงเกอร์-sr19-adjustable-split-ring-hanger' },
|
||||
{ name: 'เควิสแฮงเกอร์', slug: '/เควิสแฮงเกอร์' },
|
||||
{ name: 'แคล้มประกับ', slug: '/แคล้มประกับ-ชุบรุ้ง-ชุบ' },
|
||||
{ name: 'แคล้มฟันจระเข้', slug: '/แคล้มฟันจระเข้-beam-clamp' },
|
||||
{ name: 'แคล้มหยดน้ำ', slug: '/แคล้มหยดน้ำ-adjustable-band-hanger' },
|
||||
{ name: 'แคล้มเลเวล', slug: '/แคล้มเลเวล-level-clamp' },
|
||||
{ name: 'ยูโบลท์', slug: '/ยูโบลท์-u-bolt' },
|
||||
{ name: 'ยูโบลท์ ประกับ', slug: '/ยูโบลท์-ประกับ-u-bolt-clamp' },
|
||||
{ name: 'ยูโบลท์เหล็กแผ่น', slug: '/ยูโบลท์เหล็กแผ่น-ยูแบน-strap' },
|
||||
{ name: 'เจโบลท์ แอลโบลท์', slug: '/เจโบลท์-แอลโบลท์-j-bolt-l-bolt' },
|
||||
{ name: 'น็อต แหวน สกรู', slug: '/น็อต-แหวน-สกรู-hex-nut-flat-washer-hexagon-head-screw' },
|
||||
{ name: 'พุกต่างๆ', slug: '/พุกต่างๆ' },
|
||||
{ name: 'พุกเหล็ก', slug: '/พุกเหล็ก-sleeve-anchor-bolt' },
|
||||
{ name: 'สตัดเกลียวตลอด', slug: '/สตัดเกลียวตลอด-เหล็ก-threaded-rod' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'วาล์ว | Valve',
|
||||
slug: '/วาล์ว-valve',
|
||||
image: '/images/products-cropped/valve_000C.jpg',
|
||||
products: [
|
||||
{ name: 'วาล์ว', slug: '/วาล์ว-valve' },
|
||||
{ name: 'DURGO วาล์วเติมอากาศ', slug: '/durgo-avvs' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'ปั๊มน้ำ',
|
||||
slug: '/water-pump',
|
||||
image: '/images/products-cropped/water-pump_000C.jpg',
|
||||
products: [
|
||||
{ name: 'ปั๊มน้ำ', slug: '/water-pump' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'อุปกรณ์ปรับอากาศ',
|
||||
slug: '/หัวจ่ายแอร์-ball-jet',
|
||||
image: '/images/products-cropped/Eye-Ball.jpg',
|
||||
products: [
|
||||
{ name: 'หัวจ่ายแอร์', slug: '/หัวจ่ายแอร์-ball-jet' },
|
||||
{ name: 'กริลแอร์', slug: '/grilles' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'อุปกรณ์ดับเพลิง',
|
||||
slug: '/อุปกรณ์ดับเพลิง',
|
||||
image: '/images/products-cropped/extinguishers_000C.jpg',
|
||||
products: [
|
||||
{ name: 'อุปกรณ์ดับเพลิง', slug: '/อุปกรณ์ดับเพลิง' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'ฉนวนหุ้มท่อ',
|
||||
slug: '/ฉนวนหุ้มท่อ-pipe-insulation',
|
||||
image: '/images/products-cropped/Thermobreak_-LS_0.png',
|
||||
products: [
|
||||
{ name: 'ฉนวนหุ้มท่อ', slug: '/ฉนวนหุ้มท่อ-pipe-insulation' },
|
||||
{ name: 'เทอร์โมเบรค', slug: '/เทอร์โมเบรค-thermobreak' },
|
||||
{ name: 'Realflex', slug: '/realflex' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'ระบบกรองน้ำ',
|
||||
slug: '/water-treatment',
|
||||
image: '/images/products-cropped/water-treatment_000C.jpg',
|
||||
products: [
|
||||
{ name: 'ระบบกรองน้ำ', slug: '/water-treatment' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'รั้วและระบบรั้ว',
|
||||
slug: '/ระบบรั้ว',
|
||||
image: '/images/products-cropped/vineman_000C.jpg',
|
||||
products: [
|
||||
{ name: 'ระบบรั้ว', slug: '/ระบบรั้ว' },
|
||||
{ name: 'ระบบรั้วไวน์แมน', slug: '/ระบบรั้วไวน์แมน-vineman-2' },
|
||||
{ name: 'รั้วเทวดา', slug: '/รั้วเทวดา' },
|
||||
]
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<BaseLayout title="สินค้าทั้งหมด | All Products" description="สินค้าทั้งหมด ของ บริษัท ดีล พลัส เทค จำกัด ผู้เชี่ยวชาญด้านระบบน้ำ">
|
||||
<Header slot="header" />
|
||||
|
||||
<main class="px-4 sm:px-6 lg:px-8 bg-white min-h-screen">
|
||||
<section id="all-products" class="section">
|
||||
<div class="container-custom">
|
||||
<div class="text-center mb-12">
|
||||
<h1 class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-secondary-900 mb-4">สินค้าทั้งหมด</h1>
|
||||
<p class="text-base sm:text-lg text-secondary-600 max-w-2xl mx-auto">
|
||||
รวมสินค้าคุณภาพสูงของเราทั้งหมด จำหน่ายท่อ PPR ตราช้าง ท่อพีพีอาร์ ท่อ HDPE รั้วตาข่าย และอุปกรณ์ระบบน้ำครบวงจร
|
||||
</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">
|
||||
<div class="bg-green-600 px-6 py-4">
|
||||
<h3 class="text-xl font-bold text-white">{category.name}</h3>
|
||||
</div>
|
||||
<div class="p-6 bg-white">
|
||||
<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">
|
||||
<span class="text-sm sm:text-base text-secondary-700 font-medium">{product.name}</span>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-12 text-center">
|
||||
<p class="text-lg text-secondary-600 mb-6">ติดต่อเราเพื่อรับคำแนะนำและราคาพิเศษ</p>
|
||||
<div class="flex flex-wrap justify-center gap-4">
|
||||
<a href="https://line.me/ti/p/~dealplustech" target="_blank" class="inline-flex items-center space-x-2 bg-white border-2 border-[#06C755] text-[#06C755] hover:bg-[#06C755] hover:text-white px-8 py-4 rounded-xl font-medium transition-all hover:shadow-lg active:scale-95 text-lg">
|
||||
<img src="/images/line-icon.png" alt="Line" class="w-5 h-5 line-icon" />
|
||||
<span>แชท Line</span>
|
||||
</a>
|
||||
<a href="tel:0905551415" class="inline-flex items-center space-x-2 bg-green-600 hover:bg-green-700 text-white px-8 py-4 rounded-xl font-medium transition-all hover:shadow-lg active:scale-95 text-lg">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/></svg>
|
||||
<span>090-555-1415</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<Footer slot="footer" />
|
||||
</BaseLayout>
|
||||
Reference in New Issue
Block a user