feat(nav): deep 1:1 zibll search-box + navbar-search + newposts unify

Port aksrt_get_search_box/posts for menu_search and layout 1/3 slide;
unify publish switch; expand user-box admin row; CSS/JS remote-box parity.
This commit is contained in:
2026-07-22 17:06:24 +08:00
parent 70f7ef71e1
commit 1d1fef50af
19 changed files with 980 additions and 267 deletions
+8 -2
View File
@@ -42,7 +42,6 @@ class SchemaPageDisplay {
['key' => 'components', 'title' => '导航组件', 'fields' => [
['key' => 'header_search_enabled', 'label' => '搜索入口', 'type' => 'switch', 'default' => true],
['key' => 'header_user_menu', 'label' => '用户菜单', 'type' => 'switch', 'default' => true],
['key' => 'header_publish_btn', 'label' => '发布按钮', 'type' => 'switch', 'default' => true],
['key' => 'header_mobile_drawer', 'label' => '移动端抽屉导航', 'type' => 'switch', 'default' => true],
['key' => 'header_nav_pay_vip', 'label' => '导航栏开通会员按钮', 'type' => 'switch', 'default' => true],
['key' => 'header_nav_user_pay_vip', 'label' => '用户框开通会员按钮', 'type' => 'switch', 'default' => true],
@@ -51,7 +50,14 @@ class SchemaPageDisplay {
['key' => 'header_newposts_enabled', 'label' => '启用发布按钮', 'type' => 'switch', 'default' => true],
['key' => 'header_newposts_text', 'label' => '按钮文案', 'type' => 'input', 'default' => '<i class="fa fa-pencil"></i> 发布'],
['key' => 'header_newposts_radius', 'label' => '按钮圆角(胶囊)', 'type' => 'switch', 'default' => true],
['key' => 'header_newposts_class', 'label' => '样式类', 'type' => 'input', 'default' => ''],
['key' => 'header_newposts_class', 'label' => '按钮颜色', 'type' => 'select', 'default' => 'jb-blue', 'options' => [
['label' => '蓝色', 'value' => 'jb-blue'],
['label' => '红色', 'value' => 'jb-red'],
['label' => '绿色', 'value' => 'jb-green'],
['label' => '黄色', 'value' => 'jb-yellow'],
['label' => '紫色', 'value' => 'jb-purple'],
['label' => '粉色', 'value' => 'jb-pink'],
]],
['key' => 'header_newposts_types', 'label' => '发布类型', 'type' => 'select', 'default' => ['post'], 'options' => [
['label' => '文章', 'value' => 'post'],
['label' => '帖子', 'value' => 'topic'],
+3 -2
View File
@@ -40,7 +40,8 @@ trait FacadeBulk {
'fixed' => !isset($settings['header_fixed']) || !empty($settings['header_fixed']),
'search_enabled' => !isset($settings['header_search_enabled']) || !empty($settings['header_search_enabled']),
'user_menu' => !isset($settings['header_user_menu']) || !empty($settings['header_user_menu']),
'publish_btn' => !isset($settings['header_publish_btn']) || !empty($settings['header_publish_btn']),
// Unified with header_newposts_enabled (zibll nav_newposts).
'publish_btn' => !isset($settings['header_newposts_enabled']) || !empty($settings['header_newposts_enabled']),
'mobile_drawer' => !isset($settings['header_mobile_drawer']) || !empty($settings['header_mobile_drawer']),
'nav_style' => $nav_style,
'max_width' => $max_width,
@@ -85,7 +86,7 @@ trait FacadeBulk {
'text' => trim((string) ($s['header_newposts_text'] ?? '<i class="fa fa-pencil"></i> 发布')),
'radius' => $radius_px,
'radius_pill' => $radius_pill,
'class' => sanitize_html_class((string) ($s['header_newposts_class'] ?? '')),
'class' => sanitize_html_class((string) (($s['header_newposts_class'] ?? '') !== '' ? $s['header_newposts_class'] : 'jb-blue')),
'types' => $types,
];
}