v0.10.14: H13.5 counter 统计条(9084925)完成

- image-box 支持 title_typography_*/description_typography_*(36px/700/#ED6C00 标题、
  18px 描述)、image_space(图标下距 6px)、text_align、title_color 落样式;
  对应键进 slim 白名单
- 六列图标宽 30% 仅存 post-18 生成 CSS(DB 无 image_size),scoped 补规则
  (efe1577/d48a588/46684e1/17330e2/a7cd0a1/e6b1413)
- 双端节内相对几何/计算样式 JSON 逐字节一致:sec h 208→235 与原站全等,
  列边框 #E0E5F9(globals ee1917e)、末列四边;H0-H13.5 全页高度回归零差异
This commit is contained in:
bigcode
2026-11-01 22:55:21 +08:00
parent c1741772cd
commit ce59229801
5 changed files with 49 additions and 5 deletions
+26 -4
View File
@@ -891,15 +891,31 @@ function ImageBoxWidget({ settings }: { settings: Record<string, unknown> }) {
const isRow = pos === "left" || pos === "right";
const imgW = sizeCss(settings.image_size);
const titleSpace = sizeCss(settings.title_bottom_space);
// 图与标题间距 image_space(H13.5 counter 条实测 6px,生成规则 margin-bottom:6px)
const imgSpace = sizeCss(settings.image_space);
// 内容垂直对齐(content_vertical_alignment 控件,仅 left/right 行布局生效):
// 由 per-widget 生成规则输出 align-items(514e513 middle → center 实测;否则 flex 默认 stretch)
const vaMap: Record<string, string> = { top: "flex-start", middle: "center", bottom: "flex-end" };
const va = isRow ? vaMap[s(settings.content_vertical_alignment)] : undefined;
// 文本对齐 text_align(H13.5 counter 条 left)与标题/描述排版
// (title_typography_* / description_typography_* 组合字段,counter 条 36px/700 橙 + 18px 描述)
const textAlign = s(settings.text_align) as CSSProperties["textAlign"] | undefined;
const titleStyle: CSSProperties = {
...(titleSpace ? { marginBottom: titleSpace } : {}),
...typographyCss(settings, "title_typography"),
};
// 标题色 title_color(resolveGlobals 已解析 globals/colors?id=primary → #ED6C00)
if (s(settings.title_color)) titleStyle.color = s(settings.title_color) as string;
const descStyle = typographyCss(settings, "description_typography");
// flex/边距在 app.css 的 .el-imagebox-pos-* 规则(带 768 断点),这里只带 per-widget 图宽与垂直对齐
const figStyle: CSSProperties | undefined = isRow && imgW ? { width: imgW } : undefined;
const figStyle: CSSProperties | undefined = isRow && imgW
? { width: imgW }
: imgSpace
? { marginBottom: imgSpace }
: undefined;
return (
<div className={"el-imagebox" + posCls}>
<div className="el-imagebox-wrapper" style={va ? { alignItems: va } : undefined}>
<div className="el-imagebox-wrapper" style={{ ...(va ? { alignItems: va } : {}), ...(textAlign ? { textAlign } : {}) }}>
{url ? (
<figure className="el-imagebox-img" style={figStyle}>
{link ? (
@@ -912,7 +928,7 @@ function ImageBoxWidget({ settings }: { settings: Record<string, unknown> }) {
{title || desc ? (
<div className="el-imagebox-content">
{title ? (
<Tag className="el-imagebox-title" style={titleSpace ? { marginBottom: titleSpace } : undefined}>
<Tag className="el-imagebox-title" style={Object.keys(titleStyle).length ? titleStyle : undefined}>
{link ? (
<a {...linkProps} dangerouslySetInnerHTML={{ __html: title }} />
) : (
@@ -921,7 +937,13 @@ function ImageBoxWidget({ settings }: { settings: Record<string, unknown> }) {
)}
</Tag>
) : null}
{desc ? <p className="el-imagebox-description" dangerouslySetInnerHTML={{ __html: desc }} /> : null}
{desc ? (
<p
className="el-imagebox-description"
style={Object.keys(descStyle).length ? descStyle : undefined}
dangerouslySetInnerHTML={{ __html: desc }}
/>
) : null}
</div>
) : null}
</div>
+12
View File
@@ -47,6 +47,18 @@ const SETTING_KEYS = new Set([
"image_size",
"title_bottom_space",
"content_vertical_alignment",
// image-box 图标间距/文本对齐/标题与描述排版(H13.5 counter 条)
"image_space",
"text_align",
"title_typography_typography",
"title_typography_font_size",
"title_typography_font_size_mobile",
"title_typography_font_size_tablet",
"title_typography_font_weight",
"description_typography_typography",
"description_typography_font_size",
"description_typography_font_size_mobile",
"description_typography_font_size_tablet",
"gradient_angle",
"color_a",
"color_b",
+9
View File
@@ -320,6 +320,15 @@
* 描边盒/按钮/列 padding 均设置驱动或 custom_css 注入,无额外规则 */
[data-el="002494b"] .elementor-icon-list-item a:hover .elementor-icon-list-text { color: #ED6C00; }
/* ===== 首页 H13.5 counter 统计条(post-18.css 对应块;1436 实测 2026-11-01)
* 六列 16% 图标卡:列 padding 20px 16px 16px 36px + 边框 1px 0 1px 1px #E0E5F9
* (globals ee1917e,末列四边)设置驱动;图标宽 30% 仅存 post-18 生成 CSS(DB 无
* image_size 键),与 ec11f3f 同款补规则;标题 36px/700/#ED6C00、描述 18px 走
* title/description_typography 设置(随本版块进白名单) */
[data-el="efe1577"] .el-imagebox-img, [data-el="d48a588"] .el-imagebox-img,
[data-el="46684e1"] .el-imagebox-img, [data-el="17330e2"] .el-imagebox-img,
[data-el="a7cd0a1"] .el-imagebox-img, [data-el="e6b1413"] .el-imagebox-img { width: 30%; }
/* ===== 首页 H2 产品线入口(post-18.css 对应块;1436px 实测 2026-10-31)
* 外层 section:白→#F4F5F8 线性渐变(180deg)+ 1360 容器(SectionNode 背景已渲染);
* 中列 0.5rem 内边距;内层 e38a898 六列均分 224px,列内容 wrap padding 10px(高 107);