fix(header): restore gutters-5 gaps on homepage icon cards

Homepage never loaded zibll-utilities (single-post only), so .gutters-5 padding was missing and cards stuck together while other pages looked correct.
This commit is contained in:
2026-07-24 11:42:13 +08:00
parent d1f1cab6c8
commit e45bfc6eec
2 changed files with 59 additions and 0 deletions
@@ -16,7 +16,56 @@ body.dark-theme .header-components-search__input {
* DOM: .header-slider-card.container > (.zib-widget.padding-10|div)
* > .flex.jse.flex-row.gutters-5.flex-col-sm-2
* > (.flex1|.relative-h) > [.main-color >] .icon-cover-card.flex.ac.(zib-widget|padding-10)
*
* IMPORTANT: gutters/flex helpers must live here (not only zibll-utilities.css).
* zibll-utilities was single-post-only, so homepage cards stuck together while
* other pages that load utilities showed 10px gaps — exact user screenshot bug.
* ============================================================ */
/* Self-contained zibll flex + gutters for header cards (page-type independent) */
.header-slider-card .flex,
.header-components-card .flex {
display: flex;
}
.header-slider-card .flex.jse,
.header-components-card .flex.jse,
.header-slider-card .jse,
.header-components-card .jse {
justify-content: space-evenly;
}
.header-slider-card .flex-row,
.header-components-card .flex-row {
flex-direction: row;
}
.header-slider-card .flex.ac,
.header-components-card .flex.ac,
.header-slider-card .ac,
.header-components-card .ac {
align-items: center;
}
/* zibll: .gutters-5 { margin:-5px } > * { padding:5px } → 10px visual gap */
.header-slider-card .gutters-5,
.header-components-card .gutters-5 {
margin: -5px;
}
.header-slider-card .gutters-5 > *,
.header-components-card .gutters-5 > * {
padding: 5px;
}
.header-slider-card .flex1,
.header-components-card .flex1,
.header-slider-card .flex .flex1,
.header-components-card .flex .flex1 {
flex: 1;
overflow: hidden;
min-width: 0;
}
.header-slider-card .relative-h,
.header-components-card .relative-h {
position: relative;
height: 100%;
}
.header-slider-card,
.header-components-card {
position: relative;
+10
View File
@@ -274,6 +274,16 @@ $hmb_js = get_template_directory() . '/assets/js/header-newadd.js';
// 顶部多功能组件:按 page-type 启用结果入队(对齐 zibll,不绑死首页)
if (function_exists('aksrt_header_slide_is_show') && aksrt_header_slide_is_show()) {
// flex/gutters used by icon cards (same helpers single-post loads via zibll-utilities)
$zu_path = get_template_directory() . '/assets/css/frontend/zibll-utilities.css';
if (file_exists($zu_path)) {
wp_enqueue_style(
'aksrt-zibll-utilities',
$base_uri . '/assets/css/frontend/zibll-utilities.css',
is_string($deps[0] ?? null) ? [$deps[0]] : (array) $deps,
filemtime($zu_path) ?: $version
);
}
$enqueue_module('header-components');
}