This commit is contained in:
Your Name committed 2026-07-13 20:04:23 -04:00
1 parent de09293051
commit d8cca4fcfe
7 files changed
+876 -1

No files matched your search

+109
View File
@@ -429,6 +429,115 @@ Acceptance criteria:
- ถ้าต้องการให้ MCP ใช้งานได้ ให้เพิ่ม guidance ใน `section-toolkit.ts`
- build ทั้ง website/spa/admin ผ่าน
## Example: StoryFeatureMosaic
`StoryFeatureMosaic` เป็น custom block สำหรับ layout แบบ story section:
```text
ข้อความซ้าย + รูปภาพ 3 ช่องกลาง + feature icons ด้านขวา
```
ใช้ component id:
```text
StoryFeatureMosaic
```
ตัวอย่าง payload:
```json
{
"componentId": "StoryFeatureMosaic",
"props": {
"title": {
"th": "เรื่องราวของปั้นคำหอม",
"en": "The Story of Pun-Kham-Hom",
"ja": "Pun-Kham-Homの物語",
"zh": "Pun-Kham-Hom 的故事",
"vi": "Câu chuyện của Pun-Kham-Hom",
"ko": "Pun-Kham-Hom 이야기"
},
"subtitle": {
"th": "จากความหอม...สู่ความสุขในทุกคำ",
"en": "From fragrance to happiness in every bite",
"ja": "香りから、一口ごとの幸せへ",
"zh": "从香气到每一口的幸福",
"vi": "Từ hương thơm đến niềm vui trong từng miếng bánh",
"ko": "향기로움에서 한 입의 행복까지"
},
"description": {
"th": "เราเริ่มต้นจากความรักในขนมไทยและเบเกอรี่ คัดสรรวัตถุดิบคุณภาพดี ปรุงด้วยความพิถีพิถัน ผสานภูมิปัญญาไทยเข้ากับความร่วมสมัย เพื่อส่งต่อความหอมและความสุขในทุกช่วงเวลาที่ได้แบ่งปัน",
"en": "We began with a love for Thai desserts and bakery, carefully selecting quality ingredients and blending Thai craft with a modern touch.",
"ja": "私たちはタイ菓子とベーカリーへの愛から始まり、厳選した素材と丁寧な手仕事で、伝統と現代らしさを重ねています。",
"zh": "我们从对泰式甜点与烘焙的热爱出发,精选优质食材,以细致工艺融合泰式智慧与现代风格。",
"vi": "Chúng tôi bắt đầu từ tình yêu dành cho bánh Thái và bánh nướng, chọn lọc nguyên liệu chất lượng và kết hợp tinh hoa Thái với phong cách hiện đại.",
"ko": "태국 디저트와 베이커리에 대한 애정에서 시작해 좋은 재료와 정성스러운 손길로 전통과 현대적인 감각을 담았습니다."
},
"buttonText": {
"th": "อ่านเพิ่มเติม",
"en": "Read More",
"ja": "もっと読む",
"zh": "了解更多",
"vi": "Đọc thêm",
"ko": "더 보기"
},
"buttonHref": "/about",
"images": [
{
"imageUrl": "https://example.com/story-dessert.jpg",
"alt": {
"th": "การทำขนมไทย",
"en": "Thai dessert preparation"
}
},
{
"imageUrl": "https://example.com/story-bakery.jpg",
"alt": {
"th": "ขนมปังอบใหม่",
"en": "Fresh bakery"
}
},
{
"imageUrl": "https://example.com/story-team.jpg",
"alt": {
"th": "ทีมงานปั้นคำหอม",
"en": "Pun-Kham-Hom team"
}
}
],
"features": [
{
"icon": "leaf",
"title": {
"th": "คัดสรรวัตถุดิบคุณภาพดี",
"en": "Quality ingredients"
}
},
{
"icon": "cake",
"title": {
"th": "ทำสดใหม่ทุกวัน",
"en": "Fresh daily"
}
},
{
"icon": "heart",
"title": {
"th": "ใส่ใจในทุกรายละเอียด",
"en": "Made with care"
}
}
]
}
}
```
Icon ที่รองรับตอนนี้:
```text
leaf, cake, fresh, heart, care, sparkles, premium, check
```
## Common Mistakes
1. `componentId` ไม่ตรงกับ registry key