@avocadostudio-ai/blocks 0.1.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/LICENSE +201 -0
- package/dist/block-error-boundary.d.ts +18 -0
- package/dist/block-error-boundary.js +36 -0
- package/dist/blocks/_base.css +108 -0
- package/dist/blocks/_layout.css +47 -0
- package/dist/blocks/_shared.d.ts +24 -0
- package/dist/blocks/_shared.js +153 -0
- package/dist/blocks/_tokens.css +127 -0
- package/dist/blocks/banner/renderer.d.ts +2 -0
- package/dist/blocks/banner/renderer.js +21 -0
- package/dist/blocks/banner/styles.css +72 -0
- package/dist/blocks/block-image.d.ts +14 -0
- package/dist/blocks/block-image.js +10 -0
- package/dist/blocks/block-types.d.ts +2 -0
- package/dist/blocks/block-types.js +22 -0
- package/dist/blocks/card/renderer.d.ts +1 -0
- package/dist/blocks/card/renderer.js +11 -0
- package/dist/blocks/card/styles.css +94 -0
- package/dist/blocks/card-grid/renderer.d.ts +1 -0
- package/dist/blocks/card-grid/renderer.js +17 -0
- package/dist/blocks/card-grid/styles.css +38 -0
- package/dist/blocks/carousel/init.d.ts +8 -0
- package/dist/blocks/carousel/init.js +35 -0
- package/dist/blocks/carousel/renderer.d.ts +2 -0
- package/dist/blocks/carousel/renderer.js +19 -0
- package/dist/blocks/carousel/styles.css +136 -0
- package/dist/blocks/cta/renderer.d.ts +1 -0
- package/dist/blocks/cta/renderer.js +7 -0
- package/dist/blocks/cta/styles.css +111 -0
- package/dist/blocks/embed/renderer.d.ts +2 -0
- package/dist/blocks/embed/renderer.js +16 -0
- package/dist/blocks/embed/styles.css +58 -0
- package/dist/blocks/faq-accordion/renderer.d.ts +1 -0
- package/dist/blocks/faq-accordion/renderer.js +11 -0
- package/dist/blocks/faq-accordion/styles.css +68 -0
- package/dist/blocks/feature-grid/renderer.d.ts +1 -0
- package/dist/blocks/feature-grid/renderer.js +12 -0
- package/dist/blocks/feature-grid/styles.css +62 -0
- package/dist/blocks/footer/renderer.d.ts +1 -0
- package/dist/blocks/footer/renderer.js +19 -0
- package/dist/blocks/footer/styles.css +64 -0
- package/dist/blocks/gallery/renderer.d.ts +2 -0
- package/dist/blocks/gallery/renderer.js +21 -0
- package/dist/blocks/gallery/styles.css +59 -0
- package/dist/blocks/hero/renderer.d.ts +1 -0
- package/dist/blocks/hero/renderer.js +20 -0
- package/dist/blocks/hero/styles.css +137 -0
- package/dist/blocks/index.d.ts +5 -0
- package/dist/blocks/index.js +47 -0
- package/dist/blocks/quote/renderer.d.ts +2 -0
- package/dist/blocks/quote/renderer.js +9 -0
- package/dist/blocks/quote/styles.css +97 -0
- package/dist/blocks/rich-text/renderer.d.ts +1 -0
- package/dist/blocks/rich-text/renderer.js +15 -0
- package/dist/blocks/rich-text/styles.css +64 -0
- package/dist/blocks/site-header/renderer.d.ts +1 -0
- package/dist/blocks/site-header/renderer.js +64 -0
- package/dist/blocks/site-header/styles.css +345 -0
- package/dist/blocks/stats/renderer.d.ts +1 -0
- package/dist/blocks/stats/renderer.js +13 -0
- package/dist/blocks/stats/styles.css +64 -0
- package/dist/blocks/styles.css +23 -0
- package/dist/blocks/table/renderer.d.ts +2 -0
- package/dist/blocks/table/renderer.js +14 -0
- package/dist/blocks/table/styles.css +87 -0
- package/dist/blocks/tabs/init.d.ts +5 -0
- package/dist/blocks/tabs/init.js +38 -0
- package/dist/blocks/tabs/renderer.d.ts +2 -0
- package/dist/blocks/tabs/renderer.js +30 -0
- package/dist/blocks/tabs/styles.css +147 -0
- package/dist/blocks/testimonials/renderer.d.ts +1 -0
- package/dist/blocks/testimonials/renderer.js +15 -0
- package/dist/blocks/testimonials/styles.css +92 -0
- package/dist/blocks/two-column/renderer.d.ts +1 -0
- package/dist/blocks/two-column/renderer.js +41 -0
- package/dist/blocks/two-column/styles.css +83 -0
- package/dist/blocks/video/renderer.d.ts +2 -0
- package/dist/blocks/video/renderer.js +52 -0
- package/dist/blocks/video/styles.css +84 -0
- package/dist/blocks-hydrator.d.ts +5 -0
- package/dist/blocks-hydrator.js +15 -0
- package/dist/catalogue.d.ts +1 -0
- package/dist/catalogue.js +741 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/renderer.d.ts +12 -0
- package/dist/renderer.js +35 -0
- package/package.json +54 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag } from "@avocadostudio-ai/shared";
|
|
3
|
+
import { PrimaryButton, SecondaryButton } from "../_shared.js";
|
|
4
|
+
export function CTA(props) {
|
|
5
|
+
const HeadingTag = resolveHeadingTag("CTA", props);
|
|
6
|
+
return (_jsx("section", { className: "cta-section", children: _jsxs("div", { className: "section__inner", children: [_jsx(HeadingTag, { "data-editable-target": "title", "data-editable-target-label": "title", "data-editable-label": "title", children: String(props.title ?? "") }), _jsx("p", { "data-editable-target": "description", "data-editable-target-label": "description", "data-editable-label": "description", children: String(props.description ?? "") }), _jsxs("div", { className: "cta__buttons", children: [_jsx(PrimaryButton, { href: String(props.ctaHref ?? "#"), "data-editable-target": "ctaText", "data-editable-target-label": "ctaText", "data-editable-label": "ctaText", children: String(props.ctaText ?? "") }), typeof props.secondaryCtaText === "string" && props.secondaryCtaText.length > 0 && (_jsx(SecondaryButton, { href: String(props.secondaryCtaHref ?? "#"), "data-editable-target": "secondaryCtaText", "data-editable-target-label": "secondaryCtaText", "data-editable-label": "secondaryCtaText", children: props.secondaryCtaText }))] })] }) }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.cta-section {
|
|
2
|
+
text-align: center;
|
|
3
|
+
padding: 40px 20px;
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background: var(--cta-bg);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cta-section .section__inner {
|
|
10
|
+
background: transparent;
|
|
11
|
+
box-shadow: none;
|
|
12
|
+
border-radius: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
max-width: 1080px;
|
|
15
|
+
position: relative;
|
|
16
|
+
z-index: 1;
|
|
17
|
+
display: grid;
|
|
18
|
+
justify-items: center;
|
|
19
|
+
row-gap: 18px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.cta-section .section__inner > h2 {
|
|
23
|
+
margin: 0;
|
|
24
|
+
max-width: 22ch;
|
|
25
|
+
font-size: clamp(2rem, 3.7vw, 3.2rem);
|
|
26
|
+
line-height: 1.08;
|
|
27
|
+
letter-spacing: -0.02em;
|
|
28
|
+
text-wrap: balance;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.cta-section .section__inner > p {
|
|
32
|
+
margin: 0;
|
|
33
|
+
max-width: 62ch;
|
|
34
|
+
font-size: clamp(1.1rem, 1.9vw, 1.15rem);
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
color: var(--body);
|
|
37
|
+
text-wrap: pretty;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cta__buttons {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
gap: 12px;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
margin-top: 4px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cta__buttons .btn-primary {
|
|
49
|
+
min-width: 255px;
|
|
50
|
+
padding: 14px 32px;
|
|
51
|
+
font-size: 1.1rem;
|
|
52
|
+
line-height: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.cta__buttons .btn-secondary {
|
|
56
|
+
padding: 14px 32px;
|
|
57
|
+
font-size: 1.1rem;
|
|
58
|
+
line-height: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.cta-section::before {
|
|
62
|
+
content: "";
|
|
63
|
+
position: absolute;
|
|
64
|
+
inset: auto -8% -55% auto;
|
|
65
|
+
width: 340px;
|
|
66
|
+
aspect-ratio: 1;
|
|
67
|
+
border-radius: 999px;
|
|
68
|
+
background: radial-gradient(circle at center, rgb(20 184 166 / 0.2), transparent 68%);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Dark */
|
|
73
|
+
.dark .cta-section [data-editable-target="description"] {
|
|
74
|
+
color: #d6e2f5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dark main.editor-mode .cta-section [data-editable-target="description"] {
|
|
78
|
+
color: #dbe7f7;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dark .editor-live-draft-active .cta-section [data-editable-target="description"]::after {
|
|
82
|
+
background: rgba(56, 189, 248, 0.025);
|
|
83
|
+
animation: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (max-width: 900px) {
|
|
87
|
+
.cta-section .section__inner {
|
|
88
|
+
padding: 24px 16px;
|
|
89
|
+
row-gap: 14px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cta-section .section__inner > h2 {
|
|
93
|
+
max-width: 16ch;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cta-section .section__inner > p {
|
|
97
|
+
max-width: 40ch;
|
|
98
|
+
font-size: 1rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.cta__buttons .btn-primary {
|
|
102
|
+
min-width: 220px;
|
|
103
|
+
font-size: 1rem;
|
|
104
|
+
padding: 12px 26px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cta__buttons .btn-secondary {
|
|
108
|
+
font-size: 1rem;
|
|
109
|
+
padding: 12px 26px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { renderInline } from "../_shared.js";
|
|
3
|
+
const ratioClass = {
|
|
4
|
+
"16:9": "embed-block__frame--16-9",
|
|
5
|
+
"4:3": "embed-block__frame--4-3",
|
|
6
|
+
"1:1": "embed-block__frame--1-1",
|
|
7
|
+
};
|
|
8
|
+
export function Embed(props) {
|
|
9
|
+
const url = String(props.url ?? "");
|
|
10
|
+
const title = String(props.title ?? "");
|
|
11
|
+
const aspectRatio = String(props.aspectRatio ?? "16:9");
|
|
12
|
+
if (!url) {
|
|
13
|
+
return (_jsx("section", { className: "embed-block", children: _jsx("div", { className: "section__inner", children: _jsx("p", { className: "embed-block__error", children: "No embed URL provided" }) }) }));
|
|
14
|
+
}
|
|
15
|
+
return (_jsx("section", { className: "embed-block", children: _jsxs("div", { className: "section__inner", children: [_jsx("div", { className: `embed-block__frame ${ratioClass[aspectRatio] ?? ratioClass["16:9"]}`, children: _jsx("iframe", { src: url, title: title || "Embedded content", allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true }) }), title.length > 0 && (_jsx("p", { className: "embed-block__caption", "data-editable-target": "title", "data-editable-target-label": "title", "data-editable-label": "title", children: renderInline(title) }))] }) }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.embed-block {
|
|
2
|
+
padding: 40px 20px;
|
|
3
|
+
background: var(--section-bg);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.embed-block .section__inner {
|
|
7
|
+
max-width: 960px;
|
|
8
|
+
display: grid;
|
|
9
|
+
row-gap: 12px;
|
|
10
|
+
justify-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Responsive iframe container */
|
|
14
|
+
.embed-block__frame {
|
|
15
|
+
width: 100%;
|
|
16
|
+
position: relative;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border-radius: var(--radius-card, 12px);
|
|
19
|
+
background: var(--bg-1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.embed-block__frame--16-9 { aspect-ratio: 16 / 9; }
|
|
23
|
+
.embed-block__frame--4-3 { aspect-ratio: 4 / 3; }
|
|
24
|
+
.embed-block__frame--1-1 { aspect-ratio: 1 / 1; }
|
|
25
|
+
|
|
26
|
+
.embed-block__frame iframe {
|
|
27
|
+
position: absolute;
|
|
28
|
+
inset: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
border: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.embed-block__caption {
|
|
35
|
+
margin: 0;
|
|
36
|
+
font-size: 0.95rem;
|
|
37
|
+
color: var(--text-200);
|
|
38
|
+
text-align: center;
|
|
39
|
+
text-wrap: pretty;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.embed-block__error {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 40px 20px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
color: var(--text-200);
|
|
47
|
+
font-style: italic;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (max-width: 900px) {
|
|
51
|
+
.embed-block {
|
|
52
|
+
padding: 24px 12px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.embed-block__frame {
|
|
56
|
+
border-radius: var(--radius-card, 8px);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FAQAccordion(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag } from "@avocadostudio-ai/shared";
|
|
3
|
+
import { renderRichTextContent } from "../_shared.js";
|
|
4
|
+
export function FAQAccordion(props) {
|
|
5
|
+
const items = Array.isArray(props.items) ? props.items : [];
|
|
6
|
+
const HeadingTag = resolveHeadingTag("FAQAccordion", props);
|
|
7
|
+
return (_jsx("section", { children: _jsxs("div", { className: "section__inner", children: [_jsx(HeadingTag, { "data-editable-target": "title", "data-editable-target-label": "title", "data-editable-label": "title", children: String(props.title ?? "") }), items.map((item, idx) => {
|
|
8
|
+
const row = (item ?? {});
|
|
9
|
+
return (_jsxs("details", { className: "faq-item", children: [_jsx("summary", { "data-editable-target": `items[${idx}].q`, "data-editable-target-label": `items[${idx}].q`, "data-editable-label": `items[${idx}].q`, children: String(row.q ?? "") }), _jsx("div", { className: "faq-item__answer", "data-editable-target": `items[${idx}].a`, "data-editable-target-label": `items[${idx}].a`, "data-editable-label": `items[${idx}].a`, children: renderRichTextContent(String(row.a ?? "")) })] }, idx));
|
|
10
|
+
})] }) }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.faq-item {
|
|
2
|
+
border-bottom: 1px solid var(--surface-border);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.faq-item:first-of-type {
|
|
6
|
+
border-top: 1px solid var(--surface-border);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.faq-item summary {
|
|
10
|
+
padding: 14px 40px 14px 0;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
list-style: none;
|
|
14
|
+
position: relative;
|
|
15
|
+
user-select: none;
|
|
16
|
+
color: var(--heading);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.faq-item summary::-webkit-details-marker {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.faq-item summary::after {
|
|
24
|
+
content: "";
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 12px;
|
|
27
|
+
top: 50%;
|
|
28
|
+
width: 9px;
|
|
29
|
+
height: 9px;
|
|
30
|
+
border-right: 2px solid var(--caption);
|
|
31
|
+
border-bottom: 2px solid var(--caption);
|
|
32
|
+
transform: translateY(-70%) rotate(45deg);
|
|
33
|
+
transition: transform 0.2s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.faq-item[open] summary::after {
|
|
37
|
+
transform: translateY(-30%) rotate(225deg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.faq-item__answer {
|
|
41
|
+
padding: 4px 0 16px;
|
|
42
|
+
color: var(--body-secondary);
|
|
43
|
+
line-height: 1.65;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.faq-item__answer p {
|
|
47
|
+
margin: 0 0 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.faq-item__answer p:last-child {
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.faq-item__answer ul,
|
|
55
|
+
.faq-item__answer ol {
|
|
56
|
+
margin: 0 0 8px;
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.faq-item__answer li {
|
|
61
|
+
margin-bottom: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.faq-item__answer a {
|
|
65
|
+
color: var(--brand);
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FeatureGrid(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag } from "@avocadostudio-ai/shared";
|
|
3
|
+
import { renderBlockIcon } from "../_shared.js";
|
|
4
|
+
export function FeatureGrid(props) {
|
|
5
|
+
const items = Array.isArray(props.features) ? props.features : [];
|
|
6
|
+
const columns = String(props.columns ?? "3");
|
|
7
|
+
const HeadingTag = resolveHeadingTag("FeatureGrid", props);
|
|
8
|
+
return (_jsx("section", { children: _jsxs("div", { className: "section__inner", children: [_jsx(HeadingTag, { "data-editable-target": "title", "data-editable-target-label": "title", "data-editable-label": "title", children: String(props.title ?? "") }), _jsx("ul", { className: `feature-grid${columns !== "3" ? ` feature-grid--${columns}-col` : ""}`, children: items.map((item, idx) => {
|
|
9
|
+
const row = (item ?? {});
|
|
10
|
+
return (_jsxs("li", { className: "feature-card", children: [renderBlockIcon(row.icon, { className: "feature-card__icon", size: 40 }), _jsx("strong", { "data-editable-target": `features[${idx}].title`, "data-editable-target-label": `features[${idx}].title`, "data-editable-label": `features[${idx}].title`, children: String(row.title ?? "") }), _jsx("p", { "data-editable-target": `features[${idx}].description`, "data-editable-target-label": `features[${idx}].description`, "data-editable-label": `features[${idx}].description`, children: String(row.description ?? "") })] }, idx));
|
|
11
|
+
}) })] }) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.feature-grid {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
4
|
+
gap: 14px;
|
|
5
|
+
margin-top: 16px;
|
|
6
|
+
list-style: none;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.feature-grid--2-col {
|
|
11
|
+
grid-template-columns: repeat(2, 1fr);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.feature-grid--4-col {
|
|
15
|
+
grid-template-columns: repeat(4, 1fr);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.feature-card {
|
|
19
|
+
background: var(--surface);
|
|
20
|
+
border: 1px solid var(--surface-border);
|
|
21
|
+
border-radius: var(--radius-feature);
|
|
22
|
+
padding: 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.feature-card__icon {
|
|
26
|
+
display: block;
|
|
27
|
+
font-size: 2rem;
|
|
28
|
+
line-height: 1;
|
|
29
|
+
margin-bottom: 10px;
|
|
30
|
+
width: 40px;
|
|
31
|
+
height: 40px;
|
|
32
|
+
object-fit: contain;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
img.feature-card__icon {
|
|
36
|
+
border-radius: 6px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.feature-card strong {
|
|
40
|
+
display: block;
|
|
41
|
+
font-size: 1.125rem;
|
|
42
|
+
line-height: 1.3;
|
|
43
|
+
letter-spacing: -0.006em;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
margin-bottom: 8px;
|
|
46
|
+
color: var(--heading);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.feature-card p {
|
|
50
|
+
margin: 0;
|
|
51
|
+
color: var(--body-secondary);
|
|
52
|
+
font-size: 0.9375rem;
|
|
53
|
+
line-height: 1.55;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (max-width: 900px) {
|
|
57
|
+
.feature-grid,
|
|
58
|
+
.feature-grid--2-col,
|
|
59
|
+
.feature-grid--4-col {
|
|
60
|
+
grid-template-columns: 1fr;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Footer(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag } from "@avocadostudio-ai/shared";
|
|
3
|
+
export function Footer(props) {
|
|
4
|
+
const columns = Array.isArray(props.columns) ? props.columns : [];
|
|
5
|
+
const HeadingTag = resolveHeadingTag("Footer", props);
|
|
6
|
+
return (_jsx("footer", { className: "site-footer", "data-block-chrome": "true", children: _jsxs("div", { className: "section__inner", children: [_jsx("div", { className: "site-footer__columns", children: columns.map((col, idx) => {
|
|
7
|
+
const row = (col ?? {});
|
|
8
|
+
const linksRaw = String(row.links ?? "");
|
|
9
|
+
const links = linksRaw
|
|
10
|
+
.split("\n")
|
|
11
|
+
.map((line) => line.trim())
|
|
12
|
+
.filter(Boolean)
|
|
13
|
+
.map((line) => {
|
|
14
|
+
const parts = line.split("|");
|
|
15
|
+
return { label: parts[0]?.trim() ?? "", href: parts[1]?.trim() ?? "#" };
|
|
16
|
+
});
|
|
17
|
+
return (_jsxs("div", { className: "site-footer__col", children: [_jsx(HeadingTag, { "data-editable-target": `columns[${idx}].title`, "data-editable-target-label": `columns[${idx}].title`, "data-editable-label": `columns[${idx}].title`, children: String(row.title ?? "") }), _jsx("ul", { "data-editable-target": `columns[${idx}].links`, "data-editable-target-label": `columns[${idx}].links`, "data-editable-label": `columns[${idx}].links`, children: links.map((link, linkIdx) => (_jsx("li", { children: _jsx("a", { href: link.href, children: link.label }) }, linkIdx))) })] }, idx));
|
|
18
|
+
}) }), _jsx("div", { className: "site-footer__copyright", "data-editable-target": "copyright", "data-editable-target-label": "copyright", "data-editable-label": "copyright", children: String(props.copyright ?? "") })] }) }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.site-footer {
|
|
2
|
+
width: 100vw;
|
|
3
|
+
margin-left: calc(50% - 50vw);
|
|
4
|
+
margin-right: calc(50% - 50vw);
|
|
5
|
+
background: var(--footer-bg);
|
|
6
|
+
color: var(--footer-text);
|
|
7
|
+
padding: 40px 20px 24px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.site-footer .section__inner {
|
|
11
|
+
max-width: 960px;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.site-footer__columns {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
18
|
+
gap: 32px;
|
|
19
|
+
margin-bottom: 32px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.site-footer__col h4 {
|
|
23
|
+
margin: 0 0 12px;
|
|
24
|
+
font-size: 0.9375rem;
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
color: var(--footer-heading);
|
|
27
|
+
text-transform: uppercase;
|
|
28
|
+
letter-spacing: 0.04em;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.site-footer__col ul {
|
|
32
|
+
list-style: none;
|
|
33
|
+
padding: 0;
|
|
34
|
+
margin: 0;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 6px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.site-footer__col a {
|
|
41
|
+
color: var(--footer-link);
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
font-size: 0.9375rem;
|
|
44
|
+
transition: color 0.15s;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.site-footer__col a:hover {
|
|
48
|
+
color: var(--footer-link-hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.site-footer__copyright {
|
|
52
|
+
border-top: 1px solid var(--footer-border);
|
|
53
|
+
padding-top: 16px;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
color: var(--caption);
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (max-width: 900px) {
|
|
60
|
+
.site-footer__columns {
|
|
61
|
+
grid-template-columns: 1fr 1fr;
|
|
62
|
+
gap: 24px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag } from "@avocadostudio-ai/shared";
|
|
3
|
+
import { renderInline, BlockImage } from "../_shared.js";
|
|
4
|
+
const colsClass = {
|
|
5
|
+
"2": "gallery__grid--2",
|
|
6
|
+
"3": "gallery__grid--3",
|
|
7
|
+
"4": "gallery__grid--4",
|
|
8
|
+
};
|
|
9
|
+
export function Gallery(props) {
|
|
10
|
+
const HeadingTag = resolveHeadingTag("Gallery", props);
|
|
11
|
+
const title = String(props.title ?? "");
|
|
12
|
+
const columns = String(props.columns ?? "3");
|
|
13
|
+
const images = Array.isArray(props.images) ? props.images : [];
|
|
14
|
+
return (_jsx("section", { className: "gallery", children: _jsxs("div", { className: "section__inner", children: [title.length > 0 && (_jsx(HeadingTag, { "data-editable-target": "title", "data-editable-target-label": "title", "data-editable-label": "title", children: renderInline(title) })), _jsx("div", { className: `gallery__grid ${colsClass[columns] ?? colsClass["3"]}`, children: images.map((raw, idx) => {
|
|
15
|
+
const img = (raw ?? {});
|
|
16
|
+
const imageUrl = String(img.imageUrl ?? "");
|
|
17
|
+
const alt = String(img.alt ?? "");
|
|
18
|
+
const caption = String(img.caption ?? "");
|
|
19
|
+
return (_jsxs("figure", { className: "gallery__item", children: [imageUrl.length > 0 && (_jsx(BlockImage, { className: "gallery__image", src: imageUrl, alt: alt, width: 800, height: 600, sizes: "(max-width: 768px) 100vw, 33vw", loading: idx < 4 ? "eager" : "lazy" })), caption.length > 0 && (_jsx("figcaption", { className: "gallery__caption", "data-editable-target": `images[${idx}].caption`, "data-editable-target-label": `images[${idx}].caption`, "data-editable-label": `images[${idx}].caption`, children: renderInline(caption) }))] }, idx));
|
|
20
|
+
}) })] }) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.gallery {
|
|
2
|
+
padding: 40px 20px;
|
|
3
|
+
background: var(--section-bg);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.gallery__grid {
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
margin-top: 24px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.gallery__grid--2 { grid-template-columns: repeat(2, 1fr); }
|
|
13
|
+
.gallery__grid--3 { grid-template-columns: repeat(3, 1fr); }
|
|
14
|
+
.gallery__grid--4 { grid-template-columns: repeat(4, 1fr); }
|
|
15
|
+
|
|
16
|
+
.gallery__item {
|
|
17
|
+
margin: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
border-radius: var(--radius-card, 12px);
|
|
20
|
+
background: var(--bg-1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.gallery__image {
|
|
24
|
+
width: 100%;
|
|
25
|
+
aspect-ratio: 4 / 3;
|
|
26
|
+
object-fit: cover;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.gallery__caption {
|
|
31
|
+
padding: 10px 14px;
|
|
32
|
+
font-size: 0.9rem;
|
|
33
|
+
line-height: 1.4;
|
|
34
|
+
color: var(--text-200);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (max-width: 600px) {
|
|
38
|
+
.gallery {
|
|
39
|
+
padding: 24px 12px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.gallery__grid--3,
|
|
43
|
+
.gallery__grid--4 {
|
|
44
|
+
grid-template-columns: repeat(2, 1fr);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.gallery__grid {
|
|
48
|
+
gap: 10px;
|
|
49
|
+
margin-top: 16px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (max-width: 380px) {
|
|
54
|
+
.gallery__grid--2,
|
|
55
|
+
.gallery__grid--3,
|
|
56
|
+
.gallery__grid--4 {
|
|
57
|
+
grid-template-columns: 1fr;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Hero(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { resolveHeadingTag, IMAGE_PLACEHOLDER } from "@avocadostudio-ai/shared";
|
|
3
|
+
import { PrimaryButton, SecondaryButton, BlockImage } from "../_shared.js";
|
|
4
|
+
export function Hero(props) {
|
|
5
|
+
const rawPosition = String(props.imagePosition ?? "right");
|
|
6
|
+
const isFullWidth = rawPosition === "full";
|
|
7
|
+
const imagePosition = rawPosition === "left" ? "left" : "right";
|
|
8
|
+
const textAlign = String(props.textAlign ?? "left");
|
|
9
|
+
const eyebrow = typeof props.eyebrow === "string" ? props.eyebrow.trim() : "";
|
|
10
|
+
const HeadingTag = resolveHeadingTag("Hero", props);
|
|
11
|
+
const contentCenterClass = textAlign === "center" ? " hero__content--center" : "";
|
|
12
|
+
const content = (_jsxs("div", { className: `hero__content layout-grid__col${contentCenterClass}`, children: [eyebrow.length > 0 && (_jsx("span", { className: "hero__eyebrow", "data-editable-target": "eyebrow", "data-editable-target-label": "eyebrow", "data-editable-label": "eyebrow", children: eyebrow })), _jsx(HeadingTag, { "data-editable-target": "heading", "data-editable-target-label": "heading", "data-editable-label": "heading", children: String(props.heading ?? "") }), _jsx("p", { "data-editable-target": "subheading", "data-editable-target-label": "subheading", "data-editable-label": "subheading", children: String(props.subheading ?? "") }), _jsxs("div", { className: "hero__actions", children: [_jsx(PrimaryButton, { href: String(props.ctaHref ?? "#"), "data-editable-target": "ctaText", "data-editable-target-label": "ctaText", "data-editable-label": "ctaText", children: String(props.ctaText ?? "") }), typeof props.secondaryCtaText === "string" && props.secondaryCtaText.length > 0 && (_jsx(SecondaryButton, { href: String(props.secondaryCtaHref ?? "#"), "data-editable-target": "secondaryCtaText", "data-editable-target-label": "secondaryCtaText", "data-editable-label": "secondaryCtaText", children: props.secondaryCtaText }))] })] }));
|
|
13
|
+
if (isFullWidth) {
|
|
14
|
+
return (_jsxs("section", { className: "hero hero--full-width", children: [_jsx(BlockImage, { className: "hero__bg-image", src: String(props.imageUrl ?? IMAGE_PLACEHOLDER), alt: String(props.imageAlt ?? "Hero image"), width: 1536, height: 1024, sizes: "100vw", priority: true, "data-editable-target": "imageUrl", "data-editable-target-label": "Hero block image", "data-editable-label": "Hero block image" }), _jsx("div", { className: "section__inner hero__inner", children: content })] }));
|
|
15
|
+
}
|
|
16
|
+
const isImageLeft = imagePosition === "left";
|
|
17
|
+
const sectionClass = isImageLeft ? "hero hero--image-left" : "hero";
|
|
18
|
+
const gridClass = `section__inner hero__inner layout-grid layout-grid--content-heavy${isImageLeft ? " layout-grid--image-left" : ""}`;
|
|
19
|
+
return (_jsx("section", { className: sectionClass, children: _jsxs("div", { className: gridClass, children: [content, _jsx("div", { className: "hero__media layout-grid__col", "data-editable-target": "imageUrl", "data-editable-target-label": "Hero block image", children: _jsx(BlockImage, { className: "layout-grid__img", src: String(props.imageUrl ?? IMAGE_PLACEHOLDER), alt: String(props.imageAlt ?? "Hero image"), width: 1536, height: 1024, sizes: "(max-width: 900px) 100vw, 50vw", priority: true, "data-editable-label": "Hero block image" }) })] }) }));
|
|
20
|
+
}
|