fix(header): wire multi-function page-type enable like zibll

Connect header_components_show_on through aksrt_header_slide_is_show with
zibll page-type matching, drop the homepage-only gate, align admin options,
apply nav color, enqueue by is_show, remove dead float-btn schema, and
consume footer_tabbar_single extend mode on post singles.
This commit is contained in:
2026-07-15 17:12:51 +08:00
parent 3e3a4631f0
commit bfb64211ee
12 changed files with 445 additions and 285 deletions
@@ -78,13 +78,16 @@ class AKSRT_Admin_Schema_Page_Display {
['key' => 'header_components_cards_enabled', 'label' => '启用图标卡片', 'type' => 'switch', 'default' => false],
['key' => 'header_components_show_on', 'label' => '按页面类型启用', 'type' => 'checkbox', 'default' => ['home'], 'options' => [
['label' => '首页', 'value' => 'home'],
['label' => '文章', 'value' => 'single'],
['label' => '页面', 'value' => 'page'],
['label' => '分类', 'value' => 'category'],
['label' => '标签', 'value' => 'tag'],
['label' => '搜索', 'value' => 'search'],
['label' => '归档', 'value' => 'archive'],
['label' => '专题', 'value' => 'special'],
['label' => '专题页', 'value' => 'topics'],
['label' => '分类页', 'value' => 'category'],
['label' => '标签页', 'value' => 'tag'],
['label' => '用户页', 'value' => 'author'],
['label' => '文章页', 'value' => 'single'],
['label' => '搜索页', 'value' => 'search'],
['label' => '[论坛]首页', 'value' => 'forum_home'],
['label' => '[论坛]板块页面', 'value' => 'forum_plate'],
['label' => '[论坛]帖子页面', 'value' => 'forum_post'],
['label' => '其它页面', 'value' => 'page'],
]],
['key' => 'header_components_device_visibility', 'label' => '设备显示规则', 'type' => 'radio', 'default' => '', 'options' => [
['label' => '全部', 'value' => ''],
@@ -494,37 +497,6 @@ class AKSRT_Admin_Schema_Page_Display {
]],
],
],
'float-btn' => [
'key' => 'float-btn',
'title' => '悬浮按钮',
'version' => '1.1.0',
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'basic', 'title' => '悬浮按钮设置', 'fields' => [
['key' => 'float_btn_style', 'label' => '按钮风格', 'type' => 'radio', 'default' => 'round', 'options' => [
['label' => '圆形', 'value' => 'round'],
['label' => '方形', 'value' => 'square'],
]],
['key' => 'float_btn_position', 'label' => '按钮位置', 'type' => 'radio', 'default' => 'bottom', 'options' => [
['label' => '底部', 'value' => 'bottom'],
['label' => '居中', 'value' => 'center'],
]],
['key' => 'float_btn_scroll_hide', 'label' => '滚动时隐藏', 'type' => 'switch', 'default' => false],
['key' => 'float_btn_scroll_down_hide', 'label' => '下滑时隐藏', 'type' => 'switch', 'default' => true],
['key' => 'float_btn_max', 'label' => '最大显示数', 'type' => 'number', 'default' => 5, 'min' => 1, 'max' => 10],
['key' => 'float_btn_size', 'label' => '按钮尺寸', 'type' => 'number', 'default' => 44, 'min' => 32, 'max' => 64],
['key' => 'float_btn_spacing', 'label' => '按钮间距', 'type' => 'number', 'default' => 10, 'min' => 4, 'max' => 24],
['key' => 'float_btn_shadow', 'label' => '显示阴影', 'type' => 'switch', 'default' => true],
['key' => 'float_btn_animation', 'label' => '悬停动画', 'type' => 'switch', 'default' => true],
['key' => 'float_btn_opacity', 'label' => '按钮透明度', 'type' => 'number', 'default' => 100, 'min' => 30, 'max' => 100],
['key' => 'float_btn_active_color', 'label' => '激活颜色', 'type' => 'color', 'default' => ''],
['key' => 'float_btn_bg_color', 'label' => '背景颜色', 'type' => 'color', 'default' => ''],
['key' => 'float_btn_pc_s', 'label' => 'PC端显示', 'type' => 'switch', 'default' => true],
['key' => 'float_btn_m_s', 'label' => '移动端显示', 'type' => 'switch', 'default' => true],
['key' => 'float_btn_filter_css', 'label' => '过滤CSS', 'type' => 'textarea', 'default' => ''],
]],
],
],
],
];
}