From deea9b550aeb4cbc754135a9ae9ef7f24631a098 Mon Sep 17 00:00:00 2001 From: bigcode Date: Sun, 1 Nov 2026 23:15:10 +0800 Subject: [PATCH] =?UTF-8?q?v0.10.15:=20H14=20Why=20Choose=20Dusun=20IoT(9f?= =?UTF-8?q?202ea)=E5=AE=8C=E6=88=90,=E5=AE=A1=E8=AE=A1=200=20=E5=B7=AE?= =?UTF-8?q?=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - EaelInfoBoxWidget: 标题排版/颜色设置驱动(eael_infobox_title_typography_* 与 _title_color 进 slim 白名单),内容改 div 直出(原站无 p 包裹,药丸列表不再被 p 包裹/UA margin 撑高);infobox 内容 ul/ol margin 0(hello-elementor reset) - kit-spacing 20px 排除内嵌 section(只挂 widget,H14 两行卡间距归零) - populated 宽 100%→auto:块级填充自动扣除水平 margin(H14 680-8=672、H11 同理), 替代 H11 时代的 per-section !important 覆写 - 双端节内相对几何 0 差异(sec 772 全等),全页 H0-H14 高度回归零差异 --- docs/sections-inventory.md | 2 +- package.json | 2 +- src/components/elementor/Renderer.tsx | 16 +++++++++++----- src/components/elementor/slim.ts | 4 ++++ src/styles/app.css | 8 +++++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/sections-inventory.md b/docs/sections-inventory.md index 075fc21a1..c1526579c 100644 --- a/docs/sections-inventory.md +++ b/docs/sections-inventory.md @@ -48,7 +48,7 @@ | H12 | Industries and Use Cases | heading + eael-adv-tabs(6 标签,内容自包含 HTML) + button(ef0fcd9) | ✅ v0.10.12(AdvTabsWidget 忠实 DOM+React 切换(li id/data-tab/aria-controls)、active #ED6C00/文字 #333/bg #F4F5F8/li 底边 3px(默认同背景色,active/hover 变橙,故 li 高 59)、内容面板 padding 16px 0 0+顶边 1px #C7CBDA、id=-tab;标题 40px Poppins 居中、按钮 8390e24 设置驱动实测全等;随此版块修复:image-box 垂直对齐 content_vertical_alignment(middle→center,防 fig 被拉伸)、figure 内 块化(消 2px 行盒下伸)、ec11f3f 图宽 30% 仅存 post-18 生成 CSS 的补规则、AdvTabs 标题 Roboto;实测 H0-H12 各 section 高度全等,页级漂移 0.8px) | | H13 | Difference Maker 供应商主张条 | heading 5706426 + text c83a5d3 + icon-list 002494b(3 描边链接) + 内嵌 section 931e838(左文右空+楼体图) | ✅ v0.10.13(heading 40/600/#000 左对齐;text fs 1.375rem + _margin -1rem 折叠(widget h 15.4 机制与原站一致);icon-list inline 视图 3 描边链接(custom_css .ele-supplier-dif 边框盒/悬停橙,li 213.7/190.4/206.2 全等);楼体大图=列 bf3d0ba 背景 bottom left+100% auto;随此版块落地:IconListWidget 忠实 DOM 重写(inline-items flex 对冲边距)、列背景 background_size(initial→100% auto)/position/repeat 全量并入、icon-list 基础 CSS、悬停主色规则;相对几何逐项全等(183.4/251.4 等),截图目视一致。注意:orig 侧 H12 面板渐进展开致整页 y 多次测量间漂移,以节内相对坐标为准) | | H13.5 | counter 统计条 ×6 | 9084925:6 列 image-box(图标+数字标题+描述) | ✅ v0.10.14(双端节内相对几何/样式 JSON 逐字节一致:sec h 235、列 226.7×179 padding 20/16/16/36 + 边框 1px 0 1px 1px #E0E5F9(globals ee1917e,末列四边)、图标 30% 宽(仅存 post-18 生成 CSS,scoped 补规则)+image_space 6px、标题 36px/700/#ED6C00/lh54+mb4(㎡ 内联 span 1.5rem)、描述 18px/#333/lh27;随此版块:image-box 支持 title_typography_*/description_typography_*/image_space/text_align(进 slim 白名单)+title_color 落样式) | -| H14 | Why Choose Dusun IoT | heading + eael-info-box ×4 | ⬜ | +| H14 | Why Choose Dusun IoT | heading + eael-info-box ×4(工厂底图深色节) | ✅ v0.10.15(审计 0 差异:heading Poppins 40/600/#FFFFFF(globals 4d5c430)居中 + _padding 底 12px;4 卡 680×294 白底圆角 6、padding 16/40/32、margin 右 8/左 8 + 底 16(两行卡间距 0——随此修复:kit-spacing 20px 排除内嵌 section、populated 宽 100%→auto 扣水平 margin,H14 680-8=672);info-box 标题 20px/700/#0D152E + 图标背景 44×44/lh66/下划线(custom_css 注入)、药丸 li 2px 10px/圆角 16/边框 #C7CBDA、ul margin 0(hello reset,scoped);随此版块:EaelInfoBoxWidget 标题排版/颜色(eael_infobox_title_typography_*/_title_color 进白名单)、内容 div 直出不包 p) | | H15 | Trusted By 世界领先品牌 | heading + image ×11(Logo 墙) | ⬜ | | H16 | Developer Ecosystem | heading ×4+text+button+image+social-icons(左右两卡) | ⬜ | | H17 | News & Updates 标题 | heading | ⬜ | diff --git a/package.json b/package.json index f4c07a9ff..64b3c654c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dusuniot-rebuild", - "version": "0.10.14", + "version": "0.10.15", "private": true, "type": "module", "scripts": { diff --git a/src/components/elementor/Renderer.tsx b/src/components/elementor/Renderer.tsx index 636449236..58d54060d 100644 --- a/src/components/elementor/Renderer.tsx +++ b/src/components/elementor/Renderer.tsx @@ -431,10 +431,11 @@ function ColumnNode({ el, gapPad }: { el: ElElement; gapPad?: string }) { } else inner.borderWidth = "1px"; } return ( - // 内层 width:100% 与列同宽(H4 卡 margin 内含、向右溢出,原站实测一致); - // H11 等少数列在 app.css 用 !important 覆写为 auto(原站 populated 扣除水平外边距 443.33) + // 内层(populated)宽 auto:块级填充自动扣除自身水平 margin(原站实测 H14 680-8=672、 + // H11 453.33-10=443.33;负 margin 反向加宽与原站一致);此前 width:100% 会使 + // 有水平 margin 的列溢出 margin 宽度
-
+
{(el.elements || []).map((c, i) => ( ))} @@ -986,6 +987,11 @@ function EaelInfoBoxWidget({ settings }: { settings: Record }) const Tag = (["h1", "h2", "h3", "h4", "h5", "h6", "div"].includes(tag) ? tag : "div") as "div"; const left = s(settings.eael_infobox_img_type) === "img-on-left" || s(settings.eael_infobox_img_type) === "icon-on-left"; const cls = "eael-infobox" + (left ? " icon-on-left" : ""); + // 标题排版/颜色(H14 实测 fs 1.25rem/700/#0D152E;内容排版 hover 键原站未生效,不采用) + const titleStyle: CSSProperties = { + ...typographyCss(settings, "eael_infobox_title_typography"), + ...(s(settings.eael_infobox_title_color) ? { color: s(settings.eael_infobox_title_color) as string } : {}), + }; return (
{img?.url ? ( @@ -996,13 +1002,13 @@ function EaelInfoBoxWidget({ settings }: { settings: Record })
{title ? (
- + {s(settings.eael_infobox_sub_title) && s(settings.eael_infobox_sub_title) !== "This is a sub title" ? (
) : null}
) : null} - {desc ?

: null} + {desc ?

: null}
); diff --git a/src/components/elementor/slim.ts b/src/components/elementor/slim.ts index f037362b3..890350c4c 100644 --- a/src/components/elementor/slim.ts +++ b/src/components/elementor/slim.ts @@ -129,6 +129,10 @@ const SETTING_KEYS = new Set([ "eael_infobox_title_margin_mobile", "eael_infobox_title_typography_typography", "eael_infobox_title_typography_font_size", + "eael_infobox_title_typography_font_size_mobile", + "eael_infobox_title_typography_font_size_tablet", + "eael_infobox_title_typography_font_weight", + "eael_infobox_title_color", "hover_animation", // widget 高级盒模型(如 eael-info-box 边框卡:_border_* + _padding/_margin) "_margin", diff --git a/src/styles/app.css b/src/styles/app.css index 7bce11db9..328b88d1b 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -361,7 +361,9 @@ * 实测 62.4 = 2 行 48 + p margin 14.4 一致),p 下外距 0.9em(原站 hello 环境 14.4px)。 */ .el-col > div > [data-el]:not(.el-w-auto) { width: 100%; } - .el-col > div > [data-el]:not(:last-child):not(.el-w-auto) { margin-bottom: 20px; } + /* kit-spacing 20px 只挂 widget(.elementor-widget:not(:last-child)),内嵌 section 无此间距 + * (H14 两行卡间实测 0 间距,section 曾被误加 20px 致行距 +20) */ + .el-col > div > [data-el]:not(:last-child):not(.el-w-auto):not(section) { margin-bottom: 20px; } .el-texteditor { display: flow-root; } /* 0.9rem 固定值(原站 hello-elementor p 边距 14.4px @16 根字号;em 会随 widget 字号 20px 放大成 18px) */ .el-texteditor p { margin: 0 0 0.9rem; } @@ -405,6 +407,10 @@ } .eael-infobox.icon-on-left .infobox-content .title { line-height: 1; margin: 0 0 10px 0; } .eael-infobox .infobox-content p { margin: 0 0 15px; } + /* 内容里的 ul/ol:hello-elementor 主题 reset(H14 药丸列表实测 margin 0, + * UA 默认 1em 上下外距会撑高内容 16px);列表样式与内边距由节点 custom_css 定义 */ + .eael-infobox .infobox-content ul, + .eael-infobox .infobox-content ol { margin: 0; } /* ===== 首页 H4 硬件与服务系列 ×5(post-18.css 对应块;1436px 实测 2026-11-01) * 卡列:渐变 #F4F5F9→透明 + 1px #E0E5F9 边框 + 4px 圆角 + 列间 margin(ColumnNode 由 settings 渲染);