From a1b1b1628879119874a30369976c2ee484195323 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Wed, 10 Jun 2026 09:55:50 +0700 Subject: [PATCH] feat(portfolio): move what_we_did to hover overlay + show 4 specific clients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per user spec: 1. Home portfolio now shows only 4 specific clients in order: Dataroot → Jet Industries → ทวนทอง 99 → สำนักงานกฎหมาย ตถาตา (was filtering by featured: true, now filters by slug) 2. PortfolioCard: what_we_did moved from always-visible to yellow hover overlay (shown above "เยี่ยมชมเว็บไซต์" button). All cards now have uniform layout: - Default: image + name + industry + category + result - On hover (desktop): overlay shows what_we_did text + visit button - No hover effect on mobile (tap navigates to URL) 3. Added what_we_did + result to 3 cards that were missing them: - Jet Industries, ทวนทอง 99, สำนักงานกฎหมาย ตถาตา Co-Authored-By: Claude --- src/components/PortfolioCard.astro | 13 ++++++++++++- src/content/portfolio/jet-industries.md | 17 +++++++++-------- src/content/portfolio/lawyernoom.md | 17 +++++++++-------- src/content/portfolio/tuanthong.md | 17 +++++++++-------- src/pages/index.astro | 7 ++++++- 5 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/components/PortfolioCard.astro b/src/components/PortfolioCard.astro index ba0c68a..fec3ab7 100644 --- a/src/components/PortfolioCard.astro +++ b/src/components/PortfolioCard.astro @@ -22,6 +22,7 @@ const { name, url, category, category_label, industry, thumbnail, description, w
{name}
+ {what_we_did &&

{what_we_did}

} เยี่ยมชมเว็บไซต์ @@ -34,7 +35,6 @@ const { name, url, category, category_label, industry, thumbnail, description, w {industry && {industry}} {category_label}

{name}

- {what_we_did &&

{what_we_did}

} {result &&

→ {result}

} {!what_we_did && description &&

{description}

}
@@ -84,8 +84,11 @@ const { name, url, category, category_label, industry, thumbnail, description, w inset: 0; background: rgba(254, 212, 0, 0.95); display: flex; + flex-direction: column; align-items: center; justify-content: center; + gap: 20px; + padding: 24px; opacity: 0; transition: opacity 0.3s ease; } @@ -94,6 +97,14 @@ const { name, url, category, category_label, industry, thumbnail, description, w opacity: 1; } + .overlay-did { + font-size: 13px; + line-height: 1.6; + color: var(--color-black); + text-align: center; + max-width: 280px; + } + .visit-btn { display: inline-flex; align-items: center; diff --git a/src/content/portfolio/jet-industries.md b/src/content/portfolio/jet-industries.md index 7ee4330..bffebff 100644 --- a/src/content/portfolio/jet-industries.md +++ b/src/content/portfolio/jet-industries.md @@ -1,11 +1,12 @@ --- -name: Jet Industries -url: https://jetindustries.co.th +name: "Jet Industries" +url: "https://jetindustries.co.th" category: webdev -category_label: พัฒนาเว็บไซต์ -industry: 🏭 โรงงาน -thumbnail: /images/portfolio/jetindustries.png -description: ผู้ผลิตพลาสติกฉีดขึ้นรูปอย่างแม่นยำ (Precision Plastic Injection Molding) มีประสบการณ์กว่า 40 ปี -what_we_did: ออกแบบเว็บ B2B + SEO เทคนิค + Multi-language (TH/EN/JP) -result: ลูกค้าจากญี่ปุ่นและออสเตรเลียติดต่อเข้ามา 5–8 ราย/เดือน +category_label: "พัฒนาเว็บไซต์" +industry: "โรงงาน / B2B" +what_we_did: "ออกแบบ + พัฒนาเว็บไซต์ B2B ทันสมัย พร้อมระบบขอใบเสนอราคา" +result: "เว็บไซต์ที่สื่อสารตรงกับกลุ่มลูกค้า B2B สมัครใช้งานง่ายขึ้น" +thumbnail: "/images/portfolio/jetindustries.png" +featured: true +order: 18 --- diff --git a/src/content/portfolio/lawyernoom.md b/src/content/portfolio/lawyernoom.md index e86fe22..18bdaba 100644 --- a/src/content/portfolio/lawyernoom.md +++ b/src/content/portfolio/lawyernoom.md @@ -1,11 +1,12 @@ --- -name: สำนักงานกฎหมาย ตถาตา -url: https://lawyernoom.com +name: "สำนักงานกฎหมาย ตถาตา" +url: "https://lawyernoom.com" category: webdev -category_label: พัฒนาเว็บไซต์ -industry: ⚖️ สำนักงานกฎหมาย -thumbnail: /images/portfolio/lawyernoom.png -description: สำนักงานกฎหมายโดย ทนายความ คมสัน ศรีวนิชย์ - บริการด้านคดีความ คดีแพ่ง คดีอาญา -what_we_did: เว็บไซต์มาตรฐาน + SEO คีย์เวิร์ด "ทนายความ" ในจังหวัด -result: ติดหน้า 1 Google ใน 4 เดือน ลูกค้าโทรเข้ามา 10+ ราย/เดือน +category_label: "พัฒนาเว็บไซต์" +industry: "สำนักงานกฎหมาย" +what_we_did: "ออกแบบเว็บไซต์สำนักงานกฎหมาย น่าเชื่อถือ + SEO ท้องถิ่น + ระบบนัดหมาย" +result: "เว็บไซต์มืออาชีพที่สร้างความเชื่อมั่นให้ลูกความ" +thumbnail: "/images/portfolio/lawyernoom.png" +featured: true +order: 17 --- diff --git a/src/content/portfolio/tuanthong.md b/src/content/portfolio/tuanthong.md index 7c3fb9c..b7b81de 100644 --- a/src/content/portfolio/tuanthong.md +++ b/src/content/portfolio/tuanthong.md @@ -1,11 +1,12 @@ --- -name: ทวนทอง 99 -url: https://tuanthong99.com +name: "ทวนทอง 99" +url: "https://tuanthong99.com" category: ecommerce -category_label: อีคอมเมิร์ซ -industry: 🛒 E-commerce -thumbnail: /images/portfolio/tuanthong.png -description: ร้านค้าออนไลน์สมุนไพรไทยคุณภาพสูง -what_we_did: เว็บไซต์ + ระบบสั่งซื้อ + ผูก Facebook Pixel -result: ROAS โฆษณาเฉลี่ย 4.8 เท่า +category_label: "อีคอมเมิร์ซ" +industry: "สินค้าอุปโภคบริโภค" +what_we_did: "พัฒนาเว็บไซต์ขายของออนไลน์ + ระบบตะกร้า + จัดการสินค้าด้วยตัวเอง" +result: "เว็บไซต์ขายสินค้าอุปโภคบริโภค ดูแลเองได้ สะดวกรวดเร็ว" +thumbnail: "/images/portfolio/tuanthong.png" +featured: true +order: 11 --- diff --git a/src/pages/index.astro b/src/pages/index.astro index 1774629..873d764 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -69,7 +69,12 @@ const dedupedServices = (() => { })(); const portfolio = await getCollection('portfolio'); -const featuredPortfolio = portfolio.filter(p => p.data.featured).slice(0, 4); +const featuredPortfolio = portfolio.filter(p => + ['dataroot', 'jet-industries', 'tuanthong', 'lawyernoom'].includes(p.id) +).sort((a, b) => { + const order = ['dataroot', 'jet-industries', 'tuanthong', 'lawyernoom']; + return order.indexOf(a.id) - order.indexOf(b.id); +}); ---