导入 AKSRT 主题开发源码
This commit is contained in:
1 parent
9681dd3d48
commit
1268a55dd0
595 files changed
+127705
No files matched your search
@@ -0,0 +1,100 @@
|
||||
export const commentSchema = {
|
||||
key: 'post_list.comment',
|
||||
title: '评论设置',
|
||||
icon: 'fas fa-comment-dots',
|
||||
description: '配置评论区的排序、分页、权限、工具栏与互动方式。',
|
||||
defaults: {
|
||||
comment_order: 'asc',
|
||||
comment_per_page: 20,
|
||||
comment_pagination_type: 'numbered',
|
||||
comment_paging_ajax_ias_s: true,
|
||||
comment_paging_ajax_ias_max: 3,
|
||||
comment_nested_depth: 3,
|
||||
comment_avatar_size: 48,
|
||||
comment_require_login: false,
|
||||
comment_allow_reply: true,
|
||||
comment_close_comments: false,
|
||||
comment_edit_window: 10,
|
||||
comment_smilie: true,
|
||||
comment_code: true,
|
||||
comment_img: true,
|
||||
comment_upload_img: false,
|
||||
comment_like_s: true,
|
||||
comment_quick_s: true,
|
||||
comment_city_s: true,
|
||||
comment_author_tag: true,
|
||||
comment_corderby: true,
|
||||
comment_empty_text: '暂无评论,来做第一个评论的人吧~',
|
||||
comment_title: '评论',
|
||||
comment_submit_text: '提交评论',
|
||||
comment_text: '说点什么吧...',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'display',
|
||||
title: '评论展示',
|
||||
icon: 'fas fa-comment',
|
||||
fields: [
|
||||
{ key: 'comment_order', label: '评论排序', type: 'radio', default: 'asc', options: [
|
||||
{ label: '正序 (旧→新)', value: 'asc' },
|
||||
{ label: '倒序 (新→旧)', value: 'desc' },
|
||||
]},
|
||||
{ key: 'comment_per_page', label: '每页评论数', type: 'number', default: 20, min: 5, max: 100 },
|
||||
{ key: 'comment_pagination_type', label: '分页方式', type: 'radio', default: 'numbered', options: [
|
||||
{ label: '翻页', value: 'numbered' },
|
||||
{ label: '加载更多', value: 'load_more' },
|
||||
{ label: '无限滚动', value: 'infinite' },
|
||||
]},
|
||||
{ key: 'comment_paging_ajax_ias_s', label: '评论自动加载', type: 'switch', default: true, help: '评论无限滚动时自动触发加载' },
|
||||
{ key: 'comment_paging_ajax_ias_max', label: '评论最大加载页数', type: 'number', default: 3, min: 0, max: 10, help: '0 = 不限' },
|
||||
{ key: 'comment_nested_depth', label: '回复嵌套深度', type: 'number', default: 3, min: 1, max: 10 },
|
||||
{ key: 'comment_avatar_size', label: '头像大小 (px)', type: 'number', default: 48, min: 24, max: 96 },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'permissions',
|
||||
title: '评论权限',
|
||||
icon: 'fas fa-lock',
|
||||
fields: [
|
||||
{ key: 'comment_require_login', label: '评论需要登录', type: 'switch', default: false },
|
||||
{ key: 'comment_allow_reply', label: '允许回复', type: 'switch', default: true },
|
||||
{ key: 'comment_close_comments', label: '关闭评论', type: 'switch', default: false },
|
||||
{ key: 'comment_edit_window', label: '作者自助编辑时限 (分钟)', type: 'number', default: 10, min: 0, max: 1440 },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'toolbar',
|
||||
title: '评论工具栏',
|
||||
icon: 'fas fa-toolbox',
|
||||
fields: [
|
||||
{ key: 'comment_smilie', label: 'Emoji 表情', type: 'switch', default: true },
|
||||
{ key: 'comment_code', label: '代码插入', type: 'switch', default: true },
|
||||
{ key: 'comment_img', label: '图片按钮', type: 'switch', default: true },
|
||||
{ key: 'comment_upload_img', label: '评论图片上传', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'interaction',
|
||||
title: '互动功能',
|
||||
icon: 'fas fa-heart',
|
||||
fields: [
|
||||
{ key: 'comment_like_s', label: '评论点赞', type: 'switch', default: true },
|
||||
{ key: 'comment_quick_s', label: '快捷回复', type: 'switch', default: true },
|
||||
{ key: 'comment_city_s', label: '评论城市', type: 'switch', default: true },
|
||||
{ key: 'comment_author_tag', label: '作者标签', type: 'switch', default: true },
|
||||
{ key: 'comment_corderby', label: '评论排序切换', type: 'switch', default: true, help: '前台显示最新/最早/最热切换按钮' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'text',
|
||||
title: '文案配置',
|
||||
icon: 'fas fa-font',
|
||||
fields: [
|
||||
{ key: 'comment_empty_text', label: '空评论提示', type: 'input', default: '暂无评论,来做第一个评论的人吧~' },
|
||||
{ key: 'comment_title', label: '评论区标题', type: 'input', default: '评论' },
|
||||
{ key: 'comment_submit_text', label: '提交按钮文案', type: 'input', default: '提交评论' },
|
||||
{ key: 'comment_text', label: '评论框提示', type: 'input', default: '说点什么吧...' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
export const featureSchema = {
|
||||
key: 'post_list.feature',
|
||||
title: '文章功能',
|
||||
icon: 'fas fa-magic',
|
||||
description: '配置文章页的互动功能开关。',
|
||||
defaults: {
|
||||
feature_pdf_export: false,
|
||||
feature_print: true,
|
||||
feature_word_count: true,
|
||||
feature_reading_time: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'tools',
|
||||
title: '工具功能',
|
||||
icon: 'fas fa-tools',
|
||||
fields: [
|
||||
{ key: 'feature_print', label: '打印文章', type: 'switch', default: true },
|
||||
{ key: 'feature_word_count', label: '字数统计', type: 'switch', default: true },
|
||||
{ key: 'feature_reading_time', label: '预计阅读时间', type: 'switch', default: true },
|
||||
{ key: 'feature_pdf_export', label: 'PDF 导出', type: 'switch', default: false, help: '实验性功能' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
export const filterSchema = {
|
||||
key: 'post_list.filter',
|
||||
title: '高级筛选',
|
||||
icon: 'fas fa-filter',
|
||||
description: '为文章列表配置筛选栏、排序方式和分类筛选功能。',
|
||||
defaults: {
|
||||
filter_enabled: false,
|
||||
filter_categories: true,
|
||||
filter_tags: false,
|
||||
filter_sort: true,
|
||||
filter_ajax_enabled: true,
|
||||
filter_cat_show_cat: true,
|
||||
filter_cat_show_tag: false,
|
||||
filter_tag_show_cat: true,
|
||||
filter_tag_show_tag: false,
|
||||
filter_topics_show_cat: true,
|
||||
filter_topics_show_tag: false,
|
||||
custom_filter_show: ['cat', 'tag'],
|
||||
custom_filter: [],
|
||||
cat_custom_filter: [],
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '筛选基础',
|
||||
icon: 'fas fa-filter',
|
||||
fields: [
|
||||
{ key: 'filter_enabled', label: '启用筛选栏', type: 'switch', default: false },
|
||||
{ key: 'custom_filter_show', label: '筛选显示页面', type: 'checkbox', default: ['cat', 'tag'], options: [{ label: '分类页', value: 'cat' }, { label: '标签页', value: 'tag' }, { label: '专题页', value: 'topics' }], help: '选择在哪些页面显示筛选栏', dependsOn: { key: 'filter_enabled', value: true } },
|
||||
{ key: 'filter_categories', label: '分类筛选', type: 'switch', default: true, dependsOn: { key: 'filter_enabled', value: true } },
|
||||
{ key: 'filter_tags', label: '标签筛选', type: 'switch', default: false, dependsOn: { key: 'filter_enabled', value: true } },
|
||||
{ key: 'filter_sort', label: '排序选项', type: 'switch', default: true, dependsOn: { key: 'filter_enabled', value: true } },
|
||||
{ key: 'filter_ajax_enabled', label: 'AJAX 无刷新筛选', type: 'switch', default: true, help: '启用后分类/标签/排序切换将通过 AJAX 加载,无需刷新页面', dependsOn: { key: 'filter_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'ajax',
|
||||
title: 'AJAX 筛选维度',
|
||||
icon: 'fas fa-layer-group',
|
||||
fields: [
|
||||
{ key: 'filter_cat_show_cat', label: '分类页:显示分类筛选', type: 'switch', default: true },
|
||||
{ key: 'filter_cat_show_tag', label: '分类页:显示标签筛选', type: 'switch', default: false },
|
||||
{ key: 'filter_tag_show_cat', label: '标签页:显示分类筛选', type: 'switch', default: true },
|
||||
{ key: 'filter_tag_show_tag', label: '标签页:显示标签筛选', type: 'switch', default: false },
|
||||
{ key: 'filter_topics_show_cat', label: '专题页:显示分类筛选', type: 'switch', default: true },
|
||||
{ key: 'filter_topics_show_tag', label: '专题页:显示标签筛选', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'custom_filter',
|
||||
title: '自定义筛选维度',
|
||||
icon: 'fas fa-sliders-h',
|
||||
fields: [
|
||||
{
|
||||
key: 'custom_filter',
|
||||
label: '筛选维度定义',
|
||||
type: 'repeater',
|
||||
default: [],
|
||||
addText: '添加筛选维度',
|
||||
help: '每项定义一个筛选维度(如"类型""地区""年份"),及其可选值列表',
|
||||
fields: [
|
||||
{ key: 'name', label: '维度名称', type: 'input', default: '', placeholder: '如:类型' },
|
||||
{ key: 'key', label: '维度标识', type: 'input', default: '', placeholder: '如:type(英文下划线)' },
|
||||
{
|
||||
key: 'vals',
|
||||
label: '可选值',
|
||||
type: 'repeater',
|
||||
default: [],
|
||||
addText: '添加可选值',
|
||||
fields: [
|
||||
{ key: 'key', label: '标识', type: 'input', default: '', placeholder: '如:action' },
|
||||
{ key: 'name', label: '显示名', type: 'input', default: '', placeholder: '如:动作' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'cat_custom_filter',
|
||||
title: '按分类绑定筛选',
|
||||
icon: 'fas fa-object-group',
|
||||
fields: [
|
||||
{
|
||||
key: 'cat_custom_filter',
|
||||
label: '分类筛选绑定',
|
||||
type: 'repeater',
|
||||
default: [],
|
||||
addText: '添加绑定规则',
|
||||
help: '为指定分类绑定不同的筛选维度组合,实现分类级别的差异化筛选',
|
||||
fields: [
|
||||
{ key: 'cats', label: '绑定分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [] },
|
||||
{ key: 'cat_s', label: '显示分类筛选', type: 'switch', default: true },
|
||||
{ key: 'tag_s', label: '显示标签筛选', type: 'switch', default: false },
|
||||
{ key: 'topics_s', label: '显示专题筛选', type: 'switch', default: false },
|
||||
{ key: 'orderby_s', label: '显示排序按钮', type: 'switch', default: true },
|
||||
{
|
||||
key: 'custom_filters',
|
||||
label: '启用的自定义维度',
|
||||
type: 'input',
|
||||
default: '',
|
||||
placeholder: '逗号分隔维度标识,如:type,region,year',
|
||||
help: '留空表示使用全部已定义的筛选维度',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Post & List domain schemas.
|
||||
*/
|
||||
|
||||
import { listSchema } from './list.js'
|
||||
import { thumbSchema } from './thumb.js'
|
||||
import { pageSchema } from './page.js'
|
||||
import { filterSchema } from './filter.js'
|
||||
import { featureSchema } from './feature.js'
|
||||
import { paySchema } from './pay.js'
|
||||
import { shareSchema } from './share.js'
|
||||
import { commentSchema } from './comment.js'
|
||||
import { submitSchema } from './submit.js'
|
||||
|
||||
export const postListSchemas = {
|
||||
list: listSchema,
|
||||
thumb: thumbSchema,
|
||||
page: pageSchema,
|
||||
filter: filterSchema,
|
||||
feature: featureSchema,
|
||||
pay: paySchema,
|
||||
share: shareSchema,
|
||||
comment: commentSchema,
|
||||
submit: submitSchema,
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
export const listSchema = {
|
||||
key: 'post_list.list',
|
||||
title: '文章列表',
|
||||
icon: 'fas fa-list',
|
||||
description: '配置文章列表的卡片样式、元信息显示、分页方式和排序规则。',
|
||||
defaults: {
|
||||
post_card_style: 'standard',
|
||||
post_show_author: true,
|
||||
post_show_date: true,
|
||||
post_show_views: true,
|
||||
post_show_category: true,
|
||||
post_excerpt_length: 120,
|
||||
post_pagination_mode: 'numeric',
|
||||
ias_max: 3,
|
||||
ajax_trigger_text: '',
|
||||
ajax_nomore_text: '',
|
||||
sticky_s: ['home', 'cat'],
|
||||
list_badge_show: ['pay', 'tag', 'topics', 'cat'],
|
||||
post_target_blank: false,
|
||||
item_heading_bold: false,
|
||||
list_orderby: 'modified',
|
||||
list_meta_show: 'like',
|
||||
list_show_type: 'separate',
|
||||
thumb_postfirstimg_size: 'medium',
|
||||
post_t_placeholder: '',
|
||||
post_c_placeholder: '',
|
||||
list_list_style: '',
|
||||
list_list_img_position: 'left',
|
||||
list_list_scale: 70,
|
||||
list_card_style: '',
|
||||
list_card_scale: 70,
|
||||
list_card_home: false,
|
||||
list_card_cat: [],
|
||||
list_card_tag: false,
|
||||
list_card_topics: false,
|
||||
list_card_author: false,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'card',
|
||||
title: '卡片样式',
|
||||
icon: 'fas fa-th-large',
|
||||
fields: [
|
||||
{ key: 'post_card_style', label: '卡片样式', type: 'select', default: 'standard', options: [
|
||||
{ label: '标准卡', value: 'standard' },
|
||||
{ label: '紧凑卡', value: 'compact' },
|
||||
{ label: '大图卡', value: 'large_thumb' },
|
||||
{ label: '多图卡', value: 'multi_thumb' },
|
||||
{ label: '纯文字', value: 'text' },
|
||||
{ label: '有图则图文', value: 'thumb_if_has' },
|
||||
]},
|
||||
{ key: 'post_excerpt_length', label: '摘要长度 (字)', type: 'number', default: 120, min: 20, max: 500 },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'meta',
|
||||
title: '元信息显示',
|
||||
icon: 'fas fa-info-circle',
|
||||
fields: [
|
||||
{ key: 'post_show_author', label: '显示作者', type: 'switch', default: true },
|
||||
{ key: 'post_show_date', label: '显示日期', type: 'switch', default: true },
|
||||
{ key: 'post_show_views', label: '显示浏览数', type: 'switch', default: true },
|
||||
{ key: 'post_show_category', label: '显示分类', type: 'switch', default: true },
|
||||
{ key: 'list_badge_show', label: '显示徽章类型', type: 'checkbox', default: ['pay', 'tag', 'topics', 'cat'], options: [
|
||||
{ label: '付费', value: 'pay' },
|
||||
{ label: '分类', value: 'cat' },
|
||||
{ label: '专题', value: 'topics' },
|
||||
{ label: '标签', value: 'tag' },
|
||||
], help: '选择列表中显示哪些徽章类型' },
|
||||
{ key: 'list_meta_show', label: '移动端优先部件', type: 'radio', default: 'like', options: [
|
||||
{ label: '浏览数', value: 'view' },
|
||||
{ label: '点赞数', value: 'like' },
|
||||
{ label: '评论数', value: 'comm' },
|
||||
], help: '移动端空间不足时保留显示的单一部件' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'pagination',
|
||||
title: '分页方式',
|
||||
icon: 'fas fa-ellipsis-h',
|
||||
fields: [
|
||||
{ key: 'post_pagination_mode', label: '分页模式', type: 'radio', default: 'numeric', options: [
|
||||
{ label: '数字分页', value: 'numeric' },
|
||||
{ label: '加载更多', value: 'load_more' },
|
||||
{ label: '无限滚动', value: 'infinite' },
|
||||
]},
|
||||
{ key: 'ias_max', label: '最大加载页数', type: 'number', default: 3, min: 0, max: 10, help: '0 = 不限' },
|
||||
{ key: 'ajax_trigger_text', label: '加载更多文案', type: 'input', default: '', help: '留空使用默认"加载更多"' },
|
||||
{ key: 'ajax_nomore_text', label: '没有更多文案', type: 'input', default: '', help: '留空使用默认"没有更多了"' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'layout',
|
||||
title: '布局设置',
|
||||
icon: 'fas fa-columns',
|
||||
fields: [
|
||||
{ key: 'sticky_s', label: '置顶范围', type: 'checkbox', default: ['home', 'cat'], options: [
|
||||
{ label: '首页', value: 'home' },
|
||||
{ label: '分类页', value: 'cat' },
|
||||
{ label: '标签页', value: 'tag' },
|
||||
{ label: '专题页', value: 'topics' },
|
||||
], help: '选择哪些页面类型显示置顶文章' },
|
||||
{ key: 'post_target_blank', label: '新窗口打开', type: 'switch', default: false, help: '文章链接在新窗口打开' },
|
||||
{ key: 'item_heading_bold', label: '标题加粗', type: 'switch', default: false, help: '列表文章标题使用粗体' },
|
||||
{ key: 'list_show_type', label: '列表样式', type: 'radio', default: 'separate', options: [
|
||||
{ label: '分隔卡片', value: 'separate' },
|
||||
{ label: '无间距', value: 'no_margin' },
|
||||
], help: '列表模式时的卡片间距样式' },
|
||||
{ key: 'list_card_home', label: '首页卡片模式', type: 'switch', default: false, help: '首页列表切换为卡片模式' },
|
||||
{ key: 'list_card_cat', label: '分类卡片模式', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [], help: '选择分类,访问这些分类时使用卡片模式显示(为空则不使用)' },
|
||||
{ key: 'list_card_tag', label: '标签页卡片模式', type: 'switch', default: false, help: '标签页列表切换为卡片模式' },
|
||||
{ key: 'list_card_topics', label: '专题页卡片模式', type: 'switch', default: false, help: '专题页列表切换为卡片模式' },
|
||||
{ key: 'list_card_author', label: '用户页卡片模式', type: 'switch', default: false, help: '用户页列表切换为卡片模式' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'sort',
|
||||
title: '默认排序',
|
||||
icon: 'fas fa-sort',
|
||||
fields: [
|
||||
{ key: 'list_orderby', label: '列表默认排序', type: 'radio', default: 'modified', options: [
|
||||
{ label: '更新时间', value: 'modified' },
|
||||
{ label: '发布时间', value: 'date' },
|
||||
{ label: '评论数', value: 'comments' },
|
||||
{ label: 'WordPress 默认', value: 'default' },
|
||||
], help: '分类/标签/归档页面的默认排序方式' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'list_option',
|
||||
title: '列表模式配置',
|
||||
icon: 'fas fa-list-ul',
|
||||
fields: [
|
||||
{ key: 'list_list_style', label: '列表样式变体', type: 'radio', default: '', options: [
|
||||
{ label: '默认', value: '' },
|
||||
{ label: '样式2', value: 'style2' },
|
||||
], help: '列表模式的样式变体' },
|
||||
{ key: 'list_list_img_position', label: '缩略图位置', type: 'radio', default: 'left', options: [
|
||||
{ label: '左侧', value: 'left' },
|
||||
{ label: '右侧', value: 'right' },
|
||||
], help: '列表模式缩略图靠左或靠右' },
|
||||
{ key: 'list_list_scale', label: '缩略图比例 (%)', type: 'number', default: 70, min: 50, max: 200, help: '列表模式缩略图宽度百分比' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'card_option',
|
||||
title: '卡片模式配置',
|
||||
icon: 'fas fa-th',
|
||||
fields: [
|
||||
{ key: 'list_card_style', label: '卡片样式变体', type: 'radio', default: '', options: [
|
||||
{ label: '默认', value: '' },
|
||||
{ label: '样式3', value: 'style3' },
|
||||
], help: '卡片模式的样式变体' },
|
||||
{ key: 'list_card_scale', label: '缩略图比例 (%)', type: 'number', default: 70, min: 20, max: 200, help: '卡片模式缩略图高度百分比' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
export const pageSchema = {
|
||||
key: 'post_list.page',
|
||||
title: '文章页面',
|
||||
icon: 'fas fa-file-alt',
|
||||
description: '配置单篇文章页面的布局、目录树、图片灯箱、版权区和互动功能。',
|
||||
defaults: {
|
||||
post_toc_enabled: true,
|
||||
post_toc_depth: 3,
|
||||
article_nav_mobile_nav_s: true,
|
||||
post_reading_progress: true,
|
||||
breadcrumbs_single_s: true,
|
||||
breadcrumbs_home_text: '首页',
|
||||
post_prevnext_s: true,
|
||||
post_authordesc_s: true,
|
||||
post_single_hide_time_s: false,
|
||||
post_lightbox: true,
|
||||
post_lightbox_thumbs: true,
|
||||
post_lightbox_zoom: true,
|
||||
post_lightbox_full: true,
|
||||
post_lightbox_down: false,
|
||||
post_lightbox_play: false,
|
||||
post_related_enabled: true,
|
||||
post_related_count: 6,
|
||||
post_related_type: 'category',
|
||||
post_related_orderby: 'rand',
|
||||
post_related_title: '相关推荐',
|
||||
post_copyright_enabled: true,
|
||||
post_copyright_text: '',
|
||||
share_s: true,
|
||||
post_like_enabled: true,
|
||||
post_favorite_enabled: true,
|
||||
post_front_content: '',
|
||||
post_after_content: '',
|
||||
post_yiyan_header: false,
|
||||
post_yiyan_footer: false,
|
||||
post_yiyan_box: false,
|
||||
post_default_views_min: 20,
|
||||
post_default_views_max: 50,
|
||||
post_default_likes_min: 5,
|
||||
post_default_likes_max: 15,
|
||||
post_article_image_cover: true,
|
||||
post_article_image_cover_scale: 35,
|
||||
post_article_slide_cover: true,
|
||||
post_article_video_cover: true,
|
||||
post_article_video_cover_scale: 56,
|
||||
item_heading_bold: false,
|
||||
post_button_toptext: '喜欢就支持一下吧',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'navigation',
|
||||
title: '文章导航',
|
||||
icon: 'fas fa-compass',
|
||||
fields: [
|
||||
{ key: 'post_toc_enabled', label: '目录树导航', type: 'switch', default: true, help: '自动生成文章目录树' },
|
||||
{ key: 'post_toc_depth', label: '目录深度', type: 'number', default: 3, min: 1, max: 6, dependsOn: { key: 'post_toc_enabled', value: true } },
|
||||
{ key: 'article_nav_mobile_nav_s', label: '移动端弹出菜单', type: 'switch', default: true, dependsOn: { key: 'post_toc_enabled', value: true }, help: '在移动端弹出菜单中显示目录导航' },
|
||||
{ key: 'post_reading_progress', label: '阅读进度条', type: 'switch', default: true },
|
||||
{ key: 'breadcrumbs_single_s', label: '面包屑导航', type: 'switch', default: true },
|
||||
{ key: 'breadcrumbs_home_text', label: '面包屑首页文字', type: 'input', default: '首页', dependsOn: { key: 'breadcrumbs_single_s', value: true } },
|
||||
{ key: 'post_prevnext_s', label: '上一篇/下一篇', type: 'switch', default: true },
|
||||
{ key: 'post_authordesc_s', label: '作者简介', type: 'switch', default: true },
|
||||
{ key: 'post_single_hide_time_s', label: '隐藏文章时间', type: 'switch', default: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'cover',
|
||||
title: '封面展示',
|
||||
icon: 'fas fa-image',
|
||||
fields: [
|
||||
{ key: 'post_article_image_cover', label: '图片封面', type: 'switch', default: true, help: '文章有特色图时自动展示封面' },
|
||||
{ key: 'post_article_image_cover_scale', label: '封面高度比例(%)', type: 'number', default: 35, min: 10, max: 100, dependsOn: { key: 'post_article_image_cover', value: true } },
|
||||
{ key: 'post_article_slide_cover', label: '幻灯片封面', type: 'switch', default: true, help: '文章有图集时以轮播形式展示封面' },
|
||||
{ key: 'post_article_video_cover', label: '视频封面', type: 'switch', default: true, help: '文章有视频时以视频播放器作为封面' },
|
||||
{ key: 'post_article_video_cover_scale', label: '视频封面高度比例(%)', type: 'number', default: 56, min: 20, max: 100, dependsOn: { key: 'post_article_video_cover', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'media',
|
||||
title: '媒体功能',
|
||||
icon: 'fas fa-photo-video',
|
||||
fields: [
|
||||
{ key: 'post_lightbox', label: '图片灯箱', type: 'switch', default: true, help: '点击图片放大查看' },
|
||||
{ key: 'post_lightbox_thumbs', label: '灯箱缩略图', type: 'switch', default: true, dependsOn: { key: 'post_lightbox', value: true }, help: '灯箱底部显示缩略图导航' },
|
||||
{ key: 'post_lightbox_zoom', label: '灯箱缩放', type: 'switch', default: true, dependsOn: { key: 'post_lightbox', value: true }, help: '灯箱显示缩放按钮' },
|
||||
{ key: 'post_lightbox_full', label: '灯箱全屏', type: 'switch', default: true, dependsOn: { key: 'post_lightbox', value: true }, help: '灯箱显示全屏按钮' },
|
||||
{ key: 'post_lightbox_down', label: '灯箱下载', type: 'switch', default: false, dependsOn: { key: 'post_lightbox', value: true }, help: '灯箱显示下载按钮' },
|
||||
{ key: 'post_lightbox_play', label: '灯箱播放', type: 'switch', default: false, dependsOn: { key: 'post_lightbox', value: true }, help: '灯箱显示播放按钮(自动轮播)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'related',
|
||||
title: '相关推荐',
|
||||
icon: 'fas fa-random',
|
||||
fields: [
|
||||
{ key: 'post_related_enabled', label: '显示相关推荐', type: 'switch', default: true },
|
||||
{ key: 'post_related_count', label: '推荐数量', type: 'number', default: 6, min: 1, max: 20, dependsOn: { key: 'post_related_enabled', value: true } },
|
||||
{ key: 'post_related_type', label: '推荐方式', type: 'radio', default: 'category', options: [
|
||||
{ label: '同分类', value: 'category' },
|
||||
{ label: '同标签', value: 'tag' },
|
||||
{ label: '随机', value: 'random' },
|
||||
], dependsOn: { key: 'post_related_enabled', value: true } },
|
||||
{ key: 'post_related_orderby', label: '推荐排序', type: 'select', default: 'rand', options: [
|
||||
{ label: '随机', value: 'rand' },
|
||||
{ label: '相关度', value: 'relevance' },
|
||||
{ label: '时间', value: 'date' },
|
||||
], dependsOn: { key: 'post_related_enabled', value: true } },
|
||||
{ key: 'post_related_title', label: '推荐标题', type: 'input', default: '相关推荐', dependsOn: { key: 'post_related_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'interactions',
|
||||
title: '互动功能',
|
||||
icon: 'fas fa-heart',
|
||||
fields: [
|
||||
{ key: 'post_like_enabled', label: '点赞', type: 'switch', default: true },
|
||||
{ key: 'post_favorite_enabled', label: '收藏', type: 'switch', default: true },
|
||||
{ key: 'share_s', label: '分享按钮', type: 'switch', default: true },
|
||||
{ key: 'post_copyright_enabled', label: '版权信息', type: 'switch', default: true },
|
||||
{ key: 'post_copyright_text', label: '版权默认文案', type: 'textarea', default: '', help: '留空则自动生成"本文由 XX 原创发布"' },
|
||||
{ key: 'post_button_toptext', label: '按钮上方文案', type: 'input', default: '喜欢就支持一下吧', help: '显示在点赞/打赏/分享按钮上方' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'content',
|
||||
title: '内容插入',
|
||||
icon: 'fas fa-pen-square',
|
||||
fields: [
|
||||
{ key: 'post_front_content', label: '文章头部内容', type: 'textarea', default: '', help: '显示在所有文章正文前方(支持 HTML)' },
|
||||
{ key: 'post_after_content', label: '文章底部内容', type: 'textarea', default: '', help: '显示在所有文章正文后方(支持 HTML)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'yiyan',
|
||||
title: '一言',
|
||||
icon: 'fas fa-quote-left',
|
||||
fields: [
|
||||
{ key: 'post_yiyan_header', label: '文章头部一言', type: 'switch', default: false, help: '在文章标题下方显示一言' },
|
||||
{ key: 'post_yiyan_footer', label: '文章底部一言', type: 'switch', default: false, help: '在文章内容底部显示一言' },
|
||||
{ key: 'post_yiyan_box', label: '一言盒子', type: 'switch', default: false, help: '在相关文章前显示一言盒子' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'meta',
|
||||
title: '默认数值',
|
||||
icon: 'fas fa-chart-bar',
|
||||
fields: [
|
||||
{ key: 'post_default_views_min', label: '默认浏览最小值', type: 'number', default: 20, min: 0, max: 9999 },
|
||||
{ key: 'post_default_views_max', label: '默认浏览最大值', type: 'number', default: 50, min: 1, max: 9999 },
|
||||
{ key: 'post_default_likes_min', label: '默认点赞最小值', type: 'number', default: 5, min: 0, max: 9999 },
|
||||
{ key: 'post_default_likes_max', label: '默认点赞最大值', type: 'number', default: 15, min: 1, max: 9999 },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
export const paySchema = {
|
||||
key: 'post_list.pay',
|
||||
title: '付费内容',
|
||||
icon: 'fas fa-yen-sign',
|
||||
description: '配置文章付费阅读、下载功能和购买用户显示。',
|
||||
defaults: {
|
||||
post_pay_enable: false,
|
||||
post_pay_price_default: 0,
|
||||
post_pay_free_logged_show: false,
|
||||
post_pay_box_position: 'content',
|
||||
post_pay_mark: '付费',
|
||||
post_pay_show_user: false,
|
||||
post_download_enable: false,
|
||||
post_download_remote_s: false,
|
||||
post_download_verify_nonce: true,
|
||||
post_download_user_log: true,
|
||||
post_download_post_log: true,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '付费设置',
|
||||
icon: 'fas fa-coins',
|
||||
fields: [
|
||||
{ key: 'post_pay_enable', label: '启用付费内容', type: 'switch', default: false },
|
||||
{ key: 'post_pay_price_default', label: '默认价格', type: 'number', default: 0, min: 0, max: 9999, dependsOn: { key: 'post_pay_enable', value: true } },
|
||||
{ key: 'post_pay_free_logged_show', label: '登录用户显示免费', type: 'switch', default: false, dependsOn: { key: 'post_pay_enable', value: true } },
|
||||
{ key: 'post_pay_box_position', label: '付费框位置', type: 'radio', default: 'content', options: [{ label: '内容前', value: 'content' }, { label: '全文遮罩', value: 'mask' }], dependsOn: { key: 'post_pay_enable', value: true } },
|
||||
{ key: 'post_pay_mark', label: '付费标记', type: 'input', default: '付费', dependsOn: { key: 'post_pay_enable', value: true } },
|
||||
{ key: 'post_pay_show_user', label: '显示购买用户', type: 'switch', default: false, dependsOn: { key: 'post_pay_enable', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'download',
|
||||
title: '下载设置',
|
||||
icon: 'fas fa-download',
|
||||
fields: [
|
||||
{ key: 'post_download_enable', label: '启用下载功能', type: 'switch', default: false },
|
||||
{ key: 'post_download_remote_s', label: '远程文件下载', type: 'switch', default: false, dependsOn: { key: 'post_download_enable', value: true } },
|
||||
{ key: 'post_download_verify_nonce', label: '下载鉴权', type: 'switch', default: true, dependsOn: { key: 'post_download_enable', value: true } },
|
||||
{ key: 'post_download_user_log', label: '用户下载日志', type: 'switch', default: true, dependsOn: { key: 'post_download_enable', value: true } },
|
||||
{ key: 'post_download_post_log', label: '文章下载日志', type: 'switch', default: true, dependsOn: { key: 'post_download_enable', value: true } },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
export const shareSchema = {
|
||||
key: 'post_list.share',
|
||||
title: '分享设置',
|
||||
icon: 'fas fa-share-alt',
|
||||
description: '配置微信分享凭据、海报分享和社交分享选项。',
|
||||
defaults: {
|
||||
share_wechat_s: false,
|
||||
share_wechat_appid: '',
|
||||
share_wechat_app_secret: '',
|
||||
share_only_logo: false,
|
||||
share_img_compatible_s: false,
|
||||
share_img_byimg: '',
|
||||
share_logo: '',
|
||||
share_img: '',
|
||||
share_desc: '扫一扫 立即查看',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'wechat',
|
||||
title: '微信分享',
|
||||
icon: 'fab fa-weixin',
|
||||
fields: [
|
||||
{ key: 'share_wechat_s', label: '启用微信分享', type: 'switch', default: false, help: '启用后文章页将支持微信 JSAPI 分享' },
|
||||
{ key: 'share_wechat_appid', label: 'AppID', type: 'input', default: '', dependsOn: { key: 'share_wechat_s', value: true }, help: '微信公众号 AppID' },
|
||||
{ key: 'share_wechat_app_secret', label: 'AppSecret', type: 'input', default: '', dependsOn: { key: 'share_wechat_s', value: true }, help: '微信公众号 AppSecret(请确保 JS 安全域名已配置)' },
|
||||
{ key: 'share_only_logo', label: '仅显示 Logo', type: 'switch', default: false, help: '分享时仅显示站点 Logo' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'poster',
|
||||
title: '海报分享',
|
||||
icon: 'fas fa-image',
|
||||
fields: [
|
||||
{ key: 'share_img_compatible_s', label: '兼容模式', type: 'switch', default: false, help: '启用后使用兼容模式生成分享海报' },
|
||||
{ key: 'share_img_byimg', label: '海报默认图', type: 'media', default: '', help: '海报分享使用的默认背景图' },
|
||||
{ key: 'share_logo', label: '海报 LOGO', type: 'media', default: '', help: '海报上叠加的站点 LOGO' },
|
||||
{ key: 'share_img', label: '分享图片', type: 'media', default: '', help: '社交平台分享预览图' },
|
||||
{ key: 'share_desc', label: '分享描述', type: 'textarea', default: '扫一扫 立即查看', help: '海报或分享卡片的描述文案' },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
export const submitSchema = {
|
||||
key: 'post_list.submit',
|
||||
title: '前台投稿',
|
||||
icon: 'fas fa-paper-plane',
|
||||
description: '配置前台投稿表单字段、审核流程、附件权限和封面策略。',
|
||||
defaults: {
|
||||
front_submit_enabled: true,
|
||||
front_submit_roles: 'author,editor,administrator',
|
||||
front_submit_title: true,
|
||||
front_submit_content: true,
|
||||
front_submit_excerpt: true,
|
||||
front_submit_cover: true,
|
||||
front_submit_category: true,
|
||||
post_article_cat: [],
|
||||
front_submit_tags: true,
|
||||
post_article_topics_s: false,
|
||||
post_article_custom_filter_s: true,
|
||||
front_submit_custom_fields: '',
|
||||
front_submit_review_mode: 'pending',
|
||||
front_submit_cover_required: false,
|
||||
front_submit_max_images: 5,
|
||||
front_submit_editor_mode: 'rich',
|
||||
front_submit_draft_save: true,
|
||||
front_submit_leave_warning: true,
|
||||
post_article_btn_txte: '发布文章',
|
||||
post_article_title_strlen_limit_min: 5,
|
||||
post_article_title_strlen_limit_max: 30,
|
||||
post_article_user: 0,
|
||||
post_article_pay_free_s: true,
|
||||
post_article_pay_price_min: 0,
|
||||
post_article_pay_price_max: 100,
|
||||
post_article_pay_vip_price_s: true,
|
||||
post_article_pay_vip_1_discount: 80,
|
||||
post_article_pay_vip_2_discount: 50,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'basic',
|
||||
title: '基础配置',
|
||||
icon: 'fas fa-cog',
|
||||
fields: [
|
||||
{ key: 'front_submit_enabled', label: '开启前台投稿', type: 'switch', default: true, help: '允许用户在前台提交文章' },
|
||||
{ key: 'front_submit_roles', label: '允许投稿的角色', type: 'input', default: 'author,editor,administrator', dependsOn: { key: 'front_submit_enabled', value: true }, help: '逗号分隔角色标识' },
|
||||
{ key: 'post_article_btn_txte', label: '投稿按钮文案', type: 'input', default: '发布文章', dependsOn: { key: 'front_submit_enabled', value: true }, help: '前台投稿按钮显示的文字' },
|
||||
{ key: 'post_article_title_strlen_limit_min', label: '标题最少字数', type: 'number', default: 5, min: 1, max: 100, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_title_strlen_limit_max', label: '标题最多字数', type: 'number', default: 30, min: 5, max: 200, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_t_placeholder', label: '标题占位符', type: 'input', default: '', placeholder: '请输入标题', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_c_placeholder', label: '内容占位符', type: 'textarea', default: '', placeholder: '请输入内容', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'fields',
|
||||
title: '表单字段',
|
||||
icon: 'fas fa-list-alt',
|
||||
fields: [
|
||||
{ key: 'front_submit_title', label: '标题', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_content', label: '正文', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_excerpt', label: '摘要', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_cover', label: '封面图', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_category', label: '分类选择', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_cat', label: '允许投稿分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [], help: '为空则允许全部分类', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_user', label: '免登录归属用户', type: 'user_select', default: 0, help: '免登录投稿时文章归属的用户,搜索选择', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_tags', label: '标签输入', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_topics_s', label: '专题选择', type: 'switch', default: false, help: '投稿时可选择专题分类', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_custom_filter_s', label: '高级筛选选择', type: 'switch', default: true, help: '投稿时可选择自定义筛选维度值', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_custom_fields', label: '自定义字段', type: 'textarea', default: '', placeholder: '每行一个:field_key|字段名称|类型(input/textarea/select)', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'review',
|
||||
title: '审核策略',
|
||||
icon: 'fas fa-tasks',
|
||||
fields: [
|
||||
{
|
||||
key: 'front_submit_review_mode',
|
||||
label: '审核模式',
|
||||
type: 'radio',
|
||||
default: 'pending',
|
||||
options: [
|
||||
{ label: '待审核', value: 'pending' },
|
||||
{ label: '直接发布', value: 'publish' },
|
||||
{ label: '自动草稿', value: 'draft' },
|
||||
],
|
||||
dependsOn: { key: 'front_submit_enabled', value: true },
|
||||
},
|
||||
{ key: 'front_submit_cover_required', label: '封面图必填', type: 'switch', default: false, dependsOn: { key: 'front_submit_cover', value: true } },
|
||||
{ key: 'front_submit_max_images', label: '正文最大图片数', type: 'number', default: 5, min: 0, max: 50, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'editor',
|
||||
title: '编辑器设置',
|
||||
icon: 'fas fa-edit',
|
||||
fields: [
|
||||
{
|
||||
key: 'front_submit_editor_mode',
|
||||
label: '编辑器模式',
|
||||
type: 'radio',
|
||||
default: 'rich',
|
||||
options: [
|
||||
{ label: '富文本', value: 'rich' },
|
||||
{ label: 'Markdown', value: 'markdown' },
|
||||
{ label: '纯文本', value: 'plain' },
|
||||
],
|
||||
dependsOn: { key: 'front_submit_content', value: true },
|
||||
},
|
||||
{ key: 'front_submit_draft_save', label: '自动保存草稿', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'front_submit_leave_warning', label: '离开页面提醒', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'paid',
|
||||
title: '付费投稿权限',
|
||||
icon: 'fas fa-coins',
|
||||
fields: [
|
||||
{ key: 'post_article_pay_free_s', label: '允许设置免费', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_pay_price_min', label: '最低价格', type: 'number', default: 0, min: 0, max: 9999, help: '投稿可设置的最低付费金额', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_pay_price_max', label: '最高价格', type: 'number', default: 100, min: 0, max: 9999, help: '投稿可设置的最高付费金额', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_pay_vip_price_s', label: '允许设置会员价', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_pay_vip_1_discount', label: 'VIP1 折扣(%)', type: 'number', default: 80, min: 0, max: 100, help: 'VIP1 会员折扣百分比,80 即 8 折', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
{ key: 'post_article_pay_vip_2_discount', label: 'VIP2 折扣(%)', type: 'number', default: 50, min: 0, max: 100, help: 'VIP2 会员折扣百分比,50 即 5 折', dependsOn: { key: 'front_submit_enabled', value: true } },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
export const thumbSchema = {
|
||||
key: 'post_list.thumb',
|
||||
title: '列表缩略图',
|
||||
icon: 'fas fa-images',
|
||||
description: '配置缩略图来源优先级、尺寸、占位图和多图模式。',
|
||||
defaults: {
|
||||
thumb_priority: 'featured,attachment,resource,custom',
|
||||
thumb_fallback: 'placeholder',
|
||||
thumb_spare_images: [],
|
||||
thumb_lazy: true,
|
||||
thumb_aspect_ratio: '16:9',
|
||||
list_thumb_fit: 'cover',
|
||||
thumb_multi_enabled: false,
|
||||
thumb_multi_count: 3,
|
||||
list_thumb_slides_s: true,
|
||||
list_thumb_video_s: true,
|
||||
list_thumb_video_mute_s: true,
|
||||
thumb_postfirstimg_s: true,
|
||||
thumb_catimg_s: true,
|
||||
mult_thumb_cat: [],
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'source',
|
||||
title: '图片来源',
|
||||
icon: 'fas fa-image',
|
||||
fields: [
|
||||
{ key: 'thumb_priority', label: '图片优先级', type: 'input', default: 'featured,attachment,resource,custom', help: '逗号分隔: featured(特色图), attachment(附件), resource(资源封面), custom(自定义), post_first_img(文章首图), category_cover(分类封面)' },
|
||||
{ key: 'thumb_fallback', label: '无图时处理', type: 'radio', default: 'placeholder', options: [
|
||||
{ label: '显示占位图', value: 'placeholder' },
|
||||
{ label: '隐藏缩略图', value: 'hide' },
|
||||
{ label: '随机封面', value: 'random' },
|
||||
]},
|
||||
{ key: 'thumb_spare_images', label: '备用缩略图', type: 'gallery', default: [], help: '当无图处理选择"随机封面"时从此图库随机选取', dependsOn: { key: 'thumb_fallback', value: 'random' } },
|
||||
{ key: 'thumb_aspect_ratio', label: '图片比例', type: 'select', default: '16:9', options: [
|
||||
{ label: '16:9 宽屏', value: '16:9' },
|
||||
{ label: '4:3 标准', value: '4:3' },
|
||||
{ label: '1:1 正方形', value: '1:1' },
|
||||
{ label: '自适应', value: 'auto' },
|
||||
]},
|
||||
{ key: 'list_thumb_fit', label: '缩略图填充方式', type: 'radio', default: 'cover', options: [
|
||||
{ label: '填充裁剪', value: 'cover' },
|
||||
{ label: '完整显示', value: 'contain' },
|
||||
]},
|
||||
{ key: 'list_thumb_slides_s', label: '幻灯片缩略图', type: 'switch', default: true, help: '允许幻灯片作为列表缩略图' },
|
||||
{ key: 'list_thumb_video_s', label: '视频缩略图', type: 'switch', default: true, help: '鼠标悬停时自动播放视频缩略图' },
|
||||
{ key: 'list_thumb_video_mute_s', label: '视频缩略图静音', type: 'switch', default: true, dependsOn: { key: 'list_thumb_video_s', value: true }, help: '视频缩略图播放时静音' },
|
||||
{ key: 'thumb_postfirstimg_s', label: '自动获取文章首图', type: 'switch', default: true, help: '自动从文章内容中提取第一张图片作为缩略图' },
|
||||
{ key: 'thumb_postfirstimg_size', label: '首图尺寸', type: 'select', default: 'medium', options: [
|
||||
{ label: '缩略图', value: 'thumbnail' },
|
||||
{ label: '中等', value: 'medium' },
|
||||
{ label: '大', value: 'large' },
|
||||
{ label: '原始', value: 'full' },
|
||||
], dependsOn: { key: 'thumb_postfirstimg_s', value: true }, help: '自动获取文章首图时使用的 WP 图片尺寸' },
|
||||
{ key: 'thumb_catimg_s', label: '自动获取分类封面', type: 'switch', default: true, help: '无特色图时使用分类封面图作为缩略图' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'multi',
|
||||
title: '多图模式',
|
||||
icon: 'fas fa-images',
|
||||
fields: [
|
||||
{ key: 'thumb_multi_enabled', label: '多图卡片', type: 'switch', default: false, help: '当文章有多张图片时,在列表中展示多图预览' },
|
||||
{ key: 'thumb_multi_count', label: '最多显示几张', type: 'number', default: 3, min: 2, max: 6, dependsOn: { key: 'thumb_multi_enabled', value: true } },
|
||||
{ key: 'mult_thumb_cat', label: '按分类多图显示', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [], help: '选择的分类下所有文章自动显示多张缩略图' },
|
||||
{ key: 'thumb_lazy', label: '懒加载', type: 'switch', default: true },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user