v0.10.19: G2 页脚 Footer 一比一复刻(原站 elementor_library post 58)
- 导入脚本 scripts/import-footer-template.ts:从 legacy dump 提取 post 58 的 _elementor_data 写入 contents(type=template, slug=footer),并按线上 post-58.css/DOM 补齐快照后改动 (f95e22e Google Preferred Source、405d251 width:auto、2481635 桌面外距) - Layout/getLayoutData 下发 footerDoc,Footer 改用 ElementorRenderer 直出原模板, 短代码按 widget id 注入:menu-2 移动端折叠菜单、gtranslate 语言下拉(原生 select.gt_selector) - Renderer 增强:section html_tag/边框/content_position、column 响应式宽度与 populated padding/margin(tablet/mobile)、widget 响应式盒模型、icon widget(fixed 返回顶部)、 icon-list 图标/间距/文字排版与 CSS 变量悬停、image 宽度、divider Elementor DOM、 text-editor 对齐与 current-date-time 动态年份、shortcode 预渲染上下文 - slim 白名单补齐响应式/图标/动态标签字段;app.css 新增 FA Solid/Regular 字体、 页脚 scoped 规则、elementor-hidden-* 响应式可见性 - 实测 1436:页脚总高 590.4 与原站全等(列宽/内层列/logo/社交/下拉逐项一致); 390:56/15/347/337/97/46.4/61 逐项全等;语言切换写 ui_lang cookie;返回顶部回滚 0 - bun test 11 pass;版本 0.10.19
This commit is contained in:
+116
-2
@@ -39,8 +39,46 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.fa-linkedin::before { content: "\f08c"; }
|
||||
.fa-linkedin-in::before { content: "\f0e1"; }
|
||||
.fa-youtube::before { content: "\f167"; }
|
||||
.fa-facebook::before { content: "\f09a"; }
|
||||
.fa-facebook-f::before { content: "\f39e"; }
|
||||
.fa-discord::before { content: "\f392"; }
|
||||
|
||||
/* # 字体 Font Awesome Solid / Regular(页脚返回顶部图标 fas fa-chevron-up、
|
||||
* 询价入口 far fa-comment-dots;文件取自 legacy elementor 插件库) */
|
||||
@font-face {
|
||||
font-family: "FA Solid";
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: block;
|
||||
src: url("/fonts/fa-solid-900.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "FA Regular";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: block;
|
||||
src: url("/fonts/fa-regular-400.woff2") format("woff2");
|
||||
}
|
||||
.fas, .fa-solid {
|
||||
font-family: "FA Solid";
|
||||
font-weight: 900;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.far, .fa-regular {
|
||||
font-family: "FA Regular";
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.fa-chevron-up::before { content: "\f077"; }
|
||||
.fa-comment-dots::before { content: "\f4ad"; }
|
||||
|
||||
/* # 成员变量 Tailwind 主题令牌(与原 website.css 配色一一对应) **/
|
||||
@theme {
|
||||
@@ -318,8 +356,14 @@
|
||||
* .ele-supplier-dif 注入;文字色 text_color 落 span、悬停主色走 per-widget 规则 */
|
||||
.elementor-icon-list-items { list-style: none; margin: 0; padding: 0; }
|
||||
.elementor-icon-list-items.elementor-inline-items { display: flex; flex-wrap: wrap; margin: 0 -8px; }
|
||||
.elementor-icon-list-item { display: flex; align-items: center; margin: 0 8px; }
|
||||
.elementor-icon-list-item { display: flex; align-items: center; }
|
||||
.elementor-icon-list-items.elementor-inline-items > .elementor-icon-list-item { margin: 0 8px; }
|
||||
.elementor-icon-list-item a { display: flex; align-items: center; text-decoration: none; }
|
||||
/* 图标盒:line-height 0 避免行盒把 li 撑高(页脚社交 20px 图标、图标与文字横排) */
|
||||
.elementor-icon-list-icon { display: inline-flex; align-items: center; line-height: 0; }
|
||||
.elementor-icon-list-icon i { font-style: normal; width: 1.25em; text-align: center; }
|
||||
/* 图标与文字间距(widget-icon-list.min.css):文字左内边距 5px,图标行总宽 30px @20px */
|
||||
.elementor-icon-list-icon + .elementor-icon-list-text { align-self: center; padding-inline-start: 5px; }
|
||||
|
||||
/* ===== 首页 H12 adv-tabs 生成规则(post-18.css 对应块;1436 实测 2026-11-01)
|
||||
* li 背景 #F4F5F8 + 文字 #333 + 底边 3px(默认同背景色、active/hover 变 #ED6C00,故 li 高 = 24+16*2+3);
|
||||
@@ -339,7 +383,7 @@
|
||||
* 楼体大图 = 列 bf3d0ba 背景(bottom left + 100% auto,组件内联输出,post-18 生成规则
|
||||
* background_size initial → 100% auto);icon-list 悬停主色(globals text_color_hover);
|
||||
* 描边盒/按钮/列 padding 均设置驱动或 custom_css 注入,无额外规则 */
|
||||
[data-el="002494b"] .elementor-icon-list-item a:hover .elementor-icon-list-text { color: #ED6C00; }
|
||||
[data-el="002494b"] .elementor-icon-list-item:hover { --el-il-text: #ED6C00; }
|
||||
|
||||
/* ===== 首页 H13.5 counter 统计条(post-18.css 对应块;1436 实测 2026-11-01)
|
||||
* 六列 16% 图标卡:列 padding 20px 16px 16px 36px + 边框 1px 0 1px 1px #E0E5F9
|
||||
@@ -458,6 +502,9 @@
|
||||
/* ===== Elementor hover 动画(e-animation-shrink.min.css):hover 缩至 90%,0.3s 过渡 */
|
||||
/* heading 标题链接颜色继承(原站不受全局品牌橙影响,实测 #333/#000) */
|
||||
.el-heading-title a { color: inherit; }
|
||||
/* Elementor 基础规则 .elementor-heading-title{margin:0}(页脚 Policy 为 <p>,
|
||||
* 不加则 UA 段落下边距把列表推低 30px) */
|
||||
.el-heading-title { margin: 0; }
|
||||
/* kit 全局链接排版(post-15.css .elementor-kit-15 a):链接默认 Roboto 400。
|
||||
* 取证:tab 卡片 .card 为 <a>,kit 字体使其内部 ul/li 用 Roboto 渲染(文字 273.6px),
|
||||
* 否则被卡片内嵌样式的 Arial 截住(261.9px),第 4 条规格多折一行(H9 body 高 +21.6)。
|
||||
@@ -666,8 +713,75 @@
|
||||
[data-el="fd97340"] .elementor-tab-title:after,
|
||||
[data-el="fd97340"] .elementor-tab-content { border-width: 0; }
|
||||
[data-el="fd97340"] .elementor-tab-title.elementor-active { color: #ED6C00; }
|
||||
|
||||
/* ===== 页脚 Elementor 模板 post 58(线上 1436 实测 + post-58.css,2026-11-02)
|
||||
* 结构:46d7afa 四列链接(桌面) / d834160(html_tag=footer) 返回顶部 + 分隔线 +
|
||||
* 28c7f0b8 品牌区三列 + a428bb4 版权条。以下为「仅存生成 CSS」与 DOM 语义补丁 */
|
||||
.elementor-location-footer a { text-decoration: none; font-weight: inherit; }
|
||||
/* logo:设置驱动 img width 57%(内联),a 收缩为内容宽 → 254×75 的 57% = 144.8×42.7 */
|
||||
[data-el="211f98c"] > a { display: inline-block; }
|
||||
[data-el="211f98c"] img { height: auto; }
|
||||
/* 简介段落:原站 p 下外边距 0.9rem(实测 14.4px;三行文字高 77.4) */
|
||||
[data-el="42365c0"] p { margin: 0 0 0.9rem; }
|
||||
/* 链接列悬停文字变 secondary #FFA11B(post-58.css 生成规则;变量覆盖内联色) */
|
||||
[data-el="d5fc3c1"] .elementor-icon-list-item:hover,
|
||||
[data-el="cb239ea"] .elementor-icon-list-item:hover,
|
||||
[data-el="115705e"] .elementor-icon-list-item:hover,
|
||||
[data-el="f517f88"] .elementor-icon-list-item:hover,
|
||||
[data-el="9cf608f"] .elementor-icon-list-item:hover,
|
||||
[data-el="6ef07ee0"] .elementor-icon-list-item:hover,
|
||||
[data-el="6c850ad1"] .elementor-icon-list-item:hover { --el-il-text: #FFA11B; }
|
||||
/* 社交图标悬停变 secondary(白色 → #FFA11B) */
|
||||
[data-el="405d251"] .elementor-icon-list-item:hover { --el-il-icon: #FFA11B; }
|
||||
/* 返回顶部圆钮:悬停背景 primary #ED6C00(内联底色需 !important 覆盖) */
|
||||
[data-el="5ffe573"] .elementor-icon:hover { background-color: #ED6C00 !important; color: #ffffff; }
|
||||
/* gtranslate 语言下拉(线上 select.gt_selector 202×39、白字、#3E3E3F 底、1px #666,实测) */
|
||||
[data-el="2481635"] select.gt_selector {
|
||||
width: 202px; height: 39px; padding: 8px 16px; font-size: 16px; line-height: 1.2;
|
||||
color: #ffffff; background-color: #3E3E3F; border: 1px solid #666666; border-radius: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
[data-el="2481635"] select.gt_selector { width: auto; max-width: 100%; }
|
||||
}
|
||||
/* 版权条两列:左列 populated 宽 auto(margin-right 2 扣除语义,实测 568 而非 570) */
|
||||
[data-el="89e79b8"] > div { width: auto !important; }
|
||||
/* icon widget 字形盒:Elementor .elementor-icon i 与 svg 同宽 1em(24px → 盒 48×48) */
|
||||
.elementor-icon i { width: 1em; text-align: center; }
|
||||
/* 版权条文字:白 12px 100(设置驱动),链接同为白色(无橙色) */
|
||||
[data-el="a428bb4"] a { color: #ffffff; }
|
||||
/* 移动端折叠菜单([maxmegamenu location=menu-2],桌面/平板由 elementor-hidden-* 隐藏) */
|
||||
.mega-menu-wrap .mega-menu-toggle { display: flex; justify-content: center; align-items: center; min-height: 40px; }
|
||||
.mega-menu-wrap .mega-toggle-animated-box {
|
||||
position: relative; display: inline-block; width: 40px; height: 26px;
|
||||
cursor: pointer; background: transparent; border: 0;
|
||||
}
|
||||
.mega-menu-wrap .mega-toggle-animated-inner,
|
||||
.mega-menu-wrap .mega-toggle-animated-inner::before,
|
||||
.mega-menu-wrap .mega-toggle-animated-inner::after {
|
||||
position: absolute; left: 4px; right: 4px; height: 2px; background: #ffffff; content: "";
|
||||
transition: transform .2s ease;
|
||||
}
|
||||
.mega-menu-wrap .mega-toggle-animated-inner { top: 12px; }
|
||||
.mega-menu-wrap .mega-toggle-animated-inner::before { top: -8px; }
|
||||
.mega-menu-wrap .mega-toggle-animated-inner::after { top: 8px; }
|
||||
.mega-menu-wrap ul.mega-menu { list-style: none; margin: 0; padding: 0; }
|
||||
.mega-menu-wrap ul.mega-menu li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
|
||||
.mega-menu-wrap .mega-menu-link { display: block; padding: 10px 0; color: #D9D9D9; font-size: 14px; }
|
||||
.mega-menu-wrap .mega-sub-menu { padding-left: 16px; }
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.ele-ban-title div { font-size: 30px; }
|
||||
}
|
||||
|
||||
/* # 成员变量 Elementor 响应式可见性(hide_desktop/tablet/mobile → 对应类)
|
||||
* 断点同 Elementor:desktop >1024、tablet 768–1024、mobile ≤767(页脚移动菜单/隐藏节) **/
|
||||
@media (min-width: 1025px) {
|
||||
.elementor-hidden-desktop { display: none !important; }
|
||||
}
|
||||
@media (min-width: 768px) and (max-width: 1024px) {
|
||||
.elementor-hidden-tablet { display: none !important; }
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.elementor-hidden-mobile { display: none !important; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user