@levo-so/blocks 0.1.75 → 0.1.77
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 +4 -4
- package/src/blocks/about-us/about-us-1.schema.ts +0 -3
- package/src/blocks/blogs/ClientOnly.tsx +24 -0
- package/src/blocks/blogs/blog-listing-1.schema.ts +750 -111
- package/src/blocks/blogs/blog-listing-1.tsx +123 -41
- package/src/blocks/blogs/blog-listing-2.schema.ts +1127 -2640
- package/src/blocks/blogs/blog-listing-2.tsx +110 -23
- package/src/blocks/blogs/blog-listing-3.schema.ts +713 -2010
- package/src/blocks/blogs/blog-listing-3.tsx +118 -20
- package/src/blocks/blogs/blog-post-1.schema.ts +262 -32
- package/src/blocks/blogs/blog-post-1.tsx +217 -28
- package/src/blocks/cards/cards-16.schema.ts +947 -0
- package/src/blocks/cards/cards-16.tsx +106 -0
- package/src/blocks/cards/cards-17.schema.ts +1945 -0
- package/src/blocks/cards/cards-17.tsx +112 -0
- package/src/blocks/cards/cards-18.schema.ts +1040 -0
- package/src/blocks/cards/cards-18.tsx +102 -0
- package/src/blocks/cards/cards-2.schema.ts +2 -2
- package/src/blocks/cards/cards-3.schema.ts +3 -16
- package/src/blocks/cards/cards-4.schema.ts +3 -28
- package/src/blocks/cards/cards-7.schema.ts +4 -7
- package/src/blocks/cards/cards-8.schema.ts +1 -10
- package/src/blocks/carousel/carousel-2.schema.ts +1 -2
- package/src/blocks/content/content-10.schema.ts +450 -0
- package/src/blocks/content/content-10.tsx +43 -0
- package/src/blocks/content/content-3.schema.ts +22 -28
- package/src/blocks/content/content-5.schema.ts +0 -4
- package/src/blocks/cta/cta-1.schema.ts +0 -3
- package/src/blocks/event/event-details.schema.ts +41 -175
- package/src/blocks/event/event-details.tsx +45 -50
- package/src/blocks/event/event-listing-2.schema.ts +437 -202
- package/src/blocks/event/event-listing-2.tsx +86 -22
- package/src/blocks/event/event-listing-3.schema.ts +232 -196
- package/src/blocks/event/event-listing-3.tsx +62 -29
- package/src/blocks/event/event-listing-4.schema.ts +314 -2824
- package/src/blocks/event/event-listing-4.tsx +68 -32
- package/src/blocks/event/event-listing.schema.ts +176 -1032
- package/src/blocks/event/event-listing.tsx +59 -25
- package/src/blocks/features/features-1/variants/stylized-cards-v2.ts +0 -1
- package/src/blocks/features/features-4.schema.ts +4 -14
- package/src/blocks/features/features-5.schema.ts +30 -51
- package/src/blocks/features/features-6.schema.ts +0 -1
- package/src/blocks/filter-listing/filter-listing-1.schema.ts +1 -3
- package/src/blocks/footer/footer-3.schema.ts +6 -14
- package/src/blocks/hero/hero-11.schema.ts +25 -54
- package/src/blocks/hero/hero-5.schema.ts +2 -6
- package/src/blocks/hero/hero-6.schema.ts +1 -10
- package/src/blocks/index.ts +4 -0
- package/src/blocks/logos/logos-1.schema.ts +0 -30
- package/src/blocks/pricing/pricing-1.schema.ts +0 -3
- package/src/blocks/stats/variants/default.ts +4 -5
- package/src/blocks/team/team-2.schema.ts +57 -154
- package/src/blocks/team/team-3.schema.ts +14 -31
- package/src/blocks/testimonial/testimonial-4.schema.ts +67 -152
- package/src/blocks/testimonial/testimonial-5/variants/default.ts +0 -1
- package/src/blocks/testimonial/testimonial-5/variants/testimonialWithLogo.ts +0 -1
- package/src/blocks/testimonial/testimonial-5/variants/testimonialWithRatings.ts +0 -1
- package/src/schemas/blocks.ts +8 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type { IModuleStudioConfig, IPost } from "@levo-so/core";
|
|
1
2
|
import {
|
|
3
|
+
Avatar,
|
|
4
|
+
AvatarFallbackV2,
|
|
5
|
+
AvatarImageV2,
|
|
2
6
|
Box,
|
|
3
7
|
Button,
|
|
4
8
|
Container,
|
|
@@ -8,52 +12,146 @@ import {
|
|
|
8
12
|
Media,
|
|
9
13
|
Section,
|
|
10
14
|
Typography,
|
|
11
|
-
|
|
15
|
+
useBlockContext,
|
|
16
|
+
useContextEngine,
|
|
12
17
|
} from "@levo-so/studio";
|
|
13
18
|
import dayjs from "dayjs";
|
|
14
19
|
|
|
20
|
+
import { ClientOnly } from "../event/ClientOnly";
|
|
15
21
|
import type { IBlogListing3Content } from "./blog-listing-3.schema";
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
/** */
|
|
24
|
+
interface IBlogMeta {
|
|
25
|
+
total: number;
|
|
26
|
+
pages: number;
|
|
27
|
+
blog?: {
|
|
28
|
+
studio_config?: IModuleStudioConfig[];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const BlogListing3: React.FC<ILevoBlockBaseProps<IBlogListing3Content>> = ({ content }) => {
|
|
33
|
+
const { response, query, setQuery } = useContextEngine<IPost, IBlogMeta>("blogs");
|
|
34
|
+
const { isBuilder } = useBlockContext();
|
|
19
35
|
|
|
20
36
|
const handleNext = () => setQuery({ page: (query?.page || 0) + 1 });
|
|
21
37
|
const handlePrevious = () => setQuery({ page: (query?.page || 0) - 1 });
|
|
22
38
|
|
|
39
|
+
const studioConfig = response?.meta?.blog?.studio_config?.find((item) => !item.block_instance_id);
|
|
40
|
+
|
|
23
41
|
return (
|
|
24
42
|
<Section elementKey="layout">
|
|
25
43
|
<Container elementKey="container">
|
|
26
44
|
<Box elementKey="header-wrapper">
|
|
27
45
|
<Box elementKey="title-wrapper">
|
|
28
46
|
<Icon elementKey="header-icon" />
|
|
29
|
-
<
|
|
47
|
+
<Box elementKey="header-text-wrapper">
|
|
48
|
+
<Heading elementKey="header" />
|
|
49
|
+
<Typography elementKey="description" />
|
|
50
|
+
</Box>
|
|
51
|
+
</Box>
|
|
52
|
+
<Box elementKey="header-ctas_levoGroup" data-levo_group>
|
|
53
|
+
{content?.["header-ctas"]?.map((v, index: number) => (
|
|
54
|
+
<Button key={`header-ctas.${index}`} elementKey={`header-ctas.${index}.header-cta`} />
|
|
55
|
+
))}
|
|
30
56
|
</Box>
|
|
31
|
-
<Button elementKey="header-cta" />
|
|
32
57
|
</Box>
|
|
33
58
|
<Box elementKey="blogs_levoGroup" data-levo_group>
|
|
34
|
-
{
|
|
35
|
-
<Box
|
|
36
|
-
|
|
59
|
+
{response?.data?.map((item, index: number) => (
|
|
60
|
+
<Box
|
|
61
|
+
key={`blogs.${index}`}
|
|
62
|
+
data-levo_group_item
|
|
63
|
+
elementKey={`blogs.${index}.blog`}
|
|
64
|
+
config={
|
|
65
|
+
(isBuilder && studioConfig?.preview_url) || (!isBuilder && studioConfig?.live_url)
|
|
66
|
+
? {
|
|
67
|
+
action: {
|
|
68
|
+
type: "external_link",
|
|
69
|
+
value:
|
|
70
|
+
isBuilder && studioConfig.preview_url
|
|
71
|
+
? studioConfig.preview_url.replace(/\{[^}]+\}/g, item?.slug)
|
|
72
|
+
: !isBuilder && studioConfig.live_url
|
|
73
|
+
? studioConfig.live_url.replace(/\{[^}]+\}/g, item?.slug)
|
|
74
|
+
: "",
|
|
75
|
+
options: {},
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
: {}
|
|
79
|
+
}
|
|
80
|
+
>
|
|
81
|
+
<Media
|
|
82
|
+
elementKey={`blogs.${index}.media`}
|
|
83
|
+
alt="Blog Media"
|
|
84
|
+
media={item?.cover_image ?? undefined}
|
|
85
|
+
/>
|
|
37
86
|
<Box elementKey={`blogs.${index}.blog-info-wrapper`}>
|
|
38
87
|
<Box elementKey={`blogs.${index}.blog-content`}>
|
|
39
|
-
<Box elementKey={`blogs.${index}.blog-header`}>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
<Box elementKey={`blogs.${index}.blog-header-wrapper`}>
|
|
89
|
+
{item?.published_at && dayjs(item?.published_at).isValid() && (
|
|
90
|
+
<Box elementKey={`blogs.${index}.blog-header`}>
|
|
91
|
+
<Icon elementKey={`blogs.${index}.header-icon`} />
|
|
92
|
+
<ClientOnly>
|
|
93
|
+
<Typography elementKey={`blogs.${index}.publish-date`}>
|
|
94
|
+
{dayjs(item?.published_at).format("DD MMM, YYYY")}
|
|
95
|
+
</Typography>
|
|
96
|
+
</ClientOnly>
|
|
97
|
+
</Box>
|
|
98
|
+
)}
|
|
99
|
+
<Box elementKey={`blogs.${index}.blog-reading-time-wrapper`}>
|
|
100
|
+
<Icon elementKey={`blogs.${index}.reading-time-icon`} />
|
|
101
|
+
<Typography elementKey={`blogs.${index}.reading-time`}>
|
|
102
|
+
{item?.reading_time ? `${item?.reading_time} min read` : "5 min read"}
|
|
103
|
+
</Typography>
|
|
104
|
+
</Box>
|
|
105
|
+
</Box>
|
|
106
|
+
<Box elementKey={`blogs.${index}.blog-content-wrapper`}>
|
|
107
|
+
<Heading elementKey={`blogs.${index}.title`}>{item?.title}</Heading>
|
|
108
|
+
<Typography elementKey={`blogs.${index}.description`}>
|
|
109
|
+
{item?.summary}
|
|
46
110
|
</Typography>
|
|
47
111
|
</Box>
|
|
48
|
-
<
|
|
49
|
-
|
|
112
|
+
<Box elementKey={`blogs.${index}.blog-footer`}>
|
|
113
|
+
<Box elementKey={`blogs.${index}.blog-author`}>
|
|
114
|
+
<Avatar className="h-10 w-10">
|
|
115
|
+
<AvatarImageV2 src={item?.authors?.[0]?.profile_picture?.location} />
|
|
116
|
+
<AvatarFallbackV2>
|
|
117
|
+
{[item?.authors?.[0]?.first_name, item?.authors?.[0]?.last_name]
|
|
118
|
+
?.map((v) => v?.[0])
|
|
119
|
+
.filter(Boolean)
|
|
120
|
+
.join("")
|
|
121
|
+
.toUpperCase()}
|
|
122
|
+
</AvatarFallbackV2>
|
|
123
|
+
</Avatar>
|
|
124
|
+
<Box elementKey={`blogs.${index}.author-info-wrapper`}>
|
|
125
|
+
<Heading elementKey={`blogs.${index}.author-name`}>
|
|
126
|
+
{item?.authors?.[0]
|
|
127
|
+
? [item?.authors?.[0]?.first_name, item?.authors?.[0]?.last_name]
|
|
128
|
+
.filter(Boolean)
|
|
129
|
+
.join(" ")
|
|
130
|
+
: "Anonymous"}
|
|
131
|
+
</Heading>
|
|
132
|
+
<Typography elementKey={`blogs.${index}.author-description`}>
|
|
133
|
+
{item?.authors?.[0]?.bio || "Author"}
|
|
134
|
+
</Typography>
|
|
135
|
+
</Box>
|
|
136
|
+
</Box>
|
|
137
|
+
{item?.categories?.at(0)?.name && (
|
|
138
|
+
<Box elementKey={`blogs.${index}.category_wrapper`}>
|
|
139
|
+
<Icon elementKey={`blogs.${index}.category_icon`} />
|
|
140
|
+
<ClientOnly>
|
|
141
|
+
<Typography elementKey={`blogs.${index}.category`}>
|
|
142
|
+
{item?.categories?.at(0)?.name}
|
|
143
|
+
</Typography>
|
|
144
|
+
</ClientOnly>
|
|
145
|
+
</Box>
|
|
146
|
+
)}
|
|
147
|
+
</Box>
|
|
50
148
|
</Box>
|
|
51
149
|
<Button elementKey={`blogs.${index}.cta`} />
|
|
52
150
|
</Box>
|
|
53
151
|
</Box>
|
|
54
152
|
))}
|
|
55
153
|
</Box>
|
|
56
|
-
{
|
|
154
|
+
{response?.meta && (
|
|
57
155
|
<Box elementKey="pagination-wrapper">
|
|
58
156
|
<Button
|
|
59
157
|
elementKey="pagination-left"
|
|
@@ -61,12 +159,12 @@ const BlogListing3: React.FC<ILevoBlockBaseProps<IBlogListing3Content>> = ({}) =
|
|
|
61
159
|
onClick={handlePrevious}
|
|
62
160
|
/>
|
|
63
161
|
<Typography elementKey="pagination-text">
|
|
64
|
-
{`${query?.page || 0}/${meta?.pages || 0}`}
|
|
162
|
+
{`${query?.page || 0}/${response?.meta?.pages || 0}`}
|
|
65
163
|
</Typography>
|
|
66
164
|
<Button
|
|
67
165
|
elementKey="pagination-right"
|
|
68
166
|
onClick={handleNext}
|
|
69
|
-
disabled={query?.page === meta?.pages}
|
|
167
|
+
disabled={query?.page === response?.meta?.pages}
|
|
70
168
|
/>
|
|
71
169
|
</Box>
|
|
72
170
|
)}
|
|
@@ -19,17 +19,6 @@ const MEDIA = {
|
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const DUMMY_ICON = {
|
|
23
|
-
kind: "icon",
|
|
24
|
-
data: {
|
|
25
|
-
id: "archive-minus",
|
|
26
|
-
label: "Archive Minus",
|
|
27
|
-
tags: ["archive", "custom", "directional", "minus"],
|
|
28
|
-
svgCode:
|
|
29
|
-
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.5 11.4H9.5C9.09 11.4 8.75 11.06 8.75 10.65C8.75 10.24 9.09 9.90002 9.5 9.90002H14.5C14.91 9.90002 15.25 10.24 15.25 10.65C15.25 11.06 14.91 11.4 14.5 11.4Z" fill="var(--color-icon-primary)"/>\n<path d="M4.92957 22.75C4.50957 22.75 4.11957 22.65 3.76957 22.45C2.99957 22 2.55957 21.09 2.55957 19.96V5.86C2.55957 3.32 4.62957 1.25 7.16957 1.25H16.8196C19.3596 1.25 21.4296 3.32 21.4296 5.86V19.95C21.4296 21.08 20.9896 21.99 20.2196 22.44C19.4496 22.89 18.4396 22.84 17.4496 22.29L12.5696 19.58C12.2796 19.42 11.7096 19.42 11.4196 19.58L6.53957 22.29C5.99957 22.59 5.44957 22.75 4.92957 22.75ZM7.17957 2.75C5.46957 2.75 4.06957 4.15 4.06957 5.86V19.95C4.06957 20.54 4.23957 20.98 4.53957 21.15C4.83957 21.33 5.30957 21.27 5.81957 20.98L10.6996 18.27C11.4396 17.86 12.5596 17.86 13.2996 18.27L18.1796 20.98C18.6896 21.27 19.1596 21.33 19.4596 21.15C19.7596 20.97 19.9296 20.53 19.9296 19.95V5.86C19.9296 4.15 18.5296 2.75 16.8196 2.75H7.17957Z" fill="var(--color-icon-primary)"/>\n</svg>',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
22
|
const DEFAULT_CONTENT = {
|
|
34
23
|
layout: null,
|
|
35
24
|
container: null,
|
|
@@ -42,14 +31,49 @@ const DEFAULT_CONTENT = {
|
|
|
42
31
|
"meta-info": null,
|
|
43
32
|
"author-container": null,
|
|
44
33
|
"author-image-container": null,
|
|
45
|
-
"author-image":
|
|
34
|
+
"author-image": {
|
|
35
|
+
kind: "icon",
|
|
36
|
+
data: {
|
|
37
|
+
id: "archive-minus",
|
|
38
|
+
label: "Archive Minus",
|
|
39
|
+
tags: ["archive", "custom", "directional", "minus"],
|
|
40
|
+
svgCode:
|
|
41
|
+
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.5 11.4H9.5C9.09 11.4 8.75 11.06 8.75 10.65C8.75 10.24 9.09 9.90002 9.5 9.90002H14.5C14.91 9.90002 15.25 10.24 15.25 10.65C15.25 11.06 14.91 11.4 14.5 11.4Z" fill="var(--color-icon-primary)"/>\n<path d="M4.92957 22.75C4.50957 22.75 4.11957 22.65 3.76957 22.45C2.99957 22 2.55957 21.09 2.55957 19.96V5.86C2.55957 3.32 4.62957 1.25 7.16957 1.25H16.8196C19.3596 1.25 21.4296 3.32 21.4296 5.86V19.95C21.4296 21.08 20.9896 21.99 20.2196 22.44C19.4496 22.89 18.4396 22.84 17.4496 22.29L12.5696 19.58C12.2796 19.42 11.7096 19.42 11.4196 19.58L6.53957 22.29C5.99957 22.59 5.44957 22.75 4.92957 22.75ZM7.17957 2.75C5.46957 2.75 4.06957 4.15 4.06957 5.86V19.95C4.06957 20.54 4.23957 20.98 4.53957 21.15C4.83957 21.33 5.30957 21.27 5.81957 20.98L10.6996 18.27C11.4396 17.86 12.5596 17.86 13.2996 18.27L18.1796 20.98C18.6896 21.27 19.1596 21.33 19.4596 21.15C19.7596 20.97 19.9296 20.53 19.9296 19.95V5.86C19.9296 4.15 18.5296 2.75 16.8196 2.75H7.17957Z" fill="var(--color-icon-primary)"/>\n</svg>',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
46
44
|
"author-name": "John Doe",
|
|
47
45
|
"publish-date": "2025-05-20T10:23:31.297Z",
|
|
48
46
|
"reading-time": "10 Minutes",
|
|
49
|
-
"blog-cover":
|
|
47
|
+
"blog-cover": {
|
|
48
|
+
id: "7141014160938075687",
|
|
49
|
+
location: "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH.png",
|
|
50
|
+
kind: "image",
|
|
51
|
+
mimetype: "image/png",
|
|
52
|
+
srcset: {
|
|
53
|
+
"1080w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1080w.webp",
|
|
54
|
+
"1200w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1200w.webp",
|
|
55
|
+
"1920w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1920w.webp",
|
|
56
|
+
"320w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-320w.webp",
|
|
57
|
+
"640w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-640w.webp",
|
|
58
|
+
"750w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-750w.webp",
|
|
59
|
+
"828w": "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-828w.webp",
|
|
60
|
+
path: "https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-640w.webp 640w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1080w.webp 1080w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1200w.webp 1200w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-1920w.webp 1920w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-320w.webp 320w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-750w.webp 750w, https://space.levo.so/WLZ1TXTD/defaultblue-tryFJ012mgyH-828w.webp 828w",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
50
63
|
"content-section": null,
|
|
51
64
|
content:
|
|
52
65
|
"Experience the difference of professional financial planning with our proven methodologies.",
|
|
66
|
+
"toc-title": "Table of Contents",
|
|
67
|
+
"toc-item-icon": {
|
|
68
|
+
kind: "icon",
|
|
69
|
+
data: {
|
|
70
|
+
id: "minus",
|
|
71
|
+
label: "Minus",
|
|
72
|
+
tags: ["custom", "essential", "minus"],
|
|
73
|
+
svgCode:
|
|
74
|
+
'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.75H6C5.59 12.75 5.25 12.41 5.25 12C5.25 11.59 5.59 11.25 6 11.25H18C18.41 11.25 18.75 11.59 18.75 12C18.75 12.41 18.41 12.75 18 12.75Z" fill="var(--color-icon-primary)"/>\n</svg>',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
53
77
|
};
|
|
54
78
|
|
|
55
79
|
export type IBlogPost1Content = typeof DEFAULT_CONTENT;
|
|
@@ -61,6 +85,7 @@ export const BlogPost1: IBlock = {
|
|
|
61
85
|
version: "v1",
|
|
62
86
|
prompt_description:
|
|
63
87
|
"Centered layout with a category label above a large headline, author and details underneath, a wide featured image, and a brief supporting text at the bottom left.",
|
|
88
|
+
source: [{ required: true, module: "blog", type: "page" }],
|
|
64
89
|
content_schema: [
|
|
65
90
|
{
|
|
66
91
|
key: "layout",
|
|
@@ -117,6 +142,12 @@ export const BlogPost1: IBlock = {
|
|
|
117
142
|
min_characters: 7,
|
|
118
143
|
max_characters: 28,
|
|
119
144
|
},
|
|
145
|
+
options: {
|
|
146
|
+
module_field: {
|
|
147
|
+
module: "blog",
|
|
148
|
+
key: "categories[0].name",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
120
151
|
},
|
|
121
152
|
{
|
|
122
153
|
key: "title-section",
|
|
@@ -137,6 +168,12 @@ export const BlogPost1: IBlock = {
|
|
|
137
168
|
min_characters: 28,
|
|
138
169
|
max_characters: 60,
|
|
139
170
|
},
|
|
171
|
+
options: {
|
|
172
|
+
module_field: {
|
|
173
|
+
module: "blog",
|
|
174
|
+
key: "title",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
140
177
|
},
|
|
141
178
|
{
|
|
142
179
|
key: "meta-info",
|
|
@@ -157,17 +194,11 @@ export const BlogPost1: IBlock = {
|
|
|
157
194
|
},
|
|
158
195
|
},
|
|
159
196
|
{
|
|
160
|
-
key: "author-
|
|
161
|
-
label: "Author
|
|
162
|
-
field_interface: "
|
|
163
|
-
hint: {
|
|
164
|
-
prompt_description:
|
|
165
|
-
"Square profile photo of the author, small in size, used as an avatar next to the name.",
|
|
166
|
-
orientation: "square",
|
|
167
|
-
size: "icon",
|
|
168
|
-
usecase: "avatar",
|
|
169
|
-
},
|
|
197
|
+
key: "author-info-wrapper",
|
|
198
|
+
label: "Author Info Wrapper",
|
|
199
|
+
field_interface: "BoxWidget",
|
|
170
200
|
},
|
|
201
|
+
|
|
171
202
|
{
|
|
172
203
|
key: "author-name",
|
|
173
204
|
label: "Author Name",
|
|
@@ -179,6 +210,30 @@ export const BlogPost1: IBlock = {
|
|
|
179
210
|
min_characters: 5,
|
|
180
211
|
max_characters: 28,
|
|
181
212
|
},
|
|
213
|
+
options: {
|
|
214
|
+
module_field: {
|
|
215
|
+
module: "blog",
|
|
216
|
+
key: "authors[0]",
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
key: "author-description",
|
|
222
|
+
label: "Author Description",
|
|
223
|
+
field_interface: "TypographyWidget",
|
|
224
|
+
hint: {
|
|
225
|
+
prompt_description:
|
|
226
|
+
"Author's description. Use proper capitalization, 2–3 words, simple formality.",
|
|
227
|
+
usecase: "author",
|
|
228
|
+
min_characters: 5,
|
|
229
|
+
max_characters: 28,
|
|
230
|
+
},
|
|
231
|
+
options: {
|
|
232
|
+
module_field: {
|
|
233
|
+
module: "blog",
|
|
234
|
+
key: "authors[0]",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
182
237
|
},
|
|
183
238
|
{
|
|
184
239
|
key: "publish-date",
|
|
@@ -191,6 +246,12 @@ export const BlogPost1: IBlock = {
|
|
|
191
246
|
min_characters: 10,
|
|
192
247
|
max_characters: 20,
|
|
193
248
|
},
|
|
249
|
+
options: {
|
|
250
|
+
module_field: {
|
|
251
|
+
module: "blog",
|
|
252
|
+
key: "published_at",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
194
255
|
},
|
|
195
256
|
{
|
|
196
257
|
key: "reading-time",
|
|
@@ -203,6 +264,12 @@ export const BlogPost1: IBlock = {
|
|
|
203
264
|
min_characters: 6,
|
|
204
265
|
max_characters: 13,
|
|
205
266
|
},
|
|
267
|
+
options: {
|
|
268
|
+
module_field: {
|
|
269
|
+
module: "blog",
|
|
270
|
+
key: "reading_time",
|
|
271
|
+
},
|
|
272
|
+
},
|
|
206
273
|
},
|
|
207
274
|
{
|
|
208
275
|
key: "blog-cover",
|
|
@@ -210,11 +277,80 @@ export const BlogPost1: IBlock = {
|
|
|
210
277
|
field_interface: "MediaWidget",
|
|
211
278
|
hint: {
|
|
212
279
|
prompt_description:
|
|
213
|
-
"Large, visually engaging banner illustrating the article
|
|
280
|
+
"Large, visually engaging banner illustrating the article's theme. Use abstract, thematic, or relevant imagery. Should be clear and unobtrusive for a blog hero.",
|
|
214
281
|
orientation: "landscape",
|
|
215
282
|
size: "large",
|
|
216
283
|
usecase: "hero",
|
|
217
284
|
},
|
|
285
|
+
options: {
|
|
286
|
+
module_field: {
|
|
287
|
+
module: "blog",
|
|
288
|
+
key: "cover_image",
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
key: "content-wrapper",
|
|
294
|
+
label: "Content Wrapper",
|
|
295
|
+
field_interface: "BoxWidget",
|
|
296
|
+
hint: {
|
|
297
|
+
prompt_description:
|
|
298
|
+
"Main body container for the blog content. No direct content needed here.",
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
key: "toc-container",
|
|
303
|
+
label: "Table of Contents Container",
|
|
304
|
+
field_interface: "BoxWidget",
|
|
305
|
+
hint: {
|
|
306
|
+
prompt_description: "Container for the table of contents. No direct content needed here.",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
key: "toc-title",
|
|
311
|
+
label: "Table of Contents Title",
|
|
312
|
+
field_interface: "HeadingWidget",
|
|
313
|
+
hint: {
|
|
314
|
+
prompt_description: "Table of Contents Title",
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
key: "toc-list",
|
|
319
|
+
label: "Table of Contents List",
|
|
320
|
+
field_interface: "BoxWidget",
|
|
321
|
+
hint: {
|
|
322
|
+
prompt_description: "Table of Contents List",
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
key: "toc-item-container",
|
|
327
|
+
label: "Table of Contents Item Container",
|
|
328
|
+
field_interface: "BoxWidget",
|
|
329
|
+
hint: {
|
|
330
|
+
prompt_description: "Table of Contents Item Container",
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
key: "toc-item-icon",
|
|
335
|
+
label: "Table of Contents Item Icon",
|
|
336
|
+
field_interface: "IconWidget",
|
|
337
|
+
hint: {
|
|
338
|
+
prompt_description: "Table of Contents Item Icon",
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
key: "toc-item",
|
|
343
|
+
label: "Table of Contents Item",
|
|
344
|
+
field_interface: "TypographyWidget",
|
|
345
|
+
hint: {
|
|
346
|
+
prompt_description: "Table of Contents Item",
|
|
347
|
+
},
|
|
348
|
+
options: {
|
|
349
|
+
module_field: {
|
|
350
|
+
module: "blog",
|
|
351
|
+
key: "table-of-content",
|
|
352
|
+
},
|
|
353
|
+
},
|
|
218
354
|
},
|
|
219
355
|
{
|
|
220
356
|
key: "content-section",
|
|
@@ -236,6 +372,12 @@ export const BlogPost1: IBlock = {
|
|
|
236
372
|
min_characters: 800,
|
|
237
373
|
max_characters: 12000,
|
|
238
374
|
},
|
|
375
|
+
options: {
|
|
376
|
+
module_field: {
|
|
377
|
+
module: "blog",
|
|
378
|
+
key: "content.html",
|
|
379
|
+
},
|
|
380
|
+
},
|
|
239
381
|
},
|
|
240
382
|
],
|
|
241
383
|
layouts: [
|
|
@@ -249,15 +391,13 @@ export const BlogPost1: IBlock = {
|
|
|
249
391
|
"padding-bottom": "10xl",
|
|
250
392
|
"padding-right": "8xl",
|
|
251
393
|
"padding-left": "8xl",
|
|
252
|
-
|
|
394
|
+
tablet: {
|
|
253
395
|
"padding-top": "5xl",
|
|
254
396
|
"padding-bottom": "5xl",
|
|
255
397
|
"padding-right": "5xl",
|
|
256
398
|
"padding-left": "5xl",
|
|
257
399
|
},
|
|
258
|
-
|
|
259
|
-
// "padding-top": "2xl",
|
|
260
|
-
// "padding-bottom": "2xl",
|
|
400
|
+
mobile: {
|
|
261
401
|
"padding-right": "2xl",
|
|
262
402
|
"padding-left": "2xl",
|
|
263
403
|
"padding-top": "7xl",
|
|
@@ -285,7 +425,7 @@ export const BlogPost1: IBlock = {
|
|
|
285
425
|
},
|
|
286
426
|
"tag-container": {
|
|
287
427
|
width: "fit-content",
|
|
288
|
-
"border-radius": "
|
|
428
|
+
"border-radius": "md",
|
|
289
429
|
border: "1px solid",
|
|
290
430
|
"border-color": "var(--color-border)",
|
|
291
431
|
"background-color": "#E9E9EB",
|
|
@@ -320,7 +460,7 @@ export const BlogPost1: IBlock = {
|
|
|
320
460
|
color: "var(--color-text-2)",
|
|
321
461
|
},
|
|
322
462
|
"author-container": {
|
|
323
|
-
display: "
|
|
463
|
+
display: "none",
|
|
324
464
|
"align-items": "center",
|
|
325
465
|
"column-gap": "2xs",
|
|
326
466
|
"row-gap": "2xs",
|
|
@@ -331,7 +471,7 @@ export const BlogPost1: IBlock = {
|
|
|
331
471
|
"border-radius": "100%",
|
|
332
472
|
},
|
|
333
473
|
"author-name": {
|
|
334
|
-
|
|
474
|
+
"font-size": "base",
|
|
335
475
|
},
|
|
336
476
|
"publish-date": {
|
|
337
477
|
"font-size": "sm",
|
|
@@ -355,6 +495,19 @@ export const BlogPost1: IBlock = {
|
|
|
355
495
|
height: "164px",
|
|
356
496
|
},
|
|
357
497
|
},
|
|
498
|
+
"content-wrapper": {
|
|
499
|
+
display: "grid",
|
|
500
|
+
"grid-template-columns": "256px 1fr",
|
|
501
|
+
"column-gap": "3xl",
|
|
502
|
+
"align-items": "start",
|
|
503
|
+
tablet: {
|
|
504
|
+
"grid-template-columns": "1fr",
|
|
505
|
+
"row-gap": "xl",
|
|
506
|
+
},
|
|
507
|
+
mobile: {
|
|
508
|
+
"grid-template-columns": "1fr",
|
|
509
|
+
},
|
|
510
|
+
},
|
|
358
511
|
"content-section": {
|
|
359
512
|
display: "flex",
|
|
360
513
|
width: "full",
|
|
@@ -371,10 +524,66 @@ export const BlogPost1: IBlock = {
|
|
|
371
524
|
},
|
|
372
525
|
content: {
|
|
373
526
|
display: "flex",
|
|
374
|
-
width: "
|
|
527
|
+
width: "100%",
|
|
375
528
|
"flex-direction": "column",
|
|
376
529
|
"row-gap": "xl",
|
|
377
530
|
},
|
|
531
|
+
"toc-container": {
|
|
532
|
+
display: "flex",
|
|
533
|
+
"flex-direction": "column",
|
|
534
|
+
"row-gap": "lg",
|
|
535
|
+
"padding-left": "lg",
|
|
536
|
+
"padding-right": "lg",
|
|
537
|
+
"padding-top": "lg",
|
|
538
|
+
"padding-bottom": "lg",
|
|
539
|
+
"border-radius": "lg",
|
|
540
|
+
"max-width": "256px",
|
|
541
|
+
"border-style": "solid",
|
|
542
|
+
"border-width": "1px",
|
|
543
|
+
"border-color": "border",
|
|
544
|
+
position: "sticky",
|
|
545
|
+
top: "2rem",
|
|
546
|
+
width: "100%",
|
|
547
|
+
tablet: {
|
|
548
|
+
"max-width": "100%",
|
|
549
|
+
"row-gap": "md",
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
"toc-title": {
|
|
553
|
+
"font-weight": 600,
|
|
554
|
+
tablet: {
|
|
555
|
+
"text-align": "center",
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
"toc-list": {
|
|
559
|
+
display: "flex",
|
|
560
|
+
"flex-direction": "column",
|
|
561
|
+
"row-gap": "2xs",
|
|
562
|
+
},
|
|
563
|
+
"toc-item": {
|
|
564
|
+
display: "-webkit-box",
|
|
565
|
+
"-webkit-line-clamp": "3",
|
|
566
|
+
"-webkit-box-orient": "vertical",
|
|
567
|
+
overflow: "hidden",
|
|
568
|
+
_hover: {
|
|
569
|
+
color: "text-1",
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
"toc-item-container": {
|
|
573
|
+
display: "flex",
|
|
574
|
+
"column-gap": "sm",
|
|
575
|
+
},
|
|
576
|
+
"toc-item-icon": {
|
|
577
|
+
height: "10px",
|
|
578
|
+
width: "10px",
|
|
579
|
+
"font-size": "10px",
|
|
580
|
+
"min-width": "10px",
|
|
581
|
+
"margin-top": "4xs",
|
|
582
|
+
color: "text-2",
|
|
583
|
+
},
|
|
584
|
+
"author-description": {
|
|
585
|
+
"font-size": "sm",
|
|
586
|
+
},
|
|
378
587
|
},
|
|
379
588
|
content: DEFAULT_CONTENT,
|
|
380
589
|
config: {
|
|
@@ -390,6 +599,27 @@ export const BlogPost1: IBlock = {
|
|
|
390
599
|
selectedVariants: {
|
|
391
600
|
Heading_Level: "H6",
|
|
392
601
|
},
|
|
602
|
+
heading: {
|
|
603
|
+
level: "4",
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
"toc-title": {
|
|
607
|
+
heading: {
|
|
608
|
+
level: "5",
|
|
609
|
+
},
|
|
610
|
+
selectedVariants: {
|
|
611
|
+
Heading_Level: "H6",
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
"toc-item": {
|
|
615
|
+
selectedVariants: {
|
|
616
|
+
Typography_Variants: "Small",
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
"author-description": {
|
|
620
|
+
selectedVariants: {
|
|
621
|
+
Typography_Variants: "Small",
|
|
622
|
+
},
|
|
393
623
|
},
|
|
394
624
|
},
|
|
395
625
|
},
|