40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
export const customCodeSchema = {
|
|
key: 'global.custom-code',
|
|
title: '自定义代码',
|
|
icon: 'fa fas fa-code',
|
|
description: '自定义 CSS、JS 代码注入。',
|
|
defaults: {
|
|
custom_css: '',
|
|
head_code: '',
|
|
foot_code: '',
|
|
trackcode: '',
|
|
},
|
|
groups: [
|
|
{
|
|
key: 'css',
|
|
title: '自定义 CSS',
|
|
icon: 'fa fab fa-css3',
|
|
fields: [
|
|
{ key: 'custom_css', label: '自定义 CSS', type: 'code', language: 'css', placeholder: '/* 在此输入自定义 CSS */', rows: 10, help: '将在页面 <head> 中加载' },
|
|
],
|
|
},
|
|
{
|
|
key: 'code',
|
|
title: '头部 & 底部代码',
|
|
icon: 'fa fas fa-code',
|
|
fields: [
|
|
{ key: 'head_code', label: '头部 HTML 代码', type: 'code', placeholder: '<!-- 支持 meta/link/style/script 等任意 HTML -->', rows: 6, help: '在 <head> 中输出,支持 meta/link/style/script 等任意 HTML' },
|
|
{ key: 'foot_code', label: '底部 HTML 代码', type: 'code', placeholder: '<!-- 在 </body> 前输出 -->', rows: 6, help: '在页面底部 </body> 前输出,支持任意 HTML' },
|
|
],
|
|
},
|
|
{
|
|
key: 'stats',
|
|
title: '统计代码',
|
|
icon: 'fa fas fa-chart-bar',
|
|
fields: [
|
|
{ key: 'trackcode', label: '统计代码', type: 'code', placeholder: '<!-- 百度统计 / GA / CNZZ / 51la -->', rows: 6, help: '百度统计、Google Analytics、CNZZ、51la 等统计代码,自动在 head 中输出' },
|
|
],
|
|
},
|
|
],
|
|
}
|