refactor(hero): rewrite 9 product hero sections to canonical template

- Extract data from each page (pill, title, image, features, hasPricelist)
- Generate hero from canonical template (text-LEFT, image-RIGHT, animated bg)
- Remove dead <Header slot=Footer slot= StickyBottomCTA slots (BaseLayout renders defaults)
- Remove dead data-price-button when id="pricelist" missing (auto-detect hides it)
- Drop legacy justify-center/max-w-md workarounds; use canonical classes
- Apply consistent TEXT-LEFT order across all product heroes
- Drop unused mobile-only sections in ตู้ดับเพลิง (page now follows template)
- Add overflow-x-clip on header/footer (submenu overflow fix)
- Add .submenu-anchor class for submenu positioning

Verified: 9 pages render with valid HTML, TEXT-LEFT, correct features, no dead links.
This commit is contained in:
Kunthawat Greethong
2026-06-10 08:16:06 +07:00
parent d7aa7c2013
commit d8ff358dd7
10 changed files with 387 additions and 454 deletions

View File

@@ -1,8 +1,5 @@
---
import BaseLayout from '@/layouts/BaseLayout.astro';
import Header from '@/components/common/Header.astro';
import Footer from '@/components/common/Footer.astro';
import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
---
<BaseLayout title="ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง - ดีล พลัส เทค" description="ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง ครบอย่างจบในที่เดียว รับปรึกษาแล้วให้คำแนะนำได้ ไม่ว่าจะติดตั้งที่ไหน เราให้คำตอบคุณได้เสมอ ดีล พลัส เทค"
@@ -17,105 +14,90 @@ import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
{ question: 'ถังดับเพลิงชนิดไหนเหมาะกับห้องเซิร์ฟเวอร์?', answer: 'ห้องเซิร์ฟเวอร์และห้องที่มีอุปกรณ์ไฟฟ้ามากควรใช้ถังดับเพลิงชนิด CO2 หรือผงเคมีแห้ง เพราะไม่ทำลายอุปกรณ์และปลอดภัยสำหรับไฟฟ้า ห้ามใช้ถังดับเพลิงชนิดน้ำเด็ดขาด' },
{ question: 'การติดตั้งระบบดับเพลิงมีข้อกำหนดอะไรบ้าง?', answer: 'การติดตั้งต้องปฏิบัติตามกฎหมายควบคุมอาคารและมาตรฐาน มอก. โดยอาคารประเภทต่างๆ มีข้อกำหนดแตกต่างกัน เช่น โรงแรม โรงงาน ห้างสรรพสินค้าต้องมีระบบดับเพลิงที่ครบถ้วนตามขนาดและการใช้งาน' },
{ question: 'บริษัทของเราให้บริการติดตั้งและบำรุงรักษาตู้ดับเพลิงหรือไม่?', answer: 'ใช่ บริษัท ดีล พลัส เทค ให้บริการครบวงจร ตั้งแต่ให้คำปรึกษา ออกแบบระบบ จัดหาและติดตั้งตู้ดับเพลิง พร้อมทั้งบริการตรวจสอบและบำรุงรักษาตามมาตรฐาน ติดต่อสอบถามรายละเอียดได้ที่ Line @JPPSELECTION' },
]}>
<Header slot="header" />
]}> <main class="bg-white min-h-screen">
<!-- Hero Section -->
<section class="relative bg-gradient-to-br from-primary-800 via-primary-700 to-primary-900 text-white py-16 lg:py-24 overflow-hidden">
<main class="bg-white min-h-screen pb-24 md:pb-0">
<!-- Mobile: Full-width Hero Image -->
<section class="md:hidden">
<div class="w-full aspect-square bg-gray-100">
<img src="/images/products-cropped/extinguishers_000C.jpg" alt="ตู้ดับเพลิง" class="w-full h-full object-cover" width="600" height="600" loading="eager" fetchpriority="high" onerror="this.src='/images/logo/dealplustech-logo.svg'" />
</div>
</section>
<!-- 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>
<!-- Product Info Section -->
<section class="px-4 py-6 md:px-0 md:py-0">
<!-- Mobile: Stacked Content -->
<div class="md:hidden">
<h1 class="text-2xl font-bold text-slate-900 mb-2">ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง</h1>
<p class="text-base text-slate-600 mb-6 leading-relaxed">ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง ครบอย่างจบในที่เดียว รับปรึกษาแล้วให้คำแนะนำได้ ไม่ว่าจะติดตั้งที่ไหน เราให้คำตอบคุณได้เสมอ ดีล พลัส เทค</p>
<div class="space-y-2 mb-6">
<div class="flex items-center gap-2 text-slate-700">
<svg class="w-5 h-5 text-emerald-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span>คุณภาพสูง มาตรฐานอุตสาหกรรม</span>
</div>
<div class="flex items-center gap-2 text-slate-700">
<svg class="w-5 h-5 text-emerald-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span>ราคาโรงงาน คุ้มค่า</span>
</div>
<div class="flex items-center gap-2 text-slate-700">
<svg class="w-5 h-5 text-emerald-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span>จัดส่งรวดเร็ว ส่งฟรี กทม. ปริมณฑล</span>
</div>
</div>
</div>
<!-- Floating Particles -->
<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>
<!-- Desktop: Side-by-side (Hero Section) -->
<div class="hidden md:block bg-gradient-to-br from-primary-700 to-primary-600">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
<div class="grid lg:grid-cols-2 gap-12 items-start">
<div class="lg:sticky lg:top-24">
<div class="rounded-2xl overflow-hidden bg-white/10 p-2">
<img src="/images/products-cropped/extinguishers_000C.jpg" alt="ตู้ดับเพลิง" class="w-full h-auto rounded-xl" width="600" height="400" loading="eager" fetchpriority="high" decoding="sync" onerror="this.src='/images/logo/dealplustech-logo.svg'" />
<!-- Water-inspired Waves -->
<svg class="absolute bottom-0 left-0 w-full h-[250px] opacity-20" viewBox="0 0 1440 250" preserveAspectRatio="none">
<path d="M0,150 Q360,50 720,150 T1440,150 L1440,250 L0,250 Z" fill="none" stroke="url(#water-gradient-hero)" stroke-width="2">
<animate attributeName="d" dur="10s" repeatCount="indefinite" values="M0,150 Q360,50 720,150 T1440,150 L1440,250 L0,250 Z;M0,180 Q360,80 720,180 T1440,180 L1440,250 L0,250 Z;M0,150 Q360,50 720,150 T1440,150 L1440,250 L0,250 Z"/>
</path>
<defs>
<linearGradient id="water-gradient-hero" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#40916c"/>
<stop offset="50%" stop-color="#74c69d"/>
<stop offset="100%" stop-color="#40916c"/>
</linearGradient>
</defs>
</svg>
<!-- Second Wave Layer -->
<svg class="absolute bottom-0 left-0 w-full h-[200px] opacity-10" viewBox="0 0 1440 200" preserveAspectRatio="none">
<path d="M0,100 Q240,200 480,100 T960,100 T1440,100 L1440,200 L0,200 Z" fill="none" stroke="rgba(255,255,255,0.3)" stroke-width="1">
<animate attributeName="d" dur="15s" repeatCount="indefinite" values="M0,100 Q240,200 480,100 T960,100 T1440,100 L1440,200 L0,200 Z;M0,120 Q240,20 480,120 T960,120 T1440,120 L1440,200 L0,200 Z;M0,100 Q240,200 480,100 T960,100 T1440,100 L1440,200 L0,200 Z"/>
</path>
</svg>
</div>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
<div class="grid lg:grid-cols-2 gap-12 items-start">
<div>
<span class="inline-block px-4 py-1.5 bg-white/20 text-white rounded-full text-sm font-medium mb-4">ตู้ดับเพลิง</span>
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-bold mb-4">ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง</h1>
<p class="text-lg text-primary-100 mb-8 leading-relaxed">
ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง ครบอย่างจบในที่เดียว รับปรึกษาแล้วให้คำแนะนำได้ ไม่ว่าจะติดตั้งที่ไหน เราให้คำตอบคุณได้เสมอ ดีล พลัส เทค
</p>
<div class="flex flex-wrap justify-center gap-6 mb-8 lg:justify-start">
<div class="flex items-start gap-2 text-white">
<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="M5 13l4 4L19 7" />
</svg>
<span>คุณภาพสูง มาตรฐานอุตสาหกรรม</span>
</div>
<div class="flex items-start gap-2 text-white">
<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="M5 13l4 4L19 7" />
</svg>
<span>ราคาโรงงาน คุ้มค่า</span>
</div>
<div class="flex items-start gap-2 text-white">
<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="M5 13l4 4L19 7" />
</svg>
<span>จัดส่งรวดเร็ว ส่งฟรี กทม. ปริมณฑล</span>
</div>
<div class="flex items-start gap-2 text-white">
<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="M5 13l4 4L19 7" />
</svg>
<span>รับประกันสินค้า</span>
</div>
</div>
<div>
<span class="inline-block px-4 py-1.5 bg-white/20 text-white rounded-full text-sm font-medium mb-4">
ตู้ดับเพลิง
</span>
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4">ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง</h1>
<p class="text-lg sm:text-xl text-white/80 mb-8 leading-relaxed">
ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง ครบอย่างจบในที่เดียว รับปรึกษาแล้วให้คำแนะนำได้ ไม่ว่าจะติดตั้งที่ไหน เราให้คำตอบคุณได้เสมอ ดีล พลัส เทค
</p>
<div class="flex flex-wrap gap-4 mb-8">
<a href="https://line.me/ti/p/~JPPSELECTION" target="_blank" class="bg-accent-500 hover:bg-accent-600 text-white py-3 px-6 rounded-xl font-semibold flex items-center gap-2">
<div class="flex flex-wrap justify-center gap-4 mb-8 lg:justify-start">
<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-6 rounded-xl font-semibold flex items-center gap-2">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.344.282-.629.627-.629h2.386c.349 0 .63.285.63.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.629.63-.629.345 0 .63.284.63.629v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.629.627-.629.349 0 .631.284.631.629v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.629.63-.629.348 0 .63.284.63.629v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314"/></svg>
<span>แชท Line</span>
แชท Line
</a>
<a href="tel:0905551415" class="bg-white text-primary-700 hover:bg-primary-50 py-3 px-6 rounded-xl font-semibold flex items-center gap-2">
<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"/>
<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>
090-555-1415
</a>
<a href="#pricelist" data-price-button class="hidden bg-white text-primary-700 hover:bg-primary-50 py-3 px-6 rounded-xl font-semibold flex items-center gap-2">
<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="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
<span>ราคาสินค้า</span>
</a>
</div><div class="space-y-4">
<div class="flex items-start space-x-3">
<svg class="w-6 h-6 text-white mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span class="text-lg text-white/80">คุณภาพสูง มาตรฐานอุตสาหกรรม</span>
</div>
<div class="flex items-start space-x-3">
<svg class="w-6 h-6 text-white mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span class="text-lg text-white/80">ราคาโรงงาน คุ้มค่า</span>
</div>
<div class="flex items-start space-x-3">
<svg class="w-6 h-6 text-white mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span class="text-lg text-white/80">จัดส่งรวดเร็ว ส่งฟรี กทม. ปริมณฑล</span>
</div>
<div class="flex items-start space-x-3">
<svg class="w-6 h-6 text-white mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
<span class="text-lg text-white/80">รับประกันสินค้า</span>
</div>
</div>
</div>
</div>
<div class="lg:sticky lg:top-24">
<div class="rounded-2xl overflow-hidden bg-white/10 p-2 max-w-md mx-auto lg:max-w-none">
<img src="/images/products-cropped/extinguishers_000C.jpg" alt="ตู้ดับเพลิง ตู้ดับเพลิงเก็บเครื่องดับเพลิง" class="w-full max-w-md mx-auto lg:max-w-none" loading="eager" />
</div>
</div>
</div>
@@ -413,7 +395,5 @@ import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
</div>
</section>
</main>
<Footer slot="footer" />
<StickyBottomCTA phone="0905551415" lineUrl="https://line.me/ti/p/~JPPSELECTION" slot="after-footer" />
</BaseLayout>
</main>
</BaseLayout>