From fe442790ab84e373faef51a4ddaeead861cde63c Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 8 Jun 2026 22:56:52 +0700 Subject: [PATCH] feat(homepage): rework homepage + align about-us + footer popular products MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## homepage (index.astro) - Drop '500+ รายการสินค้า' from stat badges and rebuild the trust-badges section to show only 15+ ปีประสบการณ์, 400+ ลูกค้าทั่วประเทศ, 98% ลูกค้าพึงพอใจ — bigger numbers (text-5xl/6xl), no icons, counter animation - Add 'ทำไมเลือกเรา' section (4 cards: ส่งฟรี กทม./ปริมณฑล, Lead time 1-3 วัน, ราคาโรงงาน, ทีมช่างแนะนำ) — no icons, primary/accent border hover - Add 'หมวดสินค้า' section (8 tiles: 7 categories + 'สินค้าทั้งหมด') placed after 'สินค้าแนะนำ' — each tile is a real product photo with dark gradient overlay and a CTA link to /all-products?filter= - Reorder: Hero → ทำไมเลือกเรา → สินค้าแนะนำ → หมวดสินค้า → Stats → บทความล่าสุด → CTA ## all-products (filter from URL) - Script now reads ?filter= on load and applies it without rewriting the URL, then on click updates both the filter and the URL via history.replaceState so the back/forward buttons work ## footer (BaseLayout.astro) - Replace productLinks with the curated 6 popular products: ไทยพีพีอาร์, เทอร์โมเบรค, กริลแอร์, หัวจ่ายแอร์ Ball Jet, ท่อ HDPE, ท่อ Syler ## about-us - Stats: 10+/1000+/500+ replaced with 15+ / 400+ + counter animation, bigger numbers, rounded-3xl + shadow (matches home) - Why Choose Us: rebuilt with the same 4 cards + same style as home's 'ทำไมเลือกเรา' (no icons, pill header, larger h2 + subtitle) --- src/layouts/BaseLayout.astro | 10 +- src/pages/about-us.astro | 74 +++++------- src/pages/all-products.astro | 65 +++++++---- src/pages/index.astro | 217 +++++++++++++++++++++++++++++------ 4 files changed, 261 insertions(+), 105 deletions(-) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index aab2f07..40a2625 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -314,12 +314,12 @@ if (jsonLd) { } const productLinks = [ - { title: "ท่อพีพีอาร์", href: "/ท่อ-ppr-thai-ppr" }, + { title: "ไทยพีพีอาร์", href: "/ท่อ-ppr-thai-ppr" }, + { title: "เทอร์โมเบรค", href: "/เทอร์โมเบรค-thermobreak" }, + { title: "กริลแอร์", href: "/grilles" }, + { title: "หัวจ่ายแอร์ Ball Jet", href: "/หัวจ่าย-ball-jet" }, { title: "ท่อ HDPE", href: "/ท่อ-hdpe" }, - { title: "ท่อ UPVC", href: "/ท่อ-upvc" }, - { title: "เครื่องเชื่อมท่อ", href: "/เครื่องเชื่อม-hdpe" }, - { title: "วาล์ว", href: "/วาล์ว-valve" }, - { title: "ปั๊มน้ำ", href: "/water-pump" }, + { title: "ท่อ Syler", href: "/ท่อ-syler" }, ]; --- diff --git a/src/pages/about-us.astro b/src/pages/about-us.astro index 0e76ada..07867db 100644 --- a/src/pages/about-us.astro +++ b/src/pages/about-us.astro @@ -122,20 +122,20 @@ import BaseLayout from '@/layouts/BaseLayout.astro'; -
+
-
-
-
10+
-
ปีประสบการณ์
+
+
+

+ 0+ +

+

ปีประสบการณ์

-
-
1000+
-
โปรเจคสำเร็จ
-
-
-
500+
-
สินค้าในคลัง
+
+

+ 0+ +

+

ลูกค้าทั่วประเทศ

@@ -145,44 +145,26 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-

ทำไมต้องเลือกเรา

+ จุดเด่นของเรา +

ทำไมช่าง/ผู้รับเหมาเลือกเรา

+

ครบทั้งสินค้า บริการ และความเร็ว — เพื่อให้งานของคุณเดินหน้าไม่สะดุด

-
-
-
- - - -
-

คุณภาพสูง

-

สินค้าผ่านมาตรฐาน มอก. รับประกันคุณภาพ

+
+
+

ส่งฟรี กทม./ปริมณฑล

+

ส่งถึงไซต์งานฟรี ไม่ต้องวิ่งรับเอง ลดเวลา ลดต้นทุนขนส่ง

-
-
- - - -
-

ราคาโรงงาน

-

ราคาพิเศษ ราคาโรงงาน ไม่มีมาร์จิ้นกลาง

+
+

Lead time 1–3 วัน

+

สั่งวันนี้ ได้ของไว — ไม่ต้องรอ 1-2 สัปดาห์เหมือนเจ้าอื่น

-
-
- - - -
-

จัดส่งรวดเร็ว

-

สินค้าพร้อมส่ง จัดส่งภายใน 1-3 วัน

+
+

ราคาโรงงาน

+

ตรงจากผู้ผลิต ไม่ผ่านตัวกลาง คุณภาพเดียวกันในราคาที่ต่ำกว่า

-
-
- - - -
-

บริการดี

-

ให้คำปรึกษาฟรี ตอบคำถามทุกคำถาม

+
+

ทีมช่างแนะนำ

+

ส่งสเปกมา ช่วยเทียบยี่ห้อ ขนาด PN ฟรี — ไม่ต้องเดาว่าท่อตัวไหนใช่

diff --git a/src/pages/all-products.astro b/src/pages/all-products.astro index 7a9a5c9..e0eaa30 100644 --- a/src/pages/all-products.astro +++ b/src/pages/all-products.astro @@ -136,35 +136,58 @@ const categoryIdMap = Object.fromEntries(categories.map(c => [c.name, c.id]));
diff --git a/src/pages/index.astro b/src/pages/index.astro index 2914704..7015e20 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -129,6 +129,64 @@ const articles = (await getCollection('blog')).sort(
+ +
+
+ +
+ จุดเด่นของเรา +

ทำไมช่าง/ผู้รับเหมาเลือกเรา

+

ครบทั้งสินค้า บริการ และความเร็ว — เพื่อให้งานของคุณเดินหน้าไม่สะดุด

+
+ +
+ +
+
+ + + +
+

ส่งฟรี กทม./ปริมณฑล

+

ส่งถึงไซต์งานฟรี ไม่ต้องวิ่งรับเอง ลดเวลา ลดต้นทุนขนส่ง

+
+ + +
+
+ + + +
+

Lead time 1–3 วัน

+

สั่งวันนี้ ได้ของไว — ไม่ต้องรอ 1-2 สัปดาห์เหมือนเจ้าอื่น

+
+ + +
+
+ + + +
+

ราคาโรงงาน

+

ตรงจากผู้ผลิต ไม่ผ่านตัวกลาง คุณภาพเดียวกันในราคาที่ต่ำกว่า

+
+ + +
+
+ + + +
+

ทีมช่างแนะนำ

+

ส่งสเปกมา ช่วยเทียบยี่ห้อ ขนาด PN ฟรี — ไม่ต้องเดาว่าท่อตัวไหนใช่

+
+
+
+
+
@@ -247,18 +305,134 @@ const articles = (await getCollection('blog')).sort(
+ +
+ +
-
+
-
- - - -
-

+

0+

ปีประสบการณ์

@@ -266,38 +440,15 @@ const articles = (await getCollection('blog')).sort(
-
- - - -
-

- 0+ +

+ 0+

ลูกค้าทั่วประเทศ

-
- - - -
-

- 0+ -

-

รายการสินค้า

-
- - -
-
- - - -
-

+

0%

ลูกค้าพึงพอใจ