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
@@ -626,14 +626,17 @@ export const pageDisplaySchemas = {
{ key: 'header_components_cards_enabled', label: '启用图标卡片', type: 'switch', default: false, help: '在顶部组件区域显示图标卡片入口' },
{ 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' },
], help: '选择哪些页面类型显示顶部组件,不选则关闭' },
{ 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' },
], help: '选择启用顶部多功能组件的页面类型,一个都不选则为关闭此功能' },
{ key: 'header_components_device_visibility', label: '设备显示规则', type: 'radio', default: '', options: [
{ label: '全部', value: '' },
{ label: '仅电脑', value: 'only_pc' },
@@ -742,74 +745,6 @@ export const pageDisplaySchemas = {
],
},
/**
* Floating button settings
*/
'float-btn': {
key: 'page_display.float-btn',
title: '悬浮按钮',
icon: 'fas fa-circle-chevron-up',
description: '配置页面悬浮按钮的显示规则、样式和滚动隐藏行为。',
defaults: {
float_btn_style: 'round',
float_btn_position: 'bottom',
float_btn_scroll_hide: false,
float_btn_scroll_down_hide: true,
float_btn_max: 5,
float_btn_size: 44,
float_btn_spacing: 10,
float_btn_shadow: true,
float_btn_animation: true,
float_btn_opacity: 100,
float_btn_active_color: '',
float_btn_bg_color: '',
float_btn_pc_s: true,
float_btn_m_s: true,
float_btn_filter_css: '',
},
groups: [
{
key: 'basic',
title: '悬浮按钮设置',
icon: 'fas fa-circle-notch',
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: '' },
],
},
],
},
footer: {
key: 'page_display.footer',
title: '底部页脚',