@brunoalz/smartgesti-site-editor 1.7.0 → 1.9.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/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +585 -227
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.js +264 -112
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -1
- package/dist/engine/plugins/contentHydration.js +93 -77
- package/dist/engine/plugins/contentHydration.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js +0 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostGrid.js +321 -6
- package/dist/engine/registry/blocks/sections/blogPostGrid.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js +11 -2
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.js +0 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js +35 -33
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js +251 -66
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js +31 -30
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +36 -1
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/shared/iconUtils.d.ts +25 -0
- package/dist/engine/shared/iconUtils.d.ts.map +1 -0
- package/dist/engine/shared/iconUtils.js +43 -0
- package/dist/engine/shared/iconUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,282 +1,640 @@
|
|
|
1
|
-
import { escapeHtml as e, dataBlockIdAttr as
|
|
2
|
-
import { generateScopedId as
|
|
3
|
-
import { resolveResponsiveColumns as
|
|
4
|
-
import { resolveWidgetShadow as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { escapeHtml as e, dataBlockIdAttr as ie } from "../../shared/htmlHelpers.js";
|
|
2
|
+
import { generateScopedId as Oe } from "../../shared/idGenerator.js";
|
|
3
|
+
import { resolveResponsiveColumns as Le, generateResponsiveGridStyles as qe } from "../../shared/responsiveGridHelper.js";
|
|
4
|
+
import { resolveWidgetShadow as be } from "../../../shared/widgetStyles.js";
|
|
5
|
+
import { renderInlineSvgIcon as De } from "../../../shared/iconUtils.js";
|
|
6
|
+
import { generateLinkHoverStyles as ye } from "../../../shared/hoverEffects/linkHover.js";
|
|
7
|
+
import { generateButtonHoverStyles as Ye, generateButtonOverlayCSS as We, getButtonHoverKeyframes as Fe } from "../../../shared/hoverEffects/buttonHover.js";
|
|
8
|
+
function je(t, s) {
|
|
9
|
+
return !t || t.length <= s ? t : t.substring(0, s).trim() + "...";
|
|
10
|
+
}
|
|
11
|
+
function Ne(t) {
|
|
12
|
+
const s = {
|
|
13
|
+
none: "none",
|
|
14
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
15
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
16
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
17
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
18
|
+
};
|
|
19
|
+
return s[t] || s.md;
|
|
20
|
+
}
|
|
21
|
+
function Te(t, s, d) {
|
|
22
|
+
if (s === "none") return "";
|
|
23
|
+
let u = "";
|
|
24
|
+
switch (s) {
|
|
25
|
+
case "lift":
|
|
26
|
+
u = "transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);";
|
|
27
|
+
break;
|
|
28
|
+
case "scale":
|
|
29
|
+
u = "transform: scale(1.02);";
|
|
30
|
+
break;
|
|
31
|
+
case "glow":
|
|
32
|
+
u = "box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);";
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
return `
|
|
38
|
+
#${t} { transition: all 0.3s ease; }
|
|
39
|
+
#${t}:hover { ${u} }
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
function Me(t, s, d) {
|
|
43
|
+
if (d === "none") return "";
|
|
44
|
+
let u = "";
|
|
45
|
+
switch (d) {
|
|
46
|
+
case "zoom":
|
|
47
|
+
u = "transform: scale(1.1);";
|
|
48
|
+
break;
|
|
49
|
+
case "brightness":
|
|
50
|
+
u = "filter: brightness(1.1);";
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
return "";
|
|
54
|
+
}
|
|
55
|
+
return `
|
|
56
|
+
#${s} { transition: transform 0.3s ease, filter 0.3s ease; }
|
|
57
|
+
#${t}:hover #${s} { ${u} }
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
function $e(t) {
|
|
61
|
+
const {
|
|
62
|
+
cardId: s,
|
|
63
|
+
ctaId: d,
|
|
64
|
+
ctaVariation: u,
|
|
65
|
+
linkColor: r,
|
|
66
|
+
linkHoverColor: i,
|
|
67
|
+
linkHoverEffect: v,
|
|
68
|
+
linkHoverIntensity: b,
|
|
69
|
+
linkIconName: n,
|
|
70
|
+
linkIconPosition: H,
|
|
71
|
+
buttonVariant: g,
|
|
72
|
+
buttonColor: o,
|
|
73
|
+
buttonTextColor: l,
|
|
74
|
+
buttonRadius: h,
|
|
75
|
+
buttonSize: j,
|
|
76
|
+
buttonHoverEffect: y,
|
|
77
|
+
buttonHoverIntensity: p,
|
|
78
|
+
buttonHoverOverlay: z,
|
|
79
|
+
buttonHoverIconName: B
|
|
80
|
+
} = t;
|
|
81
|
+
if (u === "link") {
|
|
82
|
+
const c = `color: ${r}; font-weight: 600; text-decoration: none; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 0.25rem; transition: all 0.2s ease; position: relative;`, $ = ye({
|
|
83
|
+
effect: v,
|
|
84
|
+
intensity: b,
|
|
85
|
+
hoverColor: i
|
|
86
|
+
});
|
|
87
|
+
let S = "";
|
|
88
|
+
$.base && (S += `#${d} { ${$.base} }
|
|
89
|
+
`), S += `#${d}:hover { ${$.hover} }`;
|
|
90
|
+
const f = n ? De(n, "0.9em") : "";
|
|
91
|
+
return { inlineStyles: c, hoverCSS: S, iconHtml: f };
|
|
92
|
+
}
|
|
93
|
+
const x = {
|
|
94
|
+
sm: { padding: "0.5rem 1rem", fontSize: "0.875rem" },
|
|
95
|
+
md: { padding: "0.625rem 1.5rem", fontSize: "0.9375rem" },
|
|
96
|
+
lg: { padding: "0.75rem 2rem", fontSize: "1rem" }
|
|
97
|
+
}, w = x[j] || x.md, m = [
|
|
98
|
+
`padding: ${w.padding}`,
|
|
99
|
+
`font-size: ${w.fontSize}`,
|
|
100
|
+
"font-weight: 600",
|
|
101
|
+
"text-decoration: none",
|
|
102
|
+
"display: inline-flex",
|
|
103
|
+
"align-items: center",
|
|
104
|
+
"justify-content: center",
|
|
105
|
+
"gap: 0.5rem",
|
|
106
|
+
`border-radius: ${h}px`,
|
|
107
|
+
"transition: all 0.2s ease",
|
|
108
|
+
"cursor: pointer"
|
|
109
|
+
];
|
|
110
|
+
switch (g) {
|
|
111
|
+
case "outline":
|
|
112
|
+
m.push("background-color: transparent", `border: 2px solid ${o}`, `color: ${o}`);
|
|
113
|
+
break;
|
|
114
|
+
case "ghost":
|
|
115
|
+
m.push("background-color: transparent", "border: none", `color: ${o}`);
|
|
116
|
+
break;
|
|
117
|
+
default:
|
|
118
|
+
m.push(`background-color: ${o}`, `border: 2px solid ${o}`, `color: ${l}`);
|
|
119
|
+
}
|
|
120
|
+
const A = m.join("; ");
|
|
121
|
+
let k = "";
|
|
122
|
+
if (y !== "none") {
|
|
123
|
+
const c = Ye({
|
|
124
|
+
effect: y,
|
|
125
|
+
intensity: p,
|
|
126
|
+
buttonColor: o,
|
|
127
|
+
variant: g
|
|
128
|
+
});
|
|
129
|
+
c.base && (k += `#${d} { ${c.base} }
|
|
130
|
+
`), k += `#${d}:hover { ${c.hover} }
|
|
131
|
+
`, y === "pulse" && (k += Fe());
|
|
132
|
+
}
|
|
133
|
+
return z && z !== "none" && (k += We(`#${d}`, {
|
|
134
|
+
overlay: z,
|
|
135
|
+
primaryColor: o,
|
|
136
|
+
iconName: B,
|
|
137
|
+
textColor: g === "solid" ? l : o
|
|
138
|
+
})), { inlineStyles: A, hoverCSS: k, iconHtml: "" };
|
|
139
|
+
}
|
|
140
|
+
function ot(t, s, d, u) {
|
|
7
141
|
const {
|
|
8
|
-
title:
|
|
9
|
-
excerpt:
|
|
10
|
-
image:
|
|
11
|
-
date:
|
|
12
|
-
category:
|
|
13
|
-
authorName:
|
|
14
|
-
authorAvatar:
|
|
142
|
+
title: r,
|
|
143
|
+
excerpt: i,
|
|
144
|
+
image: v,
|
|
145
|
+
date: b,
|
|
146
|
+
category: n,
|
|
147
|
+
authorName: H,
|
|
148
|
+
authorAvatar: g,
|
|
15
149
|
readingTime: o,
|
|
16
|
-
linkHref:
|
|
17
|
-
linkText:
|
|
18
|
-
variant:
|
|
19
|
-
showImage:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
150
|
+
linkHref: l,
|
|
151
|
+
linkText: h = "Ler mais",
|
|
152
|
+
variant: j = "default",
|
|
153
|
+
showImage: y = !0,
|
|
154
|
+
showReadingTime: p = !1,
|
|
155
|
+
// Card customization
|
|
156
|
+
cardBorderRadius: z = "0.75rem",
|
|
157
|
+
cardShadow: B = "md",
|
|
158
|
+
cardHoverEffect: x = "lift",
|
|
159
|
+
cardBorder: w = !0,
|
|
160
|
+
cardBorderColor: m = "#e5e7eb",
|
|
161
|
+
cardBorderWidth: A = 1,
|
|
162
|
+
// Image effects
|
|
163
|
+
imageHoverEffect: k = "zoom",
|
|
164
|
+
imageBorderRadius: c = "0.75rem",
|
|
165
|
+
// Card content controls
|
|
166
|
+
showCategory: $ = !0,
|
|
167
|
+
categoryStyle: S = "badge",
|
|
168
|
+
showDate: f = !0,
|
|
169
|
+
showAuthor: C = !1,
|
|
170
|
+
excerptMaxLength: P = 150,
|
|
171
|
+
// CTA customization
|
|
172
|
+
ctaVariation: a = "link",
|
|
173
|
+
linkColor: I = "#2563eb",
|
|
174
|
+
linkHoverColor: E = "#1d4ed8",
|
|
175
|
+
linkHoverEffect: O = "underline",
|
|
176
|
+
linkHoverIntensity: se = 50,
|
|
177
|
+
linkIconName: ne = "",
|
|
178
|
+
linkIconPosition: T = "right",
|
|
179
|
+
buttonVariant: Y = "solid",
|
|
180
|
+
buttonColor: W = "#2563eb",
|
|
181
|
+
buttonTextColor: F = "#ffffff",
|
|
182
|
+
buttonRadius: G = 8,
|
|
183
|
+
buttonSize: U = "md",
|
|
184
|
+
buttonHoverEffect: K = "darken",
|
|
185
|
+
buttonHoverIntensity: Q = 20,
|
|
186
|
+
buttonHoverOverlay: J = "none",
|
|
187
|
+
buttonHoverIconName: _ = "arrow-right"
|
|
24
188
|
} = t.props;
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
189
|
+
if (j === "horizontal") {
|
|
190
|
+
const N = `card-${t.id}`, V = `img-${t.id}`, R = `cta-${t.id}`, ue = Ne(B), Pe = w ? `${A}px solid ${m}` : "none", re = Te(N, x), Ce = Me(N, V, k), ve = $e({
|
|
191
|
+
cardId: N,
|
|
192
|
+
ctaId: R,
|
|
193
|
+
ctaVariation: a,
|
|
194
|
+
linkColor: I,
|
|
195
|
+
linkHoverColor: E,
|
|
196
|
+
buttonVariant: Y,
|
|
197
|
+
buttonColor: W,
|
|
198
|
+
buttonTextColor: F,
|
|
199
|
+
buttonRadius: G,
|
|
200
|
+
buttonSize: U,
|
|
201
|
+
buttonHoverEffect: K,
|
|
202
|
+
buttonHoverIntensity: Q,
|
|
203
|
+
buttonHoverOverlay: J
|
|
204
|
+
}), oe = re + Ce + ve.hoverCSS, ze = y && v ? `<div style="width: 40%; min-width: 200px; overflow: hidden; flex-shrink: 0;"><img id="${V}" src="${e(v)}" alt="${e(r)}" style="width: 100%; height: 100%; min-height: 200px; object-fit: cover; display: block;" /></div>` : "";
|
|
205
|
+
let q = "";
|
|
206
|
+
if ($ && n || C) {
|
|
207
|
+
let me = "";
|
|
208
|
+
$ && n && (S === "badge" ? me = `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary, #3b82f6); color: white; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 9999px;">${e(n)}</span>` : me = `<span style="display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--sg-primary); text-transform: uppercase; letter-spacing: 0.05em;">${e(n)}</span>`);
|
|
209
|
+
let he = "";
|
|
210
|
+
C && (he = `<img src="${e(g || "https://i.pravatar.cc/150?img=68")}" alt="${e(H || "Autor")}" style="width: 28px; height: 28px; border-radius: 50%; object-fit: cover;" />`), q = `<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem;"><div>${me}</div><div>${he}</div></div>`;
|
|
211
|
+
}
|
|
212
|
+
const D = [];
|
|
213
|
+
f && b && D.push(e(b)), p && o && D.push(e(o));
|
|
214
|
+
const _e = D.length ? `<div style="display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.75rem;">${D.join(" <span>·</span> ")}</div>` : "", Re = i ? je(i, P) : "", ae = $e({
|
|
215
|
+
cardId: N,
|
|
216
|
+
ctaId: R,
|
|
217
|
+
ctaVariation: a,
|
|
218
|
+
linkColor: I,
|
|
219
|
+
linkHoverColor: E,
|
|
220
|
+
linkHoverEffect: O,
|
|
221
|
+
linkHoverIntensity: se,
|
|
222
|
+
linkIconName: ne,
|
|
223
|
+
linkIconPosition: T,
|
|
224
|
+
buttonVariant: Y,
|
|
225
|
+
buttonColor: W,
|
|
226
|
+
buttonTextColor: F,
|
|
227
|
+
buttonRadius: G,
|
|
228
|
+
buttonSize: U,
|
|
229
|
+
buttonHoverEffect: K,
|
|
230
|
+
buttonHoverIntensity: Q,
|
|
231
|
+
buttonHoverOverlay: J,
|
|
232
|
+
buttonHoverIconName: _
|
|
233
|
+
});
|
|
234
|
+
let Ie = "";
|
|
235
|
+
if (a === "link") {
|
|
236
|
+
const me = ae.iconHtml && T === "left" ? ae.iconHtml + " " : "", he = ae.iconHtml && T === "right" ? " " + ae.iconHtml : "", Ee = ae.iconHtml ? "" : " →";
|
|
237
|
+
Ie = me + e(h) + he + Ee;
|
|
238
|
+
} else
|
|
239
|
+
Ie = e(h);
|
|
240
|
+
const Ve = h && l ? `<a id="${R}" href="${e(l)}" style="${ae.inlineStyles}">${Ie}</a>` : "";
|
|
241
|
+
return `${oe ? `<style>${oe}</style>` : ""}<article id="${N}" class="sg-blog-post-card" style="display: flex; background-color: var(--sg-surface, #ffffff); border-radius: ${z}; overflow: hidden; box-shadow: ${ue}; border: ${Pe};" data-variant="horizontal" data-block-group="Card">${ze}<div style="padding: 1.5rem; display: flex; flex-direction: column; flex: 1;">${q}${_e}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${l ? `<a href="${e(l)}" style="color: inherit; text-decoration: none;">${e(r)}</a>` : e(r)}</h3>${Re ? `<p style="color: var(--sg-muted-text); font-size: 0.9375rem; margin-bottom: 1rem;">${e(Re)}</p>` : ""}<div style="margin-top: auto;">${Ve}</div></div></article>`;
|
|
242
|
+
}
|
|
243
|
+
if (j === "minimal") {
|
|
244
|
+
const N = `card-${t.id}`, V = `cta-${t.id}`, R = $e({
|
|
245
|
+
cardId: N,
|
|
246
|
+
ctaId: V,
|
|
247
|
+
ctaVariation: a,
|
|
248
|
+
linkColor: I,
|
|
249
|
+
linkHoverColor: E,
|
|
250
|
+
linkHoverEffect: O,
|
|
251
|
+
linkHoverIntensity: se,
|
|
252
|
+
linkIconName: ne,
|
|
253
|
+
linkIconPosition: T,
|
|
254
|
+
buttonVariant: Y,
|
|
255
|
+
buttonColor: W,
|
|
256
|
+
buttonTextColor: F,
|
|
257
|
+
buttonRadius: G,
|
|
258
|
+
buttonSize: U,
|
|
259
|
+
buttonHoverEffect: K,
|
|
260
|
+
buttonHoverIntensity: Q,
|
|
261
|
+
buttonHoverOverlay: J,
|
|
262
|
+
buttonHoverIconName: _
|
|
263
|
+
});
|
|
264
|
+
let ue = "";
|
|
265
|
+
if ($ && n || C) {
|
|
266
|
+
let q = "";
|
|
267
|
+
$ && n && (S === "badge" ? q = `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary, #3b82f6); color: white; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 9999px;">${e(n)}</span>` : q = `<span style="display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--sg-primary); text-transform: uppercase; letter-spacing: 0.05em;">${e(n)}</span>`);
|
|
268
|
+
let ge = "";
|
|
269
|
+
C && (ge = `<img src="${e(g || "https://i.pravatar.cc/150?img=68")}" alt="${e(H || "Autor")}" style="width: 24px; height: 24px; border-radius: 50%; object-fit: cover;" />`), ue = `<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;"><div>${q}</div><div>${ge}</div></div>`;
|
|
270
|
+
}
|
|
271
|
+
const re = [];
|
|
272
|
+
f && b && re.push(e(b)), p && o && re.push(e(o));
|
|
273
|
+
const Ce = re.length ? `<div style="display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${re.join(" <span>·</span> ")}</div>` : "", ve = i ? je(i, P) : "";
|
|
274
|
+
let oe = "";
|
|
275
|
+
if (a === "link") {
|
|
276
|
+
const q = R.iconHtml && T === "left" ? R.iconHtml + " " : "", ge = R.iconHtml && T === "right" ? " " + R.iconHtml : "", D = R.iconHtml ? "" : " →";
|
|
277
|
+
oe = q + e(h) + ge + D;
|
|
278
|
+
} else
|
|
279
|
+
oe = e(h);
|
|
280
|
+
const ze = h && l ? `<a id="${V}" href="${e(l)}" style="${R.inlineStyles}">${oe}</a>` : "";
|
|
281
|
+
return `${R.hoverCSS ? `<style>${R.hoverCSS}</style>` : ""}<article id="${N}" class="sg-blog-post-card" style="padding: 1.25rem 0; border-bottom: 1px solid var(--sg-border, #e5e7eb);" data-variant="minimal" data-block-group="Card">${ue}${Ce}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${l ? `<a href="${e(l)}" style="color: inherit; text-decoration: none;">${e(r)}</a>` : e(r)}</h3>${ve ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 0.75rem;">${e(ve)}</p>` : ""}${ze}</article>`;
|
|
30
282
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
283
|
+
const L = `card-${t.id}`, X = `img-${t.id}`, le = `cta-${t.id}`, xe = Ne(B), we = w ? "1px solid var(--sg-border, #e5e7eb)" : "none", He = Te(L, x), ke = Me(L, X, k), M = $e({
|
|
284
|
+
cardId: L,
|
|
285
|
+
ctaId: le,
|
|
286
|
+
ctaVariation: a,
|
|
287
|
+
linkColor: I,
|
|
288
|
+
linkHoverColor: E,
|
|
289
|
+
linkHoverEffect: O,
|
|
290
|
+
linkHoverIntensity: se,
|
|
291
|
+
linkIconName: ne,
|
|
292
|
+
linkIconPosition: T,
|
|
293
|
+
buttonVariant: Y,
|
|
294
|
+
buttonColor: W,
|
|
295
|
+
buttonTextColor: F,
|
|
296
|
+
buttonRadius: G,
|
|
297
|
+
buttonSize: U,
|
|
298
|
+
buttonHoverEffect: K,
|
|
299
|
+
buttonHoverIntensity: Q,
|
|
300
|
+
buttonHoverOverlay: J,
|
|
301
|
+
buttonHoverIconName: _
|
|
302
|
+
}), pe = He + ke + M.hoverCSS, Z = y && v ? `<div style="height: 200px; overflow: hidden; border-radius: ${c} ${c} 0 0;"><img id="${X}" src="${e(v)}" alt="${e(r)}" style="width: 100%; height: 100%; object-fit: cover; display: block;" /></div>` : "";
|
|
303
|
+
let fe = "";
|
|
304
|
+
if ($ && n || C) {
|
|
305
|
+
let N = "";
|
|
306
|
+
$ && n && (S === "badge" ? N = `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary, #3b82f6); color: white; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 9999px;">${e(n)}</span>` : N = `<span style="display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--sg-primary); text-transform: uppercase; letter-spacing: 0.05em;">${e(n)}</span>`);
|
|
307
|
+
let V = "";
|
|
308
|
+
C && (V = `<img src="${e(g || "https://i.pravatar.cc/150?img=68")}" alt="${e(H || "Autor")}" style="width: 28px; height: 28px; border-radius: 50%; object-fit: cover;" />`), fe = `<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem;"><div>${N}</div><div>${V}</div></div>`;
|
|
36
309
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
310
|
+
const ee = [];
|
|
311
|
+
f && b && ee.push(e(b)), p && o && ee.push(e(o));
|
|
312
|
+
const Se = ee.length ? `<div style="display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.75rem; flex-wrap: wrap;">${ee.join(' <span style="color: var(--sg-muted-text);">·</span> ')}</div>` : "";
|
|
313
|
+
let de = "";
|
|
314
|
+
if (a === "link") {
|
|
315
|
+
const N = M.iconHtml && T === "left" ? M.iconHtml + " " : "", V = M.iconHtml && T === "right" ? " " + M.iconHtml : "", R = M.iconHtml ? "" : " →";
|
|
316
|
+
de = N + e(h) + V + R;
|
|
317
|
+
} else
|
|
318
|
+
de = e(h);
|
|
319
|
+
const ce = h && l ? `<a id="${le}" href="${e(l)}" style="${M.inlineStyles}">${de}</a>` : "", te = i ? je(i, P) : "";
|
|
320
|
+
return `${pe ? `<style>${pe}</style>` : ""}<article id="${L}" class="sg-blog-post-card" style="background-color: var(--sg-surface, #ffffff); border-radius: ${z}; overflow: hidden; box-shadow: ${xe}; border: ${we}; display: flex; flex-direction: column;" data-variant="default" data-block-group="Card">${Z}<div style="padding: 1.5rem; display: flex; flex-direction: column; flex: 1;">${fe}${Se}<h3 style="font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.3;">${l ? `<a href="${e(l)}" style="color: inherit; text-decoration: none;">${e(r)}</a>` : e(r)}</h3>${te ? `<p style="color: var(--sg-muted-text); font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1rem; flex: 1;">${e(te)}</p>` : ""}<div style="margin-top: auto;">${ce}</div></div></article>`;
|
|
41
321
|
}
|
|
42
|
-
function
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
return `${t}${
|
|
322
|
+
function Be(t, s) {
|
|
323
|
+
if (s <= 1) return t;
|
|
324
|
+
const d = t.includes("?") ? "&" : "?";
|
|
325
|
+
return `${t}${d}pagina=${s}`;
|
|
46
326
|
}
|
|
47
|
-
function
|
|
48
|
-
if (
|
|
49
|
-
return Array.from({ length:
|
|
50
|
-
const
|
|
51
|
-
t > 3 &&
|
|
52
|
-
const
|
|
53
|
-
for (let
|
|
54
|
-
return t <
|
|
327
|
+
function Ge(t, s) {
|
|
328
|
+
if (s <= 7)
|
|
329
|
+
return Array.from({ length: s }, (i, v) => v + 1);
|
|
330
|
+
const d = [1];
|
|
331
|
+
t > 3 && d.push(-1);
|
|
332
|
+
const u = Math.max(2, t - 1), r = Math.min(s - 1, t + 1);
|
|
333
|
+
for (let i = u; i <= r; i++) d.push(i);
|
|
334
|
+
return t < s - 2 && d.push(-1), d[d.length - 1] !== s && d.push(s), d;
|
|
55
335
|
}
|
|
56
|
-
function
|
|
57
|
-
if (
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
return `<span style="${
|
|
61
|
-
const
|
|
62
|
-
return `<a href="${e(
|
|
63
|
-
}).join(""),
|
|
64
|
-
return `<nav data-block-group="Paginação" style="display:flex;justify-content:center;align-items:center;gap:0.375rem;margin-top:2.5rem;">${
|
|
336
|
+
function Ue(t, s, d) {
|
|
337
|
+
if (s <= 1) return "";
|
|
338
|
+
const u = "display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:var(--sg-card-radius, 0.5rem);text-decoration:none;font-size:0.875rem;", r = "border:1px solid var(--sg-border, #e5e7eb);", i = "border:1px solid var(--sg-primary);", v = t > 1 ? `<a href="${e(Be(d, t - 1))}" style="${u}${r}color:var(--sg-text);">‹</a>` : `<span style="${u}${r}color:var(--sg-muted-text);opacity:0.4;">‹</span>`, n = Ge(t, s).map((g, o) => {
|
|
339
|
+
if (g === -1)
|
|
340
|
+
return `<span style="${u}color:var(--sg-muted-text);">…</span>`;
|
|
341
|
+
const l = g === t;
|
|
342
|
+
return `<a href="${e(Be(d, g))}" style="${u}${l ? i : r}background-color:${l ? "var(--sg-primary)" : "transparent"};color:${l ? "var(--sg-primary-text, #fff)" : "var(--sg-text)"};font-weight:${l ? "600" : "400"};">${g}</a>`;
|
|
343
|
+
}).join(""), H = t < s ? `<a href="${e(Be(d, t + 1))}" style="${u}${r}color:var(--sg-text);">›</a>` : `<span style="${u}${r}color:var(--sg-muted-text);opacity:0.4;">›</span>`;
|
|
344
|
+
return `<nav data-block-group="Paginação" style="display:flex;justify-content:center;align-items:center;gap:0.375rem;margin-top:2.5rem;">${v}${n}${H}</nav>`;
|
|
65
345
|
}
|
|
66
|
-
function
|
|
346
|
+
function Ke(t) {
|
|
347
|
+
const s = t.image ? `<img src="${e(t.image)}" alt="${e(t.title || "")}" style="position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;" />` : "", d = t.category ? `<span style="display:inline-block;padding:0.25rem 0.75rem;background-color:var(--sg-primary);color:var(--sg-primary-text, #fff);font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-radius:0.25rem;margin-bottom:0.75rem;">${e(t.category)}</span>` : "", u = t.excerpt ? `<p style="font-size:1rem;line-height:1.5;color:rgba(255,255,255,0.85);margin-bottom:0.75rem;max-width:600px;">${e(t.excerpt)}</p>` : "", r = [];
|
|
348
|
+
t.authorAvatar && r.push(`<img src="${e(t.authorAvatar)}" alt="${e(t.authorName || "")}" style="width:1.75rem;height:1.75rem;border-radius:50%;object-fit:cover;" />`), t.authorName && r.push(`<span style="font-weight:500;">${e(t.authorName)}</span>`), t.authorName && t.date && r.push("<span>·</span>"), t.date && r.push(`<span>${e(t.date)}</span>`);
|
|
349
|
+
const i = r.length ? `<div style="display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:rgba(255,255,255,0.8);">${r.join("")}</div>` : "";
|
|
350
|
+
return `<a href="${e(t.linkHref || "#")}" data-block-group="Post em Destaque" style="display:block;position:relative;width:100%;min-height:420px;border-radius:var(--sg-card-radius, 0.75rem);overflow:hidden;margin-bottom:2.5rem;text-decoration:none;color:#fff;background-color:#1a1a2e;">${s}<div style="position:absolute;inset:0;background:linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.15) 100%);"></div><div style="position:absolute;bottom:0;left:0;right:0;padding:2rem 2.5rem;">${d}<h2 style="font-size:2rem;font-weight:700;line-height:1.2;margin-bottom:0.5rem;color:#fff;">${e(t.title || "")}</h2>${u}${i}</div></a>`;
|
|
351
|
+
}
|
|
352
|
+
function at(t, s, d, u, r) {
|
|
67
353
|
const {
|
|
68
|
-
title:
|
|
69
|
-
subtitle:
|
|
70
|
-
columns:
|
|
71
|
-
cards:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
354
|
+
title: i,
|
|
355
|
+
subtitle: v,
|
|
356
|
+
columns: b = 3,
|
|
357
|
+
cards: n = [],
|
|
358
|
+
variant: H = "default",
|
|
359
|
+
showViewAll: g = !1,
|
|
360
|
+
viewAllText: o,
|
|
361
|
+
viewAllHref: l,
|
|
75
362
|
currentPage: h = 1,
|
|
76
|
-
totalPages:
|
|
77
|
-
paginationBaseUrl:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
363
|
+
totalPages: j = 1,
|
|
364
|
+
paginationBaseUrl: y = "#",
|
|
365
|
+
// Card customization
|
|
366
|
+
cardBorderRadius: p = "0.75rem",
|
|
367
|
+
cardShadow: z = "md",
|
|
368
|
+
cardHoverEffect: B = "lift",
|
|
369
|
+
cardBorder: x = !0,
|
|
370
|
+
cardBorderColor: w = "#e5e7eb",
|
|
371
|
+
cardBorderWidth: m = 1,
|
|
372
|
+
// Image effects
|
|
373
|
+
imageHoverEffect: A = "zoom",
|
|
374
|
+
imageBorderRadius: k = "0.75rem",
|
|
375
|
+
// Card content controls
|
|
376
|
+
showCategory: c = !0,
|
|
377
|
+
categoryStyle: $ = "badge",
|
|
378
|
+
showDate: S = !0,
|
|
379
|
+
showAuthor: f = !1,
|
|
380
|
+
excerptMaxLength: C = 150,
|
|
381
|
+
// CTA customization
|
|
382
|
+
ctaVariation: P = "link",
|
|
383
|
+
linkColor: a = "#2563eb",
|
|
384
|
+
linkHoverColor: I = "#1d4ed8",
|
|
385
|
+
linkHoverEffect: E = "underline",
|
|
386
|
+
linkHoverIntensity: O = 50,
|
|
387
|
+
linkIconName: se = "",
|
|
388
|
+
linkIconPosition: ne = "right",
|
|
389
|
+
buttonVariant: T = "solid",
|
|
390
|
+
buttonColor: Y = "#2563eb",
|
|
391
|
+
buttonTextColor: W = "#ffffff",
|
|
392
|
+
buttonRadius: F = 8,
|
|
393
|
+
buttonSize: G = "md",
|
|
394
|
+
buttonHoverEffect: U = "darken",
|
|
395
|
+
buttonHoverIntensity: K = 20,
|
|
396
|
+
buttonHoverOverlay: Q = "none",
|
|
397
|
+
buttonHoverIconName: J = "arrow-right"
|
|
398
|
+
} = t.props, _ = H === "magazine", L = _ && n.length > 0 ? n[0] : null, X = _ ? n.slice(1) : n, le = Oe(t.id || "", "blog-post-grid"), xe = Le(b, 1, 2, b), { inlineStyles: we, mediaQueries: He } = qe(
|
|
399
|
+
le,
|
|
400
|
+
xe,
|
|
81
401
|
"2rem"
|
|
82
|
-
),
|
|
83
|
-
|
|
402
|
+
), ke = L ? Ke(L) : "";
|
|
403
|
+
let M = "";
|
|
404
|
+
if (_ ? X.length > 0 && (M = '<div data-block-group="Cabeçalho" style="margin-bottom:2rem;"><h3 style="font-size:0.875rem;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;color:var(--sg-text);margin-bottom:0.75rem;">Posts Recentes</h3><div style="height:2px;background-color:var(--sg-primary);width:3rem;"></div></div>') : (i || v) && (M = `<div data-block-group="Cabeçalho" style="text-align: center; margin-bottom: 3rem;">${i ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;">${e(i)}</h2>` : ""}${v ? `<p style="color: var(--sg-muted-text);">${e(v)}</p>` : ""}</div>`), !r)
|
|
84
405
|
throw new Error("exportBlogPostGrid requires renderChild function");
|
|
85
|
-
const
|
|
86
|
-
|
|
406
|
+
const pe = (ce) => H === "featured" && ce === 0 ? "horizontal" : H === "minimal" ? "minimal" : "default";
|
|
407
|
+
let Z = "";
|
|
408
|
+
X.length > 0 ? Z = X.map(
|
|
409
|
+
(ce, te) => r(
|
|
87
410
|
{
|
|
88
|
-
id: `${t.id}-card-${
|
|
411
|
+
id: `${t.id}-card-${_ ? te + 1 : te}`,
|
|
89
412
|
type: "blogPostCard",
|
|
90
|
-
props:
|
|
413
|
+
props: {
|
|
414
|
+
...ce,
|
|
415
|
+
variant: pe(te),
|
|
416
|
+
// Pass customization props from grid to card
|
|
417
|
+
cardBorderRadius: p,
|
|
418
|
+
cardShadow: z,
|
|
419
|
+
cardHoverEffect: B,
|
|
420
|
+
cardBorder: x,
|
|
421
|
+
cardBorderColor: w,
|
|
422
|
+
cardBorderWidth: m,
|
|
423
|
+
imageHoverEffect: A,
|
|
424
|
+
imageBorderRadius: k,
|
|
425
|
+
showCategory: c,
|
|
426
|
+
categoryStyle: $,
|
|
427
|
+
showDate: S,
|
|
428
|
+
showAuthor: f,
|
|
429
|
+
excerptMaxLength: C,
|
|
430
|
+
ctaVariation: P,
|
|
431
|
+
linkColor: a,
|
|
432
|
+
linkHoverColor: I,
|
|
433
|
+
linkHoverEffect: E,
|
|
434
|
+
linkHoverIntensity: O,
|
|
435
|
+
linkIconName: se,
|
|
436
|
+
linkIconPosition: ne,
|
|
437
|
+
buttonVariant: T,
|
|
438
|
+
buttonColor: Y,
|
|
439
|
+
buttonTextColor: W,
|
|
440
|
+
buttonRadius: F,
|
|
441
|
+
buttonSize: G,
|
|
442
|
+
buttonHoverEffect: U,
|
|
443
|
+
buttonHoverIntensity: K,
|
|
444
|
+
buttonHoverOverlay: Q,
|
|
445
|
+
buttonHoverIconName: J
|
|
446
|
+
}
|
|
91
447
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
448
|
+
s + 1,
|
|
449
|
+
d,
|
|
450
|
+
u
|
|
95
451
|
)
|
|
96
|
-
).join("") : '<div style="grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--sg-muted-text); border: 2px dashed var(--sg-border, #e5e7eb); border-radius: var(--sg-card-radius, 0.5rem);"><p style="font-size: 1rem; margin-bottom: 0.5rem;">Nenhum post encontrado</p><p style="font-size: 0.875rem;">Os posts aparecerão aqui quando forem publicados.</p></div>'
|
|
97
|
-
|
|
452
|
+
).join("") : L || (Z = '<div style="grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--sg-muted-text); border: 2px dashed var(--sg-border, #e5e7eb); border-radius: var(--sg-card-radius, 0.5rem);"><p style="font-size: 1rem; margin-bottom: 0.5rem;">Nenhum post encontrado</p><p style="font-size: 0.875rem;">Os posts aparecerão aqui quando forem publicados.</p></div>');
|
|
453
|
+
const fe = Z ? `<div data-block-group="Layout" id="${le}" style="${we}">${Z}</div>` : "", Ae = g && o ? `<div data-block-group="Rodapé" style="text-align: center; margin-top: 2.5rem;"><a href="${e(l || "#")}" style="display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); font-weight: 600; border-radius: var(--sg-button-radius); text-decoration: none;">${e(o)}</a></div>` : "", ee = Ue(h, j, y), Se = _ ? "0" : "4rem 0", de = _ ? "" : "max-width: 1200px; margin: 0 auto; padding: 0 1rem;";
|
|
454
|
+
return `<style>${He}</style><section ${ie(t.id)} style="padding: ${Se}; background-color: var(--sg-bg);"><div style="${de}">${ke}${M}${fe}${Ae}${ee}</div></section>`;
|
|
98
455
|
}
|
|
99
|
-
function
|
|
456
|
+
function it(t, s, d, u) {
|
|
100
457
|
const {
|
|
101
|
-
title:
|
|
102
|
-
content:
|
|
103
|
-
featuredImage:
|
|
104
|
-
date:
|
|
105
|
-
category:
|
|
106
|
-
readingTime:
|
|
107
|
-
tags:
|
|
458
|
+
title: r,
|
|
459
|
+
content: i,
|
|
460
|
+
featuredImage: v,
|
|
461
|
+
date: b,
|
|
462
|
+
category: n,
|
|
463
|
+
readingTime: H,
|
|
464
|
+
tags: g = [],
|
|
108
465
|
showFeaturedImage: o = !0,
|
|
109
|
-
showAuthor:
|
|
110
|
-
authorVariant:
|
|
111
|
-
showDate:
|
|
112
|
-
showTags:
|
|
113
|
-
showReadingTime:
|
|
114
|
-
contentMaxWidth:
|
|
115
|
-
authorName:
|
|
116
|
-
authorAvatar:
|
|
117
|
-
authorBio:
|
|
118
|
-
} = t.props,
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
|
|
466
|
+
showAuthor: l = !0,
|
|
467
|
+
authorVariant: h = "inline",
|
|
468
|
+
showDate: j = !0,
|
|
469
|
+
showTags: y = !0,
|
|
470
|
+
showReadingTime: p = !0,
|
|
471
|
+
contentMaxWidth: z = "720px",
|
|
472
|
+
authorName: B,
|
|
473
|
+
authorAvatar: x,
|
|
474
|
+
authorBio: w
|
|
475
|
+
} = t.props, m = e(B || "Nome do Autor"), A = w ? e(w) : "", k = o && v ? `<div data-block-group="Mídia" style="width: 100%; margin: 0 auto 2.5rem auto; border-radius: var(--sg-card-radius); overflow: hidden;"><img src="${e(v)}" alt="${e(r || "")}" style="width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block;" /></div>` : "", c = n ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem;">${e(n)}</span>` : "", $ = [];
|
|
476
|
+
j && b && $.push(e(b)), p && H && $.push(e(H));
|
|
477
|
+
const S = $.length ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 1.5rem;">${$.join(" · ")}</p>` : "", f = `<h1 data-block-group="Conteúdo" style="font-size: var(--sg-heading-h1, 2.25rem); font-weight: 700; margin-bottom: 0.75rem; line-height: 1.2;">${e(r)}</h1>`, C = i ? `<div class="sg-blog-post-content" style="font-size: 1.0625rem; line-height: 1.75; color: var(--sg-text);">${i}</div>` : "", P = x ? `<img src="${e(x)}" alt="${m}" style="width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.5rem;font-weight:700;">${m.charAt(0).toUpperCase()}</div>`, a = x ? `<img src="${e(x)}" alt="${m}" style="width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.1rem;font-weight:700;">${m.charAt(0).toUpperCase()}</div>`;
|
|
478
|
+
let I = "";
|
|
479
|
+
if (l) {
|
|
480
|
+
const O = A ? `<p style="color:var(--sg-muted-text);font-size:0.875rem;margin:0.25rem 0 0;">${A}</p>` : "";
|
|
481
|
+
h === "card" ? I = `<div data-block-group="Autor" style="display:flex;align-items:flex-start;gap:1rem;margin-top:3rem;padding:1.25rem;border-radius:var(--sg-card-radius, 0.75rem);background-color:var(--sg-surface, #f9fafb);">${P}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.125rem;">Escrito por</div><div style="font-weight:600;font-size:1rem;">${m}</div>${O}</div></div>` : h === "minimal" ? I = `<p data-block-group="Autor" style="margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);color:var(--sg-muted-text);font-size:0.9375rem;">Escrito por <span style="font-weight:600;color:var(--sg-text);">${m}</span></p>` : I = `<div data-block-group="Autor" style="display:flex;align-items:center;gap:0.75rem;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);">${a}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);">Escrito por</div><div style="font-weight:600;font-size:0.9375rem;">${m}</div></div></div>`;
|
|
125
482
|
}
|
|
126
|
-
const
|
|
127
|
-
(
|
|
483
|
+
const E = y && g.length > 0 ? `<div data-block-group="Visibilidade" style="margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem;">${g.map(
|
|
484
|
+
(O) => `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-surface, #f3f4f6); color: var(--sg-text); border-radius: 999px; font-size: 0.75rem;">${e(O)}</span>`
|
|
128
485
|
).join("")}</div>` : "";
|
|
129
|
-
return `<article ${
|
|
486
|
+
return `<article ${ie(t.id)} class="sg-blog-post-detail" style="padding: 0; padding-bottom: 6rem;">${k}<div style="max-width: ${e(z)}; margin: 0 auto; padding: 0 1rem;">${c}${f}${S}${C}${I}${E}</div></article>`;
|
|
130
487
|
}
|
|
131
|
-
function
|
|
488
|
+
function st(t, s, d, u) {
|
|
132
489
|
const {
|
|
133
|
-
title:
|
|
134
|
-
categories:
|
|
135
|
-
variant:
|
|
136
|
-
showCount:
|
|
137
|
-
showAll:
|
|
138
|
-
allLabel:
|
|
139
|
-
activeCategory:
|
|
490
|
+
title: r,
|
|
491
|
+
categories: i = [],
|
|
492
|
+
variant: v = "chips",
|
|
493
|
+
showCount: b = !0,
|
|
494
|
+
showAll: n = !0,
|
|
495
|
+
allLabel: H = "Todas",
|
|
496
|
+
activeCategory: g,
|
|
140
497
|
filterUrl: o = "#",
|
|
141
|
-
borderRadius:
|
|
142
|
-
shadow:
|
|
143
|
-
linkColor:
|
|
144
|
-
} = t.props,
|
|
145
|
-
let
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
effect:
|
|
149
|
-
intensity:
|
|
150
|
-
hoverColor:
|
|
151
|
-
}),
|
|
152
|
-
|
|
153
|
-
${
|
|
498
|
+
borderRadius: l = "0.75rem",
|
|
499
|
+
shadow: h = "none",
|
|
500
|
+
linkColor: j
|
|
501
|
+
} = t.props, y = j || "var(--sg-text)", p = `widget-cat-${t.id || ""}`, z = be(h), B = z !== "none" ? `box-shadow:${z};` : "", x = (f) => f ? e(`${o}?categoria=${f}`) : e(o), w = t.props.linkHoverColor || "", m = t.props.linkHoverEffect || "background", A = t.props.linkHoverIntensity ?? 50;
|
|
502
|
+
let k = "";
|
|
503
|
+
if (w) {
|
|
504
|
+
const f = ye({
|
|
505
|
+
effect: m,
|
|
506
|
+
intensity: A,
|
|
507
|
+
hoverColor: w
|
|
508
|
+
}), C = f.base ? `#${p} .sg-cat-chip:not(.sg-cat-active), #${p} .sg-cat-btn:not(.sg-cat-active), #${p} .sg-cat-list-item { ${f.base}; transition: all 0.3s ease; }` : `#${p} .sg-cat-chip, #${p} .sg-cat-btn, #${p} .sg-cat-list-item { transition: all 0.3s ease; }`, P = `#${p} .sg-cat-chip:hover:not(.sg-cat-active), #${p} .sg-cat-btn:hover:not(.sg-cat-active), #${p} .sg-cat-list-item:hover { ${f.hover}; transition: all 0.3s ease; }`;
|
|
509
|
+
k = `<style>${C}
|
|
510
|
+
${P}</style>`;
|
|
154
511
|
} else
|
|
155
|
-
|
|
156
|
-
#${
|
|
157
|
-
#${
|
|
158
|
-
#${
|
|
512
|
+
k = `<style>
|
|
513
|
+
#${p} .sg-cat-chip:hover { opacity:0.8; transform:translateY(-1px); }
|
|
514
|
+
#${p} .sg-cat-btn:hover { border-color:var(--sg-primary) !important; color:var(--sg-primary) !important; }
|
|
515
|
+
#${p} .sg-cat-list-item:hover { background-color:rgba(0,0,0,0.04); }
|
|
159
516
|
</style>`;
|
|
160
|
-
let
|
|
161
|
-
if (
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
return `<a href="${
|
|
517
|
+
let c = "";
|
|
518
|
+
if (v === "chips") {
|
|
519
|
+
const f = (a) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.875rem;border-radius:9999px;font-size:0.875rem;font-weight:500;text-decoration:none;background-color:${a ? "var(--sg-primary)" : "var(--sg-bg)"};color:${a ? "var(--sg-primary-text, #fff)" : y};transition:all 0.2s ease;`, C = n ? `<a href="${e(o)}" class="sg-cat-chip" style="${f(!g)}">${e(H)}</a>` : "", P = i.map((a) => {
|
|
520
|
+
const I = g === a.slug, E = b && a.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${a.count})</span>` : "";
|
|
521
|
+
return `<a href="${x(a.slug)}" class="${I ? "sg-cat-active" : "sg-cat-chip"}" style="${f(I)}">${e(a.name)}${E}</a>`;
|
|
165
522
|
}).join("");
|
|
166
|
-
|
|
167
|
-
} else if (
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
return `<a href="${
|
|
523
|
+
c = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${C}${P}</div>`;
|
|
524
|
+
} else if (v === "buttons") {
|
|
525
|
+
const f = (a) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.5rem 1rem;border-radius:calc(${l} * 0.6);font-size:0.875rem;font-weight:500;text-decoration:none;border:1px solid ${a ? "var(--sg-primary)" : "var(--sg-border, #e5e7eb)"};background-color:${a ? "var(--sg-primary)" : "transparent"};color:${a ? "var(--sg-primary-text, #fff)" : y};transition:all 0.2s ease;`, C = n ? `<a href="${e(o)}" class="sg-cat-btn" style="${f(!g)}">${e(H)}</a>` : "", P = i.map((a) => {
|
|
526
|
+
const I = g === a.slug, E = b && a.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${a.count})</span>` : "";
|
|
527
|
+
return `<a href="${x(a.slug)}" class="${I ? "sg-cat-active" : "sg-cat-btn"}" style="${f(I)}">${e(a.name)}${E}</a>`;
|
|
171
528
|
}).join("");
|
|
172
|
-
|
|
529
|
+
c = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${C}${P}</div>`;
|
|
173
530
|
} else {
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
return `<a href="${
|
|
531
|
+
const f = (a) => `display:flex;align-items:center;justify-content:space-between;padding:0.625rem 0.75rem;border-radius:calc(${l} * 0.5);font-size:0.875rem;font-weight:${a ? "600" : "400"};text-decoration:none;background-color:${a ? "var(--sg-bg)" : "transparent"};color:${a ? "var(--sg-primary)" : y};transition:all 0.2s ease;`, C = n ? `<a href="${e(o)}" class="sg-cat-list-item" style="${f(!g)}">${e(H)}</a>` : "", P = i.map((a) => {
|
|
532
|
+
const I = g === a.slug, E = b && a.count != null ? `<span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${a.count}</span>` : "";
|
|
533
|
+
return `<a href="${x(a.slug)}" class="sg-cat-list-item" style="${f(I)}">${e(a.name)}${E}</a>`;
|
|
177
534
|
}).join("");
|
|
178
|
-
|
|
535
|
+
c = `<div style="display:flex;flex-direction:column;gap:0.125rem;">${C}${P}</div>`;
|
|
179
536
|
}
|
|
180
|
-
const
|
|
181
|
-
return `${
|
|
537
|
+
const $ = r ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(r)}</h3></div>` : "", S = v === "list" ? "padding:0.5rem 0.75rem;" : "padding:1rem 1.25rem;";
|
|
538
|
+
return `${k}<div id="${p}" ${ie(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${l};${B}overflow:hidden;">${$}<div style="${S}">${c}</div></div>`;
|
|
182
539
|
}
|
|
183
|
-
function
|
|
540
|
+
function nt(t, s, d, u) {
|
|
184
541
|
const {
|
|
185
|
-
placeholder:
|
|
186
|
-
variant:
|
|
187
|
-
showIcon:
|
|
188
|
-
searchUrl:
|
|
189
|
-
filterCategories:
|
|
190
|
-
filterTags:
|
|
191
|
-
filterDate:
|
|
542
|
+
placeholder: r = "Buscar posts...",
|
|
543
|
+
variant: i = "simple",
|
|
544
|
+
showIcon: v = !0,
|
|
545
|
+
searchUrl: b = "#",
|
|
546
|
+
filterCategories: n = !1,
|
|
547
|
+
filterTags: H = !1,
|
|
548
|
+
filterDate: g = !1,
|
|
192
549
|
borderRadius: o = "0.75rem",
|
|
193
|
-
shadow:
|
|
194
|
-
} = t.props,
|
|
195
|
-
#${
|
|
550
|
+
shadow: l = "none"
|
|
551
|
+
} = t.props, h = `widget-search-${t.id || ""}`, j = be(l), y = j !== "none" ? `box-shadow:${j};` : "", p = `calc(${o} * 0.6)`, z = `<style>
|
|
552
|
+
#${h} input:focus, #${h} select:focus {
|
|
196
553
|
border-color: var(--sg-primary);
|
|
197
554
|
box-shadow: 0 0 0 3px rgba(var(--sg-primary-rgb, 59, 130, 246), 0.15);
|
|
198
555
|
}
|
|
199
|
-
</style>`,
|
|
200
|
-
let
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
|
|
556
|
+
</style>`, B = v ? '<svg style="position:absolute;left:0.75rem;top:50%;transform:translateY(-50%);width:1.25rem;height:1.25rem;color:var(--sg-muted-text);" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35" stroke-linecap="round"/></svg>' : "", x = v ? "padding-left:2.5rem;" : "", w = i === "expanded", m = w ? "2px" : "1px", A = w ? "1.0625rem" : "0.875rem", k = w ? "0.875rem" : "0.625rem", c = `width:100%;${x}padding-right:1rem;padding-top:${k};padding-bottom:${k};font-size:${A};border:${m} solid var(--sg-border, #e5e7eb);border-radius:${p};background-color:var(--sg-bg);color:var(--sg-text);outline:none;transition:border-color 0.2s, box-shadow 0.2s;`, $ = `padding:0.625rem 0.75rem;font-size:0.875rem;border:1px solid var(--sg-border, #e5e7eb);border-radius:${p};background-color:var(--sg-bg);color:var(--sg-text);transition:border-color 0.2s;`, S = `<div style="position:relative;">${B}<input type="search" name="busca" placeholder="${e(r)}" style="${c}" /></div>`;
|
|
557
|
+
let f = S;
|
|
558
|
+
if (i === "with-filters") {
|
|
559
|
+
const C = [];
|
|
560
|
+
n && C.push(`<select name="categoria" style="${$}"><option value="">Categoria</option></select>`), H && C.push(`<select name="tag" style="${$}"><option value="">Tag</option></select>`), g && C.push(`<select name="periodo" style="${$}"><option value="">Período</option></select>`), f = `${S}<div style="display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.75rem;">${C.join("")}</div>`;
|
|
204
561
|
}
|
|
205
|
-
return `${
|
|
562
|
+
return `${z}<div id="${h}" ${ie(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${o};${y}overflow:hidden;"><form action="${e(b)}" method="get" style="padding:1.25rem;">${f}</form></div>`;
|
|
206
563
|
}
|
|
207
|
-
function
|
|
564
|
+
function lt(t, s, d, u) {
|
|
208
565
|
const {
|
|
209
|
-
title:
|
|
210
|
-
posts:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
566
|
+
title: r = "Posts Recentes",
|
|
567
|
+
posts: i = [],
|
|
568
|
+
count: v = 5,
|
|
569
|
+
showThumbnail: b = !0,
|
|
570
|
+
showDate: n = !0,
|
|
571
|
+
showCategory: H = !1,
|
|
572
|
+
borderRadius: g = "0.75rem",
|
|
573
|
+
shadow: o = "none",
|
|
574
|
+
linkColor: l
|
|
575
|
+
} = t.props, h = i.slice(0, v), j = l || "var(--sg-text)", y = `widget-recent-${t.id || ""}`, p = be(o), z = p !== "none" ? `box-shadow:${p};` : "", B = t.props.linkHoverColor || "", x = t.props.linkHoverEffect || "background", w = t.props.linkHoverIntensity ?? 50;
|
|
218
576
|
let m = "";
|
|
219
|
-
if (
|
|
220
|
-
const c =
|
|
221
|
-
effect:
|
|
222
|
-
intensity:
|
|
223
|
-
hoverColor:
|
|
224
|
-
}),
|
|
225
|
-
#${
|
|
226
|
-
m = `<style>${
|
|
227
|
-
${
|
|
577
|
+
if (B) {
|
|
578
|
+
const c = ye({
|
|
579
|
+
effect: x,
|
|
580
|
+
intensity: w,
|
|
581
|
+
hoverColor: B
|
|
582
|
+
}), $ = c.base ? `#${y} .sg-recent-post { ${c.base}; transition: all 0.3s ease; }` : `#${y} .sg-recent-post { transition: all 0.3s ease; }`, S = `#${y} .sg-recent-post:hover { ${c.hover}; transition: all 0.3s ease; }
|
|
583
|
+
#${y} .sg-recent-post:hover .sg-recent-title { color: ${B}; }`;
|
|
584
|
+
m = `<style>${$}
|
|
585
|
+
${S}</style>`;
|
|
228
586
|
} else
|
|
229
587
|
m = `<style>
|
|
230
|
-
#${
|
|
231
|
-
#${
|
|
588
|
+
#${y} .sg-recent-post:hover { background-color:rgba(0,0,0,0.04); }
|
|
589
|
+
#${y} .sg-recent-post:hover .sg-recent-title { color:var(--sg-primary); }
|
|
232
590
|
</style>`;
|
|
233
|
-
const
|
|
234
|
-
let
|
|
235
|
-
return
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
return `<a href="/site/p/blog/${e(c.slug)}" class="sg-recent-post" style="display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1.25rem;text-decoration:none;color:inherit;transition:background-color 0.2s;">${
|
|
240
|
-
}).join(""), `${m}<div id="${
|
|
591
|
+
const A = r ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(r)}</h3></div>` : "";
|
|
592
|
+
let k = "";
|
|
593
|
+
return h.length === 0 ? k = '<p style="padding:1.5rem 1.25rem;color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhum post recente</p>' : k = h.map((c) => {
|
|
594
|
+
const $ = b && c.image ? `<img src="${e(c.image)}" alt="${e(c.title)}" style="width:64px;height:64px;object-fit:cover;border-radius:calc(${g} * 0.5);flex-shrink:0;" />` : "", S = [];
|
|
595
|
+
n && c.date && S.push(e(c.date)), H && c.category && S.push(`<span style="font-size:0.6875rem;color:var(--sg-primary);font-weight:600;text-transform:uppercase;letter-spacing:0.03em;">${e(c.category)}</span>`);
|
|
596
|
+
const f = S.length ? `<div style="display:flex;align-items:center;gap:0.5rem;margin-top:0.25rem;font-size:0.75rem;color:var(--sg-muted-text);">${S.join("")}</div>` : "";
|
|
597
|
+
return `<a href="/site/p/blog/${e(c.slug)}" class="sg-recent-post" style="display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1.25rem;text-decoration:none;color:inherit;transition:background-color 0.2s;">${$}<div style="flex:1;min-width:0;"><div class="sg-recent-title" style="font-size:0.875rem;font-weight:500;color:${j};line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color 0.2s;">${e(c.title)}</div>${f}</div></a>`;
|
|
598
|
+
}).join(""), `${m}<div id="${y}" ${ie(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${g};border:1px solid var(--sg-border, #e5e7eb);${z}overflow:hidden;">${A}<div style="padding:0.5rem 0;">${k}</div></div>`;
|
|
241
599
|
}
|
|
242
|
-
function
|
|
600
|
+
function dt(t, s, d, u) {
|
|
243
601
|
const {
|
|
244
|
-
title:
|
|
245
|
-
tags:
|
|
246
|
-
variant:
|
|
247
|
-
borderRadius:
|
|
248
|
-
shadow:
|
|
249
|
-
linkColor:
|
|
250
|
-
} = t.props,
|
|
251
|
-
let
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
effect:
|
|
255
|
-
intensity:
|
|
256
|
-
hoverColor:
|
|
257
|
-
}),
|
|
258
|
-
|
|
259
|
-
${
|
|
602
|
+
title: r = "Tags",
|
|
603
|
+
tags: i = [],
|
|
604
|
+
variant: v = "badges",
|
|
605
|
+
borderRadius: b = "0.75rem",
|
|
606
|
+
shadow: n = "none",
|
|
607
|
+
linkColor: H
|
|
608
|
+
} = t.props, g = H || "var(--sg-text)", o = `widget-tags-${t.id || ""}`, l = be(n), h = l !== "none" ? `box-shadow:${l};` : "", j = t.props.linkHoverColor || "", y = t.props.linkHoverEffect || "background", p = t.props.linkHoverIntensity ?? 50;
|
|
609
|
+
let z = "";
|
|
610
|
+
if (j) {
|
|
611
|
+
const w = ye({
|
|
612
|
+
effect: y,
|
|
613
|
+
intensity: p,
|
|
614
|
+
hoverColor: j
|
|
615
|
+
}), m = w.base ? `#${o} .sg-tag-badge, #${o} .sg-tag-list-item { ${w.base}; transition: all 0.3s ease; }` : `#${o} .sg-tag-badge, #${o} .sg-tag-list-item { transition: all 0.3s ease; }`, A = `#${o} .sg-tag-badge:hover, #${o} .sg-tag-list-item:hover { ${w.hover}; transition: all 0.3s ease; }`;
|
|
616
|
+
z = `<style>${m}
|
|
617
|
+
${A}</style>`;
|
|
260
618
|
} else
|
|
261
|
-
|
|
619
|
+
z = `<style>
|
|
262
620
|
#${o} .sg-tag-badge:hover { opacity:0.8; transform:translateY(-1px); }
|
|
263
621
|
#${o} .sg-tag-list-item:hover { background-color:rgba(0,0,0,0.04); }
|
|
264
622
|
</style>`;
|
|
265
|
-
const
|
|
266
|
-
let
|
|
267
|
-
return
|
|
268
|
-
(
|
|
269
|
-
).join("")}</div>` :
|
|
270
|
-
(
|
|
271
|
-
).join("")}</div>`, `${
|
|
623
|
+
const B = r ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(r)}</h3></div>` : "";
|
|
624
|
+
let x = "";
|
|
625
|
+
return i.length === 0 ? x = '<p style="color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhuma tag encontrada</p>' : v === "badges" ? x = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${i.map(
|
|
626
|
+
(m) => `<span class="sg-tag-badge" style="display:inline-flex;align-items:center;gap:0.375rem;padding:0.3rem 0.75rem;border-radius:9999px;font-size:0.8125rem;font-weight:500;background-color:var(--sg-bg);color:${g};cursor:pointer;transition:all 0.2s ease;">${e(m.name)}<span style="font-size:0.6875rem;color:var(--sg-muted-text);opacity:0.7;">(${m.count})</span></span>`
|
|
627
|
+
).join("")}</div>` : x = `<div style="display:flex;flex-direction:column;gap:0.25rem;">${i.map(
|
|
628
|
+
(m) => `<div class="sg-tag-list-item" style="display:flex;align-items:center;justify-content:space-between;padding:0.5rem 0.75rem;border-radius:calc(${b} * 0.5);font-size:0.875rem;color:${g};cursor:pointer;transition:background-color 0.2s;"><span>${e(m.name)}</span><span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${m.count}</span></div>`
|
|
629
|
+
).join("")}</div>`, `${z}<div id="${o}" ${ie(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${b};border:1px solid var(--sg-border, #e5e7eb);${h}overflow:hidden;">${B}<div style="padding:1rem 1.25rem;">${x}</div></div>`;
|
|
272
630
|
}
|
|
273
631
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
632
|
+
st as exportBlogCategoryFilter,
|
|
633
|
+
ot as exportBlogPostCard,
|
|
634
|
+
it as exportBlogPostDetail,
|
|
635
|
+
at as exportBlogPostGrid,
|
|
636
|
+
lt as exportBlogRecentPosts,
|
|
637
|
+
nt as exportBlogSearchBar,
|
|
638
|
+
dt as exportBlogTagCloud
|
|
281
639
|
};
|
|
282
640
|
//# sourceMappingURL=BlogPostExporters.js.map
|