fix(hero): align header slider title/search stack with zibll
Put hero main title/subtitle in search before_html (document flow), move the search overlay outside the swiper as a sibling, and reset search/slide-text positioning to zibll tops so title and search no longer overlap.
This commit is contained in:
1 parent
e7ccc4f069
commit
397231ca75
12 files changed
+476
-439
No files matched your search
@@ -67,7 +67,7 @@ class DisplayRuntime {
|
||||
/**
|
||||
* Hero 搜索组件详细配置(PC/移动分别 + 子选项)
|
||||
*
|
||||
* @return array{pc:bool,mobile:bool,show_keywords:bool,popular_limit:int,show_input_cat:bool,show_type:bool,keywords:string[],categories:array,type_options:array}
|
||||
* @return array{pc:bool,mobile:bool,show:bool,show_keywords:bool,popular_limit:int,show_input_cat:bool,show_type:bool,keywords:string[],categories:array,type_options:array,before_html:string,after_html:string}
|
||||
*/
|
||||
public static function get_header_components_search_config(): array {
|
||||
$settings = Settings::get_all();
|
||||
@@ -83,6 +83,11 @@ class DisplayRuntime {
|
||||
$show_cat = !empty($settings['header_components_search_show_input_cat']);
|
||||
$show_type = !empty($settings['header_components_search_show_type']);
|
||||
|
||||
// Mobile: hide hot keywords to keep the overlay short (zibll parity).
|
||||
if ($is_mobile) {
|
||||
$show_kw = false;
|
||||
}
|
||||
|
||||
$keywords = [];
|
||||
if ($show && $show_kw) {
|
||||
$raw = $settings['hot_search_keywords'] ?? '';
|
||||
@@ -108,6 +113,13 @@ class DisplayRuntime {
|
||||
}
|
||||
}
|
||||
|
||||
$before_html = isset($settings['header_components_search_before_html'])
|
||||
? (string) $settings['header_components_search_before_html']
|
||||
: '';
|
||||
$after_html = isset($settings['header_components_search_after_html'])
|
||||
? (string) $settings['header_components_search_after_html']
|
||||
: '';
|
||||
|
||||
return [
|
||||
'pc' => $pc_on,
|
||||
'mobile' => $mobile_on,
|
||||
@@ -119,6 +131,8 @@ class DisplayRuntime {
|
||||
'keywords' => $keywords,
|
||||
'categories' => $categories,
|
||||
'type_options' => $type_options,
|
||||
'before_html' => $before_html,
|
||||
'after_html' => $after_html,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user