@ecomcx/ecomweb-editor 1.31.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/locales/en/attrs.ts +10 -0
- package/src/locales/en/background.ts +17 -0
- package/src/locales/en/block-desc.ts +1 -0
- package/src/locales/en/block-style.ts +7 -4
- package/src/locales/en/block-titles.ts +1 -0
- package/src/locales/en/blocks.ts +10 -2
- package/src/locales/en/columns.ts +12 -0
- package/src/locales/en/controls.ts +21 -0
- package/src/locales/en/hints.ts +215 -1
- package/src/locales/en/index.ts +5 -2
- package/src/locales/en/layout.ts +32 -0
- package/src/locales/en/legacy.ts +1 -1
- package/src/locales/en/library.ts +38 -0
- package/src/locales/en/parts.ts +12 -0
- package/src/locales/en/placeholders.ts +9 -1
- package/src/locales/en/presets.ts +6 -0
- package/src/locales/en/v2.ts +21 -0
- package/src/locales/vi/attrs.ts +10 -0
- package/src/locales/vi/background.ts +17 -0
- package/src/locales/vi/block-desc.ts +1 -0
- package/src/locales/vi/block-style.ts +7 -4
- package/src/locales/vi/block-titles.ts +1 -0
- package/src/locales/vi/blocks.ts +10 -2
- package/src/locales/vi/columns.ts +12 -0
- package/src/locales/vi/controls.ts +21 -0
- package/src/locales/vi/hints.ts +216 -2
- package/src/locales/vi/index.ts +5 -2
- package/src/locales/vi/layout.ts +32 -0
- package/src/locales/vi/legacy.ts +1 -1
- package/src/locales/vi/library.ts +38 -0
- package/src/locales/vi/parts.ts +12 -0
- package/src/locales/vi/placeholders.ts +9 -1
- package/src/locales/vi/presets.ts +6 -0
- package/src/locales/vi/v2.ts +21 -0
- package/src/shared/panel-store.ts +3 -3
- package/src/shared/patterns.ts +3 -52
- package/src/shared/style-panel.tsx +2 -2
- package/src/shared/types.ts +2 -0
- package/src/v2/blocks/columns-inspector.tsx +210 -0
- package/src/v2/blocks/form.tsx +4 -4
- package/src/v2/blocks/index.ts +10 -4
- package/src/v2/blocks/inline-style.ts +1 -1
- package/src/v2/blocks/layout.tsx +173 -42
- package/src/v2/blocks/media.tsx +22 -13
- package/src/v2/blocks/resize.tsx +172 -4
- package/src/v2/blocks/text.tsx +14 -7
- package/src/v2/blocks/theme.tsx +10 -5
- package/src/v2/blocks/tools.tsx +50 -5
- package/src/v2/blocks/widgets.tsx +44 -16
- package/src/v2/canvas/block-list.tsx +17 -2
- package/src/v2/canvas/canvas-css.ts +54 -4
- package/src/v2/canvas/canvas.tsx +20 -3
- package/src/v2/canvas/dnd.ts +34 -3
- package/src/v2/canvas/move-animation.ts +94 -0
- package/src/v2/canvas/spacing-viz.ts +51 -0
- package/src/v2/core/block-presets.ts +68 -0
- package/src/v2/core/host.ts +5 -0
- package/src/v2/core/structure.ts +2 -1
- package/src/v2/editor.css +238 -9
- package/src/v2/editor.tsx +8 -2
- package/src/v2/ui/attr-form.tsx +40 -11
- package/src/v2/ui/attr-hints.ts +104 -6
- package/src/v2/ui/background-panel.tsx +65 -21
- package/src/v2/ui/block-icons.tsx +152 -0
- package/src/v2/ui/block-menu.ts +22 -0
- package/src/v2/ui/block-style-panel.tsx +14 -3
- package/src/v2/ui/color-field.tsx +74 -9
- package/src/v2/ui/divider-panel.tsx +58 -0
- package/src/v2/ui/group-width.tsx +38 -0
- package/src/v2/ui/icon-picker.tsx +51 -0
- package/src/v2/ui/inserter.tsx +51 -7
- package/src/v2/ui/inspector.tsx +48 -16
- package/src/v2/ui/layout-panel.tsx +5 -47
- package/src/v2/ui/list-view.tsx +81 -7
- package/src/v2/ui/motion-panel.tsx +2 -1
- package/src/v2/ui/parts-panel.tsx +164 -0
- package/src/v2/ui/pattern-library.tsx +228 -0
- package/src/v2/ui/preset-bar.tsx +83 -0
- package/src/v2/ui/style-controls.tsx +65 -15
- package/src/v2/ui/style-supports.ts +1 -1
- package/src/v2/ui/style-tab.tsx +127 -41
- package/src/v2/ui/toolbar.tsx +52 -13
- package/src/v2/ui/unit-controls.tsx +88 -39
- package/src/locales/en/patterns.ts +0 -50
- package/src/locales/vi/patterns.ts +0 -50
- package/src/shared/patterns-kit.ts +0 -7
- package/src/shared/patterns-library.ts +0 -172
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { msgs } from "../i18n";
|
|
2
|
-
import type { Pattern } from "./patterns";
|
|
3
|
-
import { btn, buttons, h, p, text } from "./patterns-kit";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Thư viện mẫu section của lõi (ngoài 8 mẫu cơ bản trong patterns.ts): hero, tính năng, số liệu, quy trình, bảng giá, cảm nhận,
|
|
7
|
-
* hỏi đáp, kêu gọi, đội ngũ, đối tác, liên hệ, nội dung, chân trang. Chỉ dùng khối và kiểu dáng của @ecomcx/ecomweb-content nên
|
|
8
|
-
* mọi theme hiển thị được; người soạn chèn một cú bấm rồi chỉ sửa chữ. Hiệu ứng chuyển động (1.16) có sẵn ở các mẫu hợp lý.
|
|
9
|
-
*/
|
|
10
|
-
type L = Record<string, string>;
|
|
11
|
-
|
|
12
|
-
// ---------------------------------------------------------------------------
|
|
13
|
-
// Khối dựng sẵn dùng lại
|
|
14
|
-
// ---------------------------------------------------------------------------
|
|
15
|
-
type Node = Record<string, unknown>;
|
|
16
|
-
const GRADIENT = "linear-gradient(135deg, #2563eb 0%, #7c3aed 100%)";
|
|
17
|
-
const WHITE_BTN = (s: string) => ({ type: "button", attrs: { text: s, href: "#", variant: "primary", style: { color: { background: "#ffffff", text: "#1e3a8a" } } } });
|
|
18
|
-
const GHOST_BTN = (s: string) => ({ type: "button", attrs: { text: s, href: "#", variant: "outline", style: { color: { text: "#ffffff" }, border: { color: "#ffffff" } } } });
|
|
19
|
-
const center = { textAlign: { base: "center" } };
|
|
20
|
-
const section = (content: Node[], style: Record<string, unknown> = {}): Node => ({ type: "group", attrs: { style: { padding: { base: "2xl", mobile: "xl" }, ...style } }, content });
|
|
21
|
-
const grid = (cols: number, content: Node[], style: Record<string, unknown> = {}): Node => ({ type: "group", attrs: { style: { layout: { type: "grid", columns: { base: cols, tablet: Math.min(cols, 2), mobile: 1 } }, gap: "lg", ...style } }, content });
|
|
22
|
-
const card = (content: Node[], style: Record<string, unknown> = {}): Node => ({ type: "group", attrs: { blockStyle: "card", style: { motion: { hover: "lift" }, ...style } }, content });
|
|
23
|
-
const eyebrow = (s: string, c = false): Node => p(s, { style: { textTransform: "uppercase", letterSpacing: "0.1em", fontSize: { base: "sm" }, fontWeight: "700", color: { text: "primary" }, ...(c ? center : {}) } });
|
|
24
|
-
const muted = (s: string, extra: Record<string, unknown> = {}): Node => p(s, { style: { color: { text: "muted" }, ...extra } });
|
|
25
|
-
const big = (s: string): Node => ({ type: "heading", attrs: { level: 2, style: { fontSize: { base: "3xl" }, ...center } }, content: [text(s)] });
|
|
26
|
-
const link = (s: string, href = "#") => text(s, [{ type: "link", attrs: { href } } as never]);
|
|
27
|
-
const li = (s: string): Node => ({ type: "listItem", content: [p(s)] });
|
|
28
|
-
const img = (alt: string): Node => ({ type: "image", attrs: { src: "", alt } });
|
|
29
|
-
const slideUp = (extra: Record<string, unknown> = {}) => ({ motion: { in: "slide-up", stagger: true }, ...extra });
|
|
30
|
-
const table = (rows: string[][]): Node => ({ type: "table", content: rows.map((r, i) => ({ type: "tableRow", content: r.map((c) => ({ type: i === 0 ? "tableHeader" : "tableCell", content: [p(c)] })) })) });
|
|
31
|
-
|
|
32
|
-
function library(t: L): Pattern[] {
|
|
33
|
-
const feat = (title: string): Node => card([h(3, title), muted(t.fText)], { padding: { base: "lg" } });
|
|
34
|
-
const stat = (n: string, l: string): Node => ({ type: "group", attrs: { style: center }, content: [h(2, n, { style: { fontSize: { base: "4xl" }, color: { text: "primary" } } }), muted(l, center)] });
|
|
35
|
-
const step = (n: number, title: string): Node => card([h(2, String(n), { style: { color: { text: "primary" } } }), h(3, title), muted(t.sText)], { padding: { base: "lg" } });
|
|
36
|
-
const plan = (name: string, price: string, highlight: boolean): Node => card([
|
|
37
|
-
...(highlight ? [eyebrow(t.popular)] : []), h(3, name), h(2, price, { style: { fontSize: { base: "3xl" } } }),
|
|
38
|
-
{ type: "bulletList", content: [1, 2, 3, 4].map((n) => li(`${t.item} ${n}`)) },
|
|
39
|
-
buttons("left", btn(t.choose, highlight ? "primary" : "outline")),
|
|
40
|
-
], { padding: { base: "lg" }, ...(highlight ? { shadow: "lg", border: { width: "2px", style: "solid", color: "primary" } } : {}) });
|
|
41
|
-
const quoteCard = (q: string, who: string): Node => card([{ type: "blockquote", attrs: { citation: who }, content: [p(q)] }], { padding: { base: "lg" } });
|
|
42
|
-
const member = (): Node => card([img(t.member), h(3, t.member), muted(t.role), p(t.bio)], { padding: { base: "lg" }, textAlign: { base: "center" } });
|
|
43
|
-
const info = (label: string, value: string): Node => card([h(3, label), p(value)], { padding: { base: "lg" } });
|
|
44
|
-
const links = (title: string, items: string[]): Node => ({ type: "column", content: [h(4, title), { type: "bulletList", content: items.map((s) => ({ type: "listItem", content: [{ type: "paragraph", content: [link(s)] }] })) }] });
|
|
45
|
-
// Form cơ bản của lõi (khối form): formId để trống — trình soạn tạo mã khi mẫu được chèn
|
|
46
|
-
const fld = (kind: string, name: string, label: string, extra: Record<string, unknown> = {}): Node => ({ type: "formField", attrs: { kind, name, label, ...extra } });
|
|
47
|
-
const contactForm = (topics = false): Node => ({ type: "form", attrs: { submitText: t.fSend, successMessage: t.fThanks }, content: [
|
|
48
|
-
fld("text", "name", t.fName, { required: true, width: "half" }), fld("tel", "phone", t.fPhone, { required: true, width: "half" }),
|
|
49
|
-
fld("email", "email", t.fEmail),
|
|
50
|
-
...(topics ? [fld("select", "topic", t.fTopic, { options: [t.topic1, t.topic2, t.topic3] })] : []),
|
|
51
|
-
fld("textarea", "message", t.fMessage, { required: true, placeholder: t.fMessageP }),
|
|
52
|
-
fld("consent", "consent", t.fConsent, { required: true }),
|
|
53
|
-
] });
|
|
54
|
-
const infoRow = (icon: string, label: string, value: string): Node => ({ type: "group", attrs: { style: { layout: { type: "flex", direction: { base: "row" }, align: { base: "start" }, wrap: false }, gap: "md" } }, content: [
|
|
55
|
-
{ type: "icon", attrs: { name: icon, size: 22, style: { color: { text: "primary" } } } },
|
|
56
|
-
{ type: "group", content: [p(label, { style: { fontWeight: "600", margin: { base: "0" } } }), muted(value, { margin: { base: "0" } })] }] });
|
|
57
|
-
const m = (id: string, category: string, keywords: string, content: Node[]): Pattern => ({ name: `core/${id}`, category, title: t[id.replace(/-/g, "_")], description: t[`${id.replace(/-/g, "_")}D`], keywords, content });
|
|
58
|
-
|
|
59
|
-
return [
|
|
60
|
-
// ---------------- hero ----------------
|
|
61
|
-
m("hero-split", "hero", "hero banner anh chu split", [
|
|
62
|
-
section([{ type: "mediaText", attrs: { position: "right", width: 45, verticalAlign: "center" }, content: [
|
|
63
|
-
eyebrow(t.eyebrow), h(1, t.title), p(t.sub), buttons("left", btn(t.start), btn(t.demo, "outline"))] }], { motion: { in: "fade" } })]),
|
|
64
|
-
m("hero-gradient", "hero", "hero gradient nen chuyen mau gradient", [
|
|
65
|
-
section([h(1, t.title, { style: { ...center, color: { text: "#ffffff" } } }), p(t.sub, { style: { ...center, color: { text: "#ffffff" } } }), buttons("center", WHITE_BTN(t.start), GHOST_BTN(t.learn))],
|
|
66
|
-
{ gradient: GRADIENT, padding: { base: "3xl", mobile: "2xl" }, radius: "16px", motion: { in: "slide-up" } })]),
|
|
67
|
-
m("hero-minimal", "hero", "hero toi gian minimal", [
|
|
68
|
-
section([eyebrow(t.eyebrow), h(1, t.title, { style: { fontSize: { base: "4xl", mobile: "3xl" } } }), muted(t.sub, { fontSize: { base: "lg" } }), buttons("left", btn(t.start), btn(t.learn, "outline"))],
|
|
69
|
-
{ padding: { base: "3xl", mobile: "2xl" }, maxWidth: { base: "720px" }, motion: { in: "fade" } })]),
|
|
70
|
-
m("hero-bottom", "hero", "hero anh bia cover chu duoi", [
|
|
71
|
-
{ type: "cover", attrs: { overlay: "#000000", opacity: 45, minHeight: "75vh", contentAlign: "bottom" }, content: [
|
|
72
|
-
h(1, t.title), p(t.sub), buttons("left", btn(t.start))] }]),
|
|
73
|
-
m("hero-badge", "hero", "hero nhan badge moi", [
|
|
74
|
-
section([p(`● ${t.badge}`, { style: { ...center, fontWeight: "700", color: { text: "primary" } } }), h(1, t.title, { style: center }), muted(t.sub, center), buttons("center", btn(t.start), btn(t.learn, "outline"))],
|
|
75
|
-
{ padding: { base: "3xl", mobile: "2xl" }, motion: { in: "slide-up" } })]),
|
|
76
|
-
|
|
77
|
-
// ---------------- features ----------------
|
|
78
|
-
m("feat-grid6", "features", "tinh nang luoi features grid 6", [
|
|
79
|
-
section([eyebrow(t.eyebrow, true), big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(3, [t.f1, t.f2, t.f3, t.f4, t.f5, t.f6].map(feat), slideUp())])]),
|
|
80
|
-
m("feat-cards4", "features", "the noi hover card 4", [
|
|
81
|
-
section([big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(4, [t.f1, t.f2, t.f3, t.f4].map(feat), slideUp())])]),
|
|
82
|
-
m("feat-list", "features", "tinh nang danh sach list diem manh", [
|
|
83
|
-
section([{ type: "columns", content: [
|
|
84
|
-
{ type: "column", content: [eyebrow(t.eyebrow), h(2, t.title), muted(t.sub)] },
|
|
85
|
-
{ type: "column", content: [{ type: "bulletList", content: [t.f1, t.f2, t.f3, t.f4, t.f5].map((s) => li(`${s} — ${t.fText}`)) }] }] }])]),
|
|
86
|
-
m("feat-alt", "features", "tinh nang xen ke anh alternating", [
|
|
87
|
-
section([
|
|
88
|
-
{ type: "mediaText", attrs: { position: "left", width: 45, verticalAlign: "center" }, content: [h(2, t.f1), p(t.fText), buttons("left", btn(t.more, "outline"))] },
|
|
89
|
-
{ type: "spacer", attrs: { height: "xl" } },
|
|
90
|
-
{ type: "mediaText", attrs: { position: "right", width: 45, verticalAlign: "center" }, content: [h(2, t.f2), p(t.fText), buttons("left", btn(t.more, "outline"))] }])]),
|
|
91
|
-
|
|
92
|
-
// ---------------- stats / steps ----------------
|
|
93
|
-
m("stats4", "stats", "so lieu con so stats numbers", [
|
|
94
|
-
section([grid(4, [stat(t.n1, t.l1), stat(t.n2, t.l2), stat(t.n3, t.l3), stat(t.n4, t.l4)], { motion: { in: "zoom-in", stagger: true } })])]),
|
|
95
|
-
m("stats-band", "stats", "dai so lieu stats band", [
|
|
96
|
-
section([grid(3, [stat(t.n1, t.l1), stat(t.n2, t.l2), stat(t.n3, t.l3)], { motion: { in: "fade", stagger: true } })], { color: { background: "surface" }, radius: "16px" })]),
|
|
97
|
-
m("steps3", "steps", "quy trinh buoc process steps", [
|
|
98
|
-
section([big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(3, [step(1, t.s1), step(2, t.s2), step(3, t.s3)], slideUp())])]),
|
|
99
|
-
m("steps-v", "steps", "quy trinh doc timeline vertical", [
|
|
100
|
-
section([h(2, t.title), { type: "orderedList", content: [t.s1, t.s2, t.s3, t.s4].map((s) => ({ type: "listItem", content: [{ type: "paragraph", content: [text(s, [{ type: "bold" }])] }, p(t.sText)] })) }], { maxWidth: { base: "720px" } })]),
|
|
101
|
-
|
|
102
|
-
// ---------------- pricing ----------------
|
|
103
|
-
m("price2", "pricing", "bang gia 2 goi pricing", [
|
|
104
|
-
section([big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(2, [plan(t.plan1, "199k", false), plan(t.plan2, `499k${t.perMonth}`, true)], { maxWidth: { base: "860px" }, margin: { base: { left: "auto", right: "auto" } } })])]),
|
|
105
|
-
m("price-table", "pricing", "bang so sanh goi comparison table", [
|
|
106
|
-
section([h(2, t.title, center), table([[t.feature, t.plan1, t.plan2, t.plan3], [`${t.item} 1`, t.yes, t.yes, t.yes], [`${t.item} 2`, t.no, t.yes, t.yes], [`${t.item} 3`, t.no, t.no, t.yes]])])]),
|
|
107
|
-
|
|
108
|
-
// ---------------- testimonials ----------------
|
|
109
|
-
m("test3", "testimonials", "cam nhan khach hang testimonials 3", [
|
|
110
|
-
section([big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(3, [quoteCard(t.quote1, t.who1), quoteCard(t.quote2, t.who2), quoteCard(t.quote3, t.who3)], slideUp())])]),
|
|
111
|
-
m("test-big", "testimonials", "cam nhan lon trich dan quote big", [
|
|
112
|
-
section([{ type: "pullquote", attrs: { citation: t.who1, style: { fontSize: { base: "xl" } } }, content: [text(t.bigQuote)] }], { padding: { base: "2xl" }, motion: { in: "fade" } })]),
|
|
113
|
-
|
|
114
|
-
// ---------------- faq ----------------
|
|
115
|
-
m("faq2", "faq", "hoi dap 2 cot faq", [
|
|
116
|
-
section([{ type: "columns", content: [
|
|
117
|
-
{ type: "column", content: [eyebrow(t.eyebrow), h(2, t.title), muted(t.sub)] },
|
|
118
|
-
{ type: "column", content: [t.q1, t.q2, t.q3].map((q) => ({ type: "details", attrs: { summary: q }, content: [p(t.a)] })) }] }])]),
|
|
119
|
-
m("faq5", "faq", "hoi dap thuong gap faq 5", [
|
|
120
|
-
section([h(2, t.title, center), ...[t.q1, t.q2, t.q3, t.q4, t.q5].map((q) => ({ type: "details", attrs: { summary: q }, content: [p(t.a)] }))], { maxWidth: { base: "760px" } })]),
|
|
121
|
-
|
|
122
|
-
// ---------------- cta ----------------
|
|
123
|
-
m("cta-band", "cta", "keu goi nen mau cta band gradient", [
|
|
124
|
-
section([h(2, t.title, { style: { ...center, color: { text: "#ffffff" } } }), p(t.sub, { style: { ...center, color: { text: "#ffffff" } } }), buttons("center", WHITE_BTN(t.start))],
|
|
125
|
-
{ gradient: GRADIENT, radius: "16px", padding: { base: "2xl", mobile: "xl" }, motion: { in: "zoom-in" } })]),
|
|
126
|
-
m("cta-split", "cta", "keu goi chia doi cta split", [
|
|
127
|
-
section([{ type: "columns", attrs: { verticalAlign: "center" }, content: [
|
|
128
|
-
{ type: "column", attrs: { width: 65 }, content: [h(2, t.title), muted(t.sub)] },
|
|
129
|
-
{ type: "column", attrs: { width: 35 }, content: [buttons("right", btn(t.start))] }] }], { color: { background: "surface" }, radius: "16px" })]),
|
|
130
|
-
m("cta-contact", "cta", "goi dien zalo lien he nhanh cta", [
|
|
131
|
-
section([h(2, t.title, center), muted(t.sub, center), buttons("center", btn(t.call), btn(t.chat, "outline"))], { motion: { in: "slide-up" } })]),
|
|
132
|
-
|
|
133
|
-
// ---------------- team / logos ----------------
|
|
134
|
-
m("team4", "team", "doi ngu thanh vien team 4", [
|
|
135
|
-
section([big(t.title), { type: "spacer", attrs: { height: "md" } }, grid(4, [member(), member(), member(), member()], slideUp())])]),
|
|
136
|
-
m("team-intro", "team", "gioi thieu doi ngu anh nhom team intro", [
|
|
137
|
-
section([{ type: "mediaText", attrs: { position: "left", width: 50, verticalAlign: "center" }, content: [eyebrow(t.eyebrow), h(2, t.title), p(t.sub), buttons("left", btn(t.more, "outline"))] }])]),
|
|
138
|
-
m("logos", "logos", "doi tac logo khach hang logos", [
|
|
139
|
-
section([muted(t.trusted, { ...center, textTransform: "uppercase", letterSpacing: "0.08em", fontSize: { base: "sm" } }), grid(5, [1, 2, 3, 4, 5].map(() => img(t.logo)), { motion: { in: "fade", stagger: true } })])]),
|
|
140
|
-
|
|
141
|
-
// ---------------- contact ----------------
|
|
142
|
-
m("contact-form", "contact", "lien he form gui tin nhan contact form", [
|
|
143
|
-
section([{ type: "columns", attrs: { verticalAlign: "top" }, content: [
|
|
144
|
-
{ type: "column", attrs: { width: 40 }, content: [eyebrow(t.l_contact), h(2, t.contactTitle), muted(t.contactSub, { fontSize: { base: "lg" } }), { type: "spacer", attrs: { height: "sm" } },
|
|
145
|
-
{ type: "group", attrs: { style: { layout: { type: "flex", direction: { base: "column" } }, gap: "lg" } }, content: [
|
|
146
|
-
infoRow("phone", t.phone, t.phoneV), infoRow("mail", t.email, t.emailV), infoRow("mapPin", t.address, t.addressV), infoRow("clock", t.hours, t.hoursV)] }] },
|
|
147
|
-
{ type: "column", attrs: { width: 60 }, content: [card([contactForm(true)], { padding: { base: "xl", mobile: "lg" }, shadow: "md", motion: undefined })] }] }],
|
|
148
|
-
{ motion: { in: "fade" } })]),
|
|
149
|
-
m("contact-split", "contact", "lien he chia doi contact split", [
|
|
150
|
-
section([{ type: "columns", content: [
|
|
151
|
-
{ type: "column", content: [h(2, t.contactTitle), muted(t.contactSub), p(`${t.address}: ${t.addressV}`), p(`${t.phone}: ${t.phoneV}`), p(`${t.email}: ${t.emailV}`),
|
|
152
|
-
{ type: "socialLinks", attrs: { links: [{ service: "facebook", url: "https://facebook.com" }, { service: "zalo", url: "https://zalo.me" }, { service: "email", url: "mailto:hello@example.com" }] } }] },
|
|
153
|
-
{ type: "column", content: [contactForm()] }] }])]),
|
|
154
|
-
m("contact-cards", "contact", "the lien he dia chi dien thoai email contact cards", [
|
|
155
|
-
section([h(2, t.contactTitle, center), muted(t.contactSub, center), { type: "spacer", attrs: { height: "md" } }, grid(3, [info(t.address, t.addressV), info(t.phone, t.phoneV), info(t.email, t.emailV)], slideUp())])]),
|
|
156
|
-
|
|
157
|
-
// ---------------- text ----------------
|
|
158
|
-
m("text-cols", "text", "hai cot chu text columns", [
|
|
159
|
-
section([h(2, t.title), { type: "columns", content: [{ type: "column", content: [h(3, t.twoColA), p(t.body), p(t.body)] }, { type: "column", content: [h(3, t.twoColB), p(t.body), p(t.body)] }] }])]),
|
|
160
|
-
m("text-note", "text", "ghi chu luu y callout note", [
|
|
161
|
-
section([{ type: "callout", attrs: { tone: "info", title: t.note }, content: [p(t.noteText)] }, p(t.body)], { maxWidth: { base: "760px" } })]),
|
|
162
|
-
|
|
163
|
-
// ---------------- footer ----------------
|
|
164
|
-
m("footer-simple", "footer", "chan trang gon footer", [
|
|
165
|
-
section([p(t.copyright, { style: { ...center, color: { text: "muted" }, fontSize: { base: "sm" } } }), { type: "socialLinks", attrs: { align: "center", links: [{ service: "facebook", url: "https://facebook.com" }, { service: "youtube", url: "https://youtube.com" }, { service: "zalo", url: "https://zalo.me" }] } }], { padding: { base: "xl" } })]),
|
|
166
|
-
m("footer-cols", "footer", "chan trang 3 cot footer links", [
|
|
167
|
-
section([{ type: "columns", content: [links(t.footerAbout, [t.l_about, t.l_news, t.l_jobs]), links(t.footerHelp, [t.l_faq, t.l_guide, t.l_contact]), links(t.footerLegal, [t.l_terms, t.l_privacy, t.l_refund])] },
|
|
168
|
-
p(t.copyright, { style: { color: { text: "muted" }, fontSize: { base: "sm" } } })], { padding: { base: "xl" } })]),
|
|
169
|
-
];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export const libraryPatterns = (locale: string): Pattern[] => library(msgs("patternLib", locale));
|