531 lines
43 KiB
PHP
531 lines
43 KiB
PHP
<?php
|
|
/**
|
|
* AKSRT_Admin_Schema_Page_Display schema builder.
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
class AKSRT_Admin_Schema_Page_Display {
|
|
|
|
public static function build(): array {
|
|
return [
|
|
'domain' => 'page_display',
|
|
'title' => '页面&显示',
|
|
'sections' => [
|
|
'header-nav' => [
|
|
'key' => 'header-nav',
|
|
'title' => '顶部导航栏',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'layout', 'title' => '导航栏布局', 'fields' => [
|
|
['key' => 'header_fixed', 'label' => '固定导航栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'header_nav_style', 'label' => '导航栏风格', 'type' => 'radio', 'default' => 'default', 'options' => [
|
|
['label' => '默认', 'value' => 'default'],
|
|
['label' => '透明', 'value' => 'transparent'],
|
|
['label' => '毛玻璃', 'value' => 'blur'],
|
|
]],
|
|
['key' => 'header_max_width', 'label' => '导航栏最大宽度', 'type' => 'number', 'default' => 1200, 'min' => 0, 'max' => 1600],
|
|
['key' => 'header_scroll_down_hide', 'label' => '下滑隐藏导航栏', 'type' => 'switch', 'default' => false],
|
|
]],
|
|
['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' => 'newposts', 'title' => '新文章提示', 'fields' => [
|
|
['key' => 'header_newposts_enabled', 'label' => '显示新文章提示', 'type' => 'switch', 'default' => true],
|
|
['key' => 'header_newposts_text', 'label' => '提示文案', 'type' => 'input', 'default' => '有新文章'],
|
|
['key' => 'header_newposts_radius', 'label' => '圆角', 'type' => 'number', 'default' => 12, 'min' => 0, 'max' => 30],
|
|
['key' => 'header_newposts_class', 'label' => '样式类', 'type' => 'input', 'default' => ''],
|
|
]],
|
|
['key' => 'color', 'title' => '颜色设置', 'fields' => [
|
|
['key' => 'header_theme_custom', 'label' => '自定义导航栏颜色', 'type' => 'switch', 'default' => false],
|
|
['key' => 'header_theme_bg_custom', 'label' => '自定义背景色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'header_theme_bg', 'label' => '背景颜色(备选)', 'type' => 'color', 'default' => ''],
|
|
['key' => 'header_theme_color_custom', 'label' => '自定义文字颜色', 'type' => 'color', 'default' => ''],
|
|
]],
|
|
['key' => 'layout-type', 'title' => '布局类型', 'fields' => [
|
|
['key' => 'header_layout', 'label' => '桌面端布局', 'type' => 'radio', 'default' => '2', 'options' => [
|
|
['label' => '布局 1(经典)', 'value' => '1'],
|
|
['label' => '布局 2(内联搜索)', 'value' => '2'],
|
|
['label' => '布局 3(紧凑)', 'value' => '3'],
|
|
]],
|
|
['key' => 'mobile_header_layout', 'label' => '移动端布局', 'type' => 'radio', 'default' => 'center', 'options' => [
|
|
['label' => '居中(含搜索按钮)', 'value' => 'center'],
|
|
['label' => '靠左', 'value' => 'left'],
|
|
]],
|
|
['key' => 'mobile_navbar_align', 'label' => '移动端菜单方向', 'type' => 'radio', 'default' => 'left', 'options' => [
|
|
['label' => '顶部(关闭手势)', 'value' => 'top'],
|
|
['label' => '左侧滑出', 'value' => 'left'],
|
|
['label' => '右侧滑出', 'value' => 'right'],
|
|
]],
|
|
]],
|
|
],
|
|
],
|
|
'header-components' => [
|
|
'key' => 'header-components',
|
|
'title' => '顶部多功能组件',
|
|
'version' => '1.1.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'visibility', 'title' => '显示规则', 'fields' => [
|
|
['key' => 'header_components_search_enabled', 'label' => '启用搜索覆盖层', 'type' => 'switch', 'default' => true],
|
|
['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'],
|
|
]],
|
|
['key' => 'header_components_device_visibility', 'label' => '设备显示规则', 'type' => 'radio', 'default' => '', 'options' => [
|
|
['label' => '全部', 'value' => ''],
|
|
['label' => '仅电脑', 'value' => 'only_pc'],
|
|
['label' => '仅移动', 'value' => 'only_sm'],
|
|
]],
|
|
]],
|
|
['key' => 'nav-color', 'title' => '导航栏配色', 'fields' => [
|
|
['key' => 'header_components_nav_color', 'label' => '导航栏文字颜色', 'type' => 'color', 'default' => '#ffffff'],
|
|
]],
|
|
['key' => 'slider-config', 'title' => '幻灯片配置', 'fields' => [
|
|
['key' => 'slider_config_direction', 'label' => '滑动方向', 'type' => 'radio', 'default' => 'horizontal', 'options' => [
|
|
['label' => '水平', 'value' => 'horizontal'],
|
|
['label' => '垂直', 'value' => 'vertical'],
|
|
]],
|
|
['key' => 'slider_config_speed', 'label' => '切换速度(ms)', 'type' => 'number', 'default' => 300, 'min' => 100, 'max' => 3000],
|
|
['key' => 'slider_config_button', 'label' => '显示前进后退按钮', 'type' => 'switch', 'default' => true],
|
|
['key' => 'slider_config_scale_height', 'label' => '缩放高度', 'type' => 'switch', 'default' => false],
|
|
['key' => 'slider_config_scale', 'label' => '缩放效果', 'type' => 'switch', 'default' => false],
|
|
['key' => 'slider_config_max_height', 'label' => '最大高度', 'type' => 'input', 'default' => ''],
|
|
['key' => 'slider_config_min_height', 'label' => '最小高度', 'type' => 'input', 'default' => ''],
|
|
]],
|
|
['key' => 'search', 'title' => '搜索组件', 'fields' => [
|
|
['key' => 'header_components_search_pc', 'label' => 'PC 端显示搜索', 'type' => 'switch', 'default' => true],
|
|
['key' => 'header_components_search_mobile', 'label' => '移动端显示搜索', 'type' => 'switch', 'default' => true],
|
|
['key' => 'header_components_search_show_keywords', 'label' => '显示热门搜索词', 'type' => 'switch', 'default' => false],
|
|
['key' => 'header_components_search_popular_limit', 'label' => '热词数量', 'type' => 'number', 'default' => 5, 'min' => 1, 'max' => 20],
|
|
['key' => 'header_components_search_show_input_cat', 'label' => '显示分类搜索', 'type' => 'switch', 'default' => false],
|
|
['key' => 'header_components_search_show_type', 'label' => '显示类型切换', 'type' => 'switch', 'default' => false],
|
|
]],
|
|
['key' => 'cards', 'title' => '图标卡片样式', 'fields' => [
|
|
['key' => 'header_components_filter_blur_devices', 'label' => '容器模糊设备', 'type' => 'checkbox', 'default' => [], 'options' => [
|
|
['label' => 'PC', 'value' => 'pc'],
|
|
['label' => '移动端', 'value' => 'mobile'],
|
|
]],
|
|
['key' => 'header_components_card_show_devices', 'label' => '卡片显示设备', 'type' => 'checkbox', 'default' => ['pc', 'mobile'], 'options' => [
|
|
['label' => 'PC', 'value' => 'pc'],
|
|
['label' => '移动端', 'value' => 'mobile'],
|
|
]],
|
|
['key' => 'header_components_card_shared_bg', 'label' => '共享卡片背景', 'type' => 'switch', 'default' => false],
|
|
['key' => 'header_components_card_blur', 'label' => '启用卡片模糊效果', 'type' => 'switch', 'default' => true],
|
|
['key' => 'header_components_card_icon_shape', 'label' => '图标形状', 'type' => 'radio', 'default' => 'circle', 'options' => [
|
|
['label' => '圆形', 'value' => 'circle'],
|
|
['label' => '方形', 'value' => 'square'],
|
|
]],
|
|
]],
|
|
['key' => 'icon-cards', 'title' => '图标卡片列表', 'fields' => [
|
|
['key' => 'header_components_icon_cards', 'label' => '图标卡片', 'type' => 'repeater', 'sanitize_type' => 'array', 'default' => []],
|
|
]],
|
|
],
|
|
],
|
|
'category' => [
|
|
'key' => 'category',
|
|
'title' => '分类页面',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'header', 'title' => '分类头图', 'fields' => [
|
|
['key' => 'category_header_style', 'label' => '头部风格', 'type' => 'radio', 'default' => 'cover', 'options' => [
|
|
['label' => '封面图', 'value' => 'cover'],
|
|
['label' => '简洁标题', 'value' => 'simple'],
|
|
['label' => '隐藏', 'value' => 'none'],
|
|
]],
|
|
['key' => 'category_cover_enabled', 'label' => '显示封面图', 'type' => 'switch', 'default' => true],
|
|
['key' => 'category_desc_enabled', 'label' => '显示分类简介', 'type' => 'switch', 'default' => true],
|
|
['key' => 'category_default_cover', 'label' => '默认封面图', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
['key' => 'list', 'title' => '列表设置', 'fields' => [
|
|
['key' => 'category_list_mode', 'label' => '列表模式', 'type' => 'radio', 'default' => 'grid', 'options' => [
|
|
['label' => '网格', 'value' => 'grid'],
|
|
['label' => '列表', 'value' => 'list'],
|
|
['label' => '紧凑', 'value' => 'compact'],
|
|
]],
|
|
['key' => 'category_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48],
|
|
['key' => 'category_filter_bar', 'label' => '筛选条', 'type' => 'switch', 'default' => true],
|
|
['key' => 'category_sidebar', 'label' => '侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'category_post_count', 'label' => '显示文章数', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
['key' => 'orderby', 'title' => '排序设置', 'fields' => [
|
|
['key' => 'category_orderby', 'label' => '默认排序', 'type' => 'select', 'default' => 'modified', 'options' => [
|
|
['label' => '最近更新', 'value' => 'modified'],
|
|
['label' => '发布时间', 'value' => 'date'],
|
|
['label' => '浏览数', 'value' => 'views'],
|
|
['label' => '评论数', 'value' => 'comments'],
|
|
['label' => '点赞数', 'value' => 'likes'],
|
|
]],
|
|
]],
|
|
],
|
|
],
|
|
'tag' => [
|
|
'key' => 'tag',
|
|
'title' => '标签页面',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'header', 'title' => '标签头图', 'fields' => [
|
|
['key' => 'tag_header_style', 'label' => '头部风格', 'type' => 'radio', 'default' => 'simple', 'options' => [
|
|
['label' => '简洁标题', 'value' => 'simple'],
|
|
['label' => '封面图', 'value' => 'cover'],
|
|
['label' => '隐藏', 'value' => 'none'],
|
|
]],
|
|
['key' => 'tag_default_cover', 'label' => '默认封面图', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
['key' => 'list', 'title' => '列表设置', 'fields' => [
|
|
['key' => 'tag_list_mode', 'label' => '列表模式', 'type' => 'radio', 'default' => 'grid', 'options' => [
|
|
['label' => '网格', 'value' => 'grid'],
|
|
['label' => '列表', 'value' => 'list'],
|
|
]],
|
|
['key' => 'tag_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48],
|
|
['key' => 'tag_sidebar', 'label' => '侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'tag_post_count', 'label' => '显示文章数', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
['key' => 'orderby', 'title' => '排序设置', 'fields' => [
|
|
['key' => 'tag_orderby', 'label' => '默认排序', 'type' => 'select', 'default' => 'count', 'options' => [
|
|
['label' => '文章数', 'value' => 'count'],
|
|
['label' => '名称', 'value' => 'name'],
|
|
['label' => '最近更新', 'value' => 'modified'],
|
|
]],
|
|
]],
|
|
],
|
|
],
|
|
'user-home' => [
|
|
'key' => 'user-home',
|
|
'title' => '用户主页',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'layout', 'title' => '主页布局', 'fields' => [
|
|
['key' => 'user_home_cover', 'label' => '封面区域', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_sidebar', 'label' => '侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_follow', 'label' => '关注按钮', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_posts_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 10, 'min' => 5, 'max' => 50],
|
|
['key' => 'user_home_paging_ajax', 'label' => 'AJAX 翻页', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
['key' => 'tabs', 'title' => 'Tab 配置', 'fields' => [
|
|
['key' => 'user_home_tabs', 'label' => '显示的 Tab', 'type' => 'input', 'default' => 'posts,comments,favorites,credits,product,plate,forum,follow'],
|
|
['key' => 'user_home_tabs_order', 'label' => 'Tab 显示顺序', 'type' => 'input', 'default' => 'posts,comments,favorites,credits,product,plate,forum,follow'],
|
|
['key' => 'user_home_tabs_pc_hide', 'label' => 'PC 端隐藏', 'type' => 'input', 'default' => ''],
|
|
['key' => 'user_home_tabs_mobile_hide', 'label' => '移动端隐藏', 'type' => 'input', 'default' => ''],
|
|
['key' => 'author_main_tab_swiper', 'label' => '移动端滑动切换', 'type' => 'switch', 'default' => false],
|
|
]],
|
|
['key' => 'display', 'title' => '展示设置', 'fields' => [
|
|
['key' => 'user_home_avatar', 'label' => '显示头像', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_name', 'label' => '显示用户名', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_desc', 'label' => '显示个人简介', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_stats', 'label' => '显示统计数据', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_social', 'label' => '显示社交链接', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_message', 'label' => '私信按钮', 'type' => 'switch', 'default' => true],
|
|
['key' => 'user_home_private', 'label' => '留言按钮', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
],
|
|
],
|
|
'other' => [
|
|
'key' => 'other',
|
|
'title' => '其它页面',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'page-header', 'title' => '统一页头', 'fields' => [
|
|
['key' => 'page_header_style', 'label' => '页面标题样式', 'type' => 'select', 'default' => '1', 'options' => [
|
|
['label' => '不显示', 'value' => ''],
|
|
['label' => '简单', 'value' => '1'],
|
|
['label' => '卡片', 'value' => '2'],
|
|
['label' => '封面', 'value' => '3'],
|
|
]],
|
|
['key' => 'page_header_cover_img', 'label' => '默认封面图', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
['key' => 'page_404', 'title' => '404 页面', 'fields' => [
|
|
['key' => 'page_404_message', 'label' => '404 提示文字', 'type' => 'input', 'default' => '页面未找到'],
|
|
['key' => 'page_404_search', 'label' => '显示搜索框', 'type' => 'switch', 'default' => true],
|
|
['key' => 'page_404_popular', 'label' => '显示热门文章', 'type' => 'switch', 'default' => true],
|
|
['key' => 'page_404_back', 'label' => '显示返回首页', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
['key' => 'search_results', 'title' => '搜索结果页', 'fields' => [
|
|
['key' => 'page_search_sidebar', 'label' => '搜索结果侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'page_search_per_page', 'label' => '每页结果数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48],
|
|
]],
|
|
['key' => 'author', 'title' => '作者页面', 'fields' => [
|
|
['key' => 'page_author_cover', 'label' => '显示封面', 'type' => 'switch', 'default' => true],
|
|
['key' => 'page_author_sidebar', 'label' => '显示侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'page_author_posts_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48],
|
|
]],
|
|
],
|
|
],
|
|
'special' => [
|
|
'key' => 'special',
|
|
'title' => '专题页面',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'header', 'title' => '专题头部', 'fields' => [
|
|
['key' => 'special_cover_enabled', 'label' => '显示专题封面', 'type' => 'switch', 'default' => true],
|
|
['key' => 'special_summary_enabled', 'label' => '显示专题摘要', 'type' => 'switch', 'default' => true],
|
|
['key' => 'special_summary_length', 'label' => '摘要最大长度', 'type' => 'number', 'default' => 200, 'min' => 50, 'max' => 500],
|
|
['key' => 'special_default_cover', 'label' => '默认封面图', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
['key' => 'layout', 'title' => '布局设置', 'fields' => [
|
|
['key' => 'special_layout', 'label' => '内容布局', 'type' => 'radio', 'default' => 'grid', 'options' => [
|
|
['label' => '网格', 'value' => 'grid'],
|
|
['label' => '列表', 'value' => 'list'],
|
|
['label' => '瀑布流', 'value' => 'masonry'],
|
|
]],
|
|
['key' => 'special_columns', 'label' => '网格列数', 'type' => 'number', 'default' => 2, 'min' => 1, 'max' => 4],
|
|
['key' => 'special_sidebar', 'label' => '侧边栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'special_post_count', 'label' => '显示文章数', 'type' => 'switch', 'default' => false],
|
|
]],
|
|
['key' => 'aggregation', 'title' => '聚合规则', 'fields' => [
|
|
['key' => 'special_source_type', 'label' => '内容来源', 'type' => 'radio', 'default' => 'category', 'options' => [
|
|
['label' => '分类', 'value' => 'category'],
|
|
['label' => '标签', 'value' => 'tag'],
|
|
['label' => '手动选择', 'value' => 'manual'],
|
|
['label' => '最新文章', 'value' => 'latest'],
|
|
]],
|
|
['key' => 'special_source_ids', 'label' => '来源 ID 列表', 'type' => 'input', 'default' => ''],
|
|
]],
|
|
['key' => 'subpage', 'title' => '子页面展示', 'fields' => [
|
|
['key' => 'special_subpage_display', 'label' => '子页面样式', 'type' => 'radio', 'default' => 'cards', 'options' => [
|
|
['label' => '卡片', 'value' => 'cards'],
|
|
['label' => '列表', 'value' => 'list'],
|
|
['label' => '时间线', 'value' => 'timeline'],
|
|
]],
|
|
['key' => 'special_subpage_count', 'label' => '每页子页面数', 'type' => 'number', 'default' => 6, 'min' => 1, 'max' => 24],
|
|
]],
|
|
['key' => 'pagination', 'title' => '分页设置', 'fields' => [
|
|
['key' => 'special_pagination', 'label' => '分页模式', 'type' => 'radio', 'default' => 'numeric', 'options' => [
|
|
['label' => '数字分页', 'value' => 'numeric'],
|
|
['label' => '加载更多', 'value' => 'load_more'],
|
|
['label' => '无限滚动', 'value' => 'infinite'],
|
|
]],
|
|
['key' => 'special_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48],
|
|
]],
|
|
['key' => 'orderby', 'title' => '排序设置', 'fields' => [
|
|
['key' => 'special_orderby', 'label' => '默认排序', 'type' => 'select', 'default' => 'date', 'options' => [
|
|
['label' => '发布时间', 'value' => 'date'],
|
|
['label' => '最近更新', 'value' => 'modified'],
|
|
['label' => '浏览数', 'value' => 'views'],
|
|
['label' => '评论数', 'value' => 'comments'],
|
|
]],
|
|
]],
|
|
],
|
|
],
|
|
'background' => [
|
|
'key' => 'background',
|
|
'title' => '全局背景',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'light', 'title' => '亮色背景', 'fields' => [
|
|
['key' => 'bg_color', 'label' => '背景颜色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'bg_image', 'label' => '背景图片', 'type' => 'media', 'default' => ''],
|
|
['key' => 'bg_size', 'label' => '图片尺寸', 'type' => 'select', 'default' => 'cover', 'options' => [
|
|
['label' => '覆盖', 'value' => 'cover'],
|
|
['label' => '包含', 'value' => 'contain'],
|
|
['label' => '原始大小', 'value' => 'auto'],
|
|
['label' => '拉伸填充', 'value' => '100% 100%'],
|
|
['label' => '100% 宽度(旧版兼容)', 'value' => '100%'],
|
|
]],
|
|
['key' => 'bg_position', 'label' => '图片位置', 'type' => 'select', 'default' => 'center center', 'options' => [
|
|
['label' => '居中', 'value' => 'center center'],
|
|
['label' => '顶部居中', 'value' => 'top center'],
|
|
['label' => '底部居中', 'value' => 'bottom center'],
|
|
]],
|
|
['key' => 'bg_repeat', 'label' => '图片重复', 'type' => 'select', 'default' => 'no-repeat', 'options' => [
|
|
['label' => '不重复', 'value' => 'no-repeat'],
|
|
['label' => '平铺', 'value' => 'repeat'],
|
|
['label' => '水平平铺', 'value' => 'repeat-x'],
|
|
['label' => '垂直平铺', 'value' => 'repeat-y'],
|
|
]],
|
|
['key' => 'bg_attachment', 'label' => '固定方式', 'type' => 'select', 'default' => 'fixed', 'options' => [
|
|
['label' => '固定', 'value' => 'fixed'],
|
|
['label' => '随内容滚动', 'value' => 'scroll'],
|
|
]],
|
|
]],
|
|
['key' => 'dark', 'title' => '暗色背景', 'fields' => [
|
|
['key' => 'bg_dark_color', 'label' => '暗色背景颜色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'bg_dark_image', 'label' => '暗色背景图片', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
['key' => 'overlay', 'title' => '遮罩设置', 'fields' => [
|
|
['key' => 'bg_overlay', 'label' => '启用背景遮罩', 'type' => 'switch', 'default' => false],
|
|
['key' => 'bg_overlay_color', 'label' => '遮罩颜色', 'type' => 'input', 'default' => 'rgba(0, 0, 0, 0.3)'],
|
|
]],
|
|
['key' => 'page', 'title' => '页面背景', 'fields' => [
|
|
['key' => 'page_bg_color', 'label' => '内容区背景色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'page_bg_image', 'label' => '内容区背景图', 'type' => 'media', 'default' => ''],
|
|
]],
|
|
],
|
|
],
|
|
'menu-decoration' => [
|
|
'key' => 'menu-decoration',
|
|
'title' => '菜单装饰',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'icon', 'title' => '菜单图标', 'fields' => [
|
|
['key' => 'menu_icon_enabled', 'label' => '显示菜单图标', 'type' => 'switch', 'default' => true],
|
|
['key' => 'menu_badge_enabled', 'label' => '显示菜单徽章', 'type' => 'switch', 'default' => true],
|
|
]],
|
|
['key' => 'submenu', 'title' => '下拉子菜单', 'fields' => [
|
|
['key' => 'menu_submenu_style', 'label' => '子菜单样式', 'type' => 'radio', 'default' => 'dropdown', 'options' => [
|
|
['label' => '普通下拉', 'value' => 'dropdown'],
|
|
['label' => '多列下拉', 'value' => 'mega'],
|
|
['label' => '图文卡片', 'value' => 'cards'],
|
|
]],
|
|
['key' => 'menu_submenu_columns', 'label' => '多列列数', 'type' => 'number', 'default' => 1, 'min' => 1, 'max' => 5],
|
|
['key' => 'menu_submenu_width', 'label' => '子菜单宽度 (px)', 'type' => 'number', 'default' => 220, 'min' => 160, 'max' => 800],
|
|
]],
|
|
['key' => 'effect', 'title' => '交互效果', 'fields' => [
|
|
['key' => 'menu_hover_effect', 'label' => 'Hover 效果', 'type' => 'radio', 'default' => 'underline', 'options' => [
|
|
['label' => '下划线', 'value' => 'underline'],
|
|
['label' => '背景色', 'value' => 'background'],
|
|
['label' => '文字变色', 'value' => 'color'],
|
|
['label' => '无效果', 'value' => 'none'],
|
|
]],
|
|
['key' => 'menu_item_padding', 'label' => '菜单项内边距 (px)', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 32],
|
|
]],
|
|
['key' => 'mobile', 'title' => '移动端菜单', 'fields' => [
|
|
['key' => 'menu_mobile_style', 'label' => '移动端菜单样式', 'type' => 'radio', 'default' => 'drawer', 'options' => [
|
|
['label' => '抽屉', 'value' => 'drawer'],
|
|
['label' => '全屏', 'value' => 'fullscreen'],
|
|
['label' => '下拉', 'value' => 'dropdown'],
|
|
]],
|
|
]],
|
|
],
|
|
],
|
|
'footer' => [
|
|
'key' => 'footer',
|
|
'title' => '底部页脚',
|
|
'version' => '1.0.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'layout', 'title' => '页脚布局', 'fields' => [
|
|
['key' => 'footer_columns', 'label' => '页脚列数', 'type' => 'number', 'default' => 3, 'min' => 1, 'max' => 4],
|
|
['key' => 'footer_copyright', 'label' => '显示版权信息', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_icp', 'label' => '显示ICP备案', 'type' => 'switch', 'default' => true],
|
|
['key' => 'icp_number', 'label' => 'ICP备案号', 'type' => 'input', 'default' => '', 'help' => '例如:ICP 备 xxxxxxxx 号'],
|
|
['key' => 'footer_police', 'label' => '显示公安备案', 'type' => 'switch', 'default' => true],
|
|
['key' => 'police_number', 'label' => '公安备案号', 'type' => 'input', 'default' => '', 'help' => '例如:公网安备 xxxxxx 号'],
|
|
]],
|
|
['key' => 'color', 'title' => '页脚颜色', 'fields' => [
|
|
['key' => 'footer_theme_custom', 'label' => '自定义页脚颜色', 'type' => 'switch', 'default' => false],
|
|
['key' => 'footer_theme_bg_custom', 'label' => '自定义背景色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'footer_theme_bg', 'label' => '背景图片', 'type' => 'media', 'default' => ''],
|
|
['key' => 'footer_theme_color_custom', 'label' => '自定义文字颜色', 'type' => 'color', 'default' => ''],
|
|
]],
|
|
['key' => 'contact', 'title' => '联系方式', 'fields' => [
|
|
['key' => 'footer_contact_wechat_img', 'label' => '微信二维码', 'type' => 'media', 'default' => ''],
|
|
['key' => 'footer_contact_qq', 'label' => 'QQ', 'type' => 'input', 'default' => ''],
|
|
['key' => 'footer_contact_weibo', 'label' => '微博', 'type' => 'input', 'default' => ''],
|
|
['key' => 'footer_contact_email', 'label' => '邮箱', 'type' => 'input', 'default' => ''],
|
|
]],
|
|
['key' => 'brand', 'title' => '品牌列(第一列)', 'fields' => [
|
|
['key' => 'footer_t1_m_s', 'label' => '显示设备', 'type' => 'checkbox', 'default' => ['pc', 'mobile'], 'options' => [
|
|
['label' => 'PC', 'value' => 'pc'],
|
|
['label' => '移动端', 'value' => 'mobile'],
|
|
]],
|
|
['key' => 'footer_t1_img', 'label' => '页脚 Logo(日间)', 'type' => 'media', 'default' => ''],
|
|
['key' => 'footer_t1_img_dark', 'label' => '页脚 Logo(夜间)', 'type' => 'media', 'default' => ''],
|
|
['key' => 'footer_t1_t', 'label' => '品牌标题', 'type' => 'input', 'default' => ''],
|
|
['key' => 'fcode_t1_code', 'label' => '品牌列自定义代码', 'type' => 'textarea', 'default' => ''],
|
|
]],
|
|
['key' => 'contact_ext', 'title' => '联系方式扩展', 'fields' => [
|
|
['key' => 'footer_contact_m_s', 'label' => '显示设备', 'type' => 'checkbox', 'default' => ['pc', 'mobile'], 'options' => [
|
|
['label' => 'PC', 'value' => 'pc'],
|
|
['label' => '移动端', 'value' => 'mobile'],
|
|
]],
|
|
['key' => 'footer_contact_more', 'label' => '更多联系项', 'type' => 'textarea', 'default' => '', 'help' => 'JSON 数组,每项含 desc/icon/link/img'],
|
|
['key' => 'fcode_t2_code_1', 'label' => '联系区上方自定义代码', 'type' => 'textarea', 'default' => ''],
|
|
['key' => 'fcode_t2_code_2', 'label' => '联系区下方自定义代码(备案等)', 'type' => 'textarea', 'default' => ''],
|
|
]],
|
|
['key' => 'mini_qr', 'title' => '二维码图片组(第三列)', 'fields' => [
|
|
['key' => 'footer_mini_img_m_s', 'label' => '显示设备', 'type' => 'checkbox', 'default' => ['pc', 'mobile'], 'options' => [
|
|
['label' => 'PC', 'value' => 'pc'],
|
|
['label' => '移动端', 'value' => 'mobile'],
|
|
]],
|
|
['key' => 'footer_mini_img', 'label' => '二维码组', 'type' => 'textarea', 'default' => '', 'help' => 'JSON 数组,每项含 text/img(最多4个)'],
|
|
]],
|
|
['key' => 'custom', 'title' => '底部自定义', 'fields' => [
|
|
['key' => 'fcode_customize_code', 'label' => '底部自定义代码', 'type' => 'textarea', 'default' => ''],
|
|
]],
|
|
],
|
|
],
|
|
'tabbar' => [
|
|
'key' => 'tabbar',
|
|
'title' => '底部Tab栏',
|
|
'version' => '1.1.0',
|
|
'option_key' => 'aksrt_settings',
|
|
'groups' => [
|
|
['key' => 'basic', 'title' => 'Tab栏设置', 'fields' => [
|
|
['key' => 'footer_tabbar_s', 'label' => '启用底部Tab栏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_scroll_hide', 'label' => '滚动时隐藏', 'type' => 'switch', 'default' => false],
|
|
['key' => 'footer_tabbar_scroll_down_hide', 'label' => '下滑时隐藏', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_max_items', 'label' => '最大Tab数', 'type' => 'number', 'default' => 5, 'min' => 3, 'max' => 7],
|
|
['key' => 'footer_tabbar_icon_size', 'label' => '图标大小', 'type' => 'number', 'default' => 22, 'min' => 16, 'max' => 32],
|
|
['key' => 'footer_tabbar_text_size', 'label' => '文字大小', 'type' => 'number', 'default' => 10, 'min' => 8, 'max' => 14],
|
|
['key' => 'footer_tabbar_show_text', 'label' => '显示文字', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_active_color', 'label' => '选中颜色', 'type' => 'color', 'default' => '#f04494'],
|
|
['key' => 'footer_tabbar_bg_color', 'label' => '背景颜色', 'type' => 'color', 'default' => ''],
|
|
['key' => 'footer_tabbar_border', 'label' => '显示上边框', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_shadow', 'label' => '显示阴影', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_animation', 'label' => '切换动画', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_double_click_home', 'label' => '双击首页刷新', 'type' => 'switch', 'default' => true],
|
|
['key' => 'footer_tabbar_badge_dot', 'label' => '徽标圆点样式', 'type' => 'switch', 'default' => false],
|
|
['key' => 'footer_tabbar_single', 'label' => '文章页专属Tab', 'type' => 'select', 'default' => 'default', 'options' => [
|
|
['label' => '默认按钮', 'value' => 'default'],
|
|
['label' => '文章扩展按钮(评论/收藏/分享)', 'value' => 'extend'],
|
|
], 'help' => '文章详情页底部显示的Tab按钮类型'],
|
|
]],
|
|
],
|
|
],
|
|
'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' => ''],
|
|
]],
|
|
],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
}
|