From 6d3b13d3602158aa5d1ccbdced0d5d7ae16851bf Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 28 Sep 2026 07:45:46 +0700 Subject: [PATCH] x --- .../src/components/page-builder/HeroForm.tsx | 143 +++++++++++- apps/backend/src/routes/pages.ts | 1 + apps/spa/src/components/DynamicHero.tsx | 217 +++++++++++++++--- .../dynamic/DynamicPageRenderer.tsx | 185 +++++++++++++-- packages/types/index.ts | 20 +- 5 files changed, 502 insertions(+), 64 deletions(-) diff --git a/apps/admin/src/components/page-builder/HeroForm.tsx b/apps/admin/src/components/page-builder/HeroForm.tsx index 85cc5e9..bec3e6a 100644 --- a/apps/admin/src/components/page-builder/HeroForm.tsx +++ b/apps/admin/src/components/page-builder/HeroForm.tsx @@ -1,4 +1,4 @@ -import { UploadCloud, Image as ImageIcon } from 'lucide-react'; +import { UploadCloud, Image as ImageIcon, Monitor, Smartphone, RotateCcw } from 'lucide-react'; import { type PageSection } from '@homaroma/types'; import FocalPointPicker from './FocalPointPicker'; @@ -12,6 +12,18 @@ interface HeroFormProps { setIsMediaModalOpen: (open: boolean) => void; } +const GRID_POSITIONS = [ + { id: 'top-left', label: 'Top Left (บนซ้าย)', short: 'TL', icon: '↖' }, + { id: 'top-center', label: 'Top Center (บนกลาง)', short: 'TC', icon: '↑' }, + { id: 'top-right', label: 'Top Right (บนขวา)', short: 'TR', icon: '↗' }, + { id: 'center-left', label: 'Center Left (กลางซ้าย)', short: 'CL', icon: '←' }, + { id: 'center', label: 'Center (กึ่งกลาง)', short: 'C', icon: '•' }, + { id: 'center-right', label: 'Center Right (กลางขวา)', short: 'CR', icon: '→' }, + { id: 'bottom-left', label: 'Bottom Left (ล่างซ้าย)', short: 'BL', icon: '↙' }, + { id: 'bottom-center', label: 'Bottom Center (ล่างกลาง)', short: 'BC', icon: '↓' }, + { id: 'bottom-right', label: 'Bottom Right (ล่างขวา)', short: 'BR', icon: '↘' }, +]; + export default function HeroForm({ editingSection, getLocalizedValue, @@ -59,35 +71,35 @@ export default function HeroForm({ )}
- + updateLocalizedValue('tagline', e.target.value)} + placeholder="เว้นว่างได้หากไม่ต้องการแสดง" className="admin-input w-full" />
- + updateLocalizedValue('title', e.target.value)} + placeholder="เว้นว่างได้หากไม่ต้องการแสดง" className="admin-input w-full" />

Use [brackets] for golden accent serif text (e.g. Inhale [Serenity]).

- +