diff --git a/gulpfile.js b/gulpfile.js index 26456b5..350fb41 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -40,7 +40,7 @@ task('version', (done) => { return } const themePath = 'theme.yaml' - const layoutPath = 'template/layout.ftl' + const layoutPath = 'template/layout.html' const packagePath = 'package.json' const themeData = fs.readFileSync(themePath, 'utf8') .replace(/^version:\s+[^\s]+$/m, 'version: ' + version) diff --git a/package.json b/package.json index 6156009..7459750 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "release": "eslint **/*.js && gulp release", "push": "eslint **/*.js && gulp push", + "zip": "eslint **/*.js && gulp zip", "build": "eslint **/*.js && gulp", "lint": "eslint **/*.js" }, diff --git a/settings.yaml b/settings.yaml index 76eab07..8c1ffa5 100644 --- a/settings.yaml +++ b/settings.yaml @@ -10,16 +10,7 @@ spec: - $formkit: text name: small_title label: 网站副标题 - type: text placeholder: '请输入网站副标题' -# items: -# access_key: -# name: access_key -# label: '<必填> AccessKey' -# type: text -# default: dream -# placeholder: '请输入 Access Key' -# description: "需在博客 高级设置 中开启 API 服务,并使此处的 Access KeyAPI 设置中的保持一致。
注:Access Key 用于主题中 Content API 校验,填写有误将导致接口报错。" # document_hidden_title: # name: document_hidden_title # label: 离屏文案(离开) @@ -82,6 +73,9 @@ spec: # label: '云服务提供商 URL' # type: text # placeholder: '请输入链接地址' + - group: basic_style + label: '基础样式' + formSchema: #basic_style: # label: 基础样式 # items: @@ -141,27 +135,23 @@ spec: # label: 黑暗模式移动端背景图 # type: attachment # placeholder: '请输入/选择图片路径' -# enable_banner: -# name: enable_banner -# label: 开启博客横幅大图 -# type: switch -# data-type: bool -# default: false -# options: -# - value: true -# label: 开启 -# - value: false -# label: 关闭 -# banner_image: -# name: banner_image -# label: 横幅背景图 -# type: attachment -# placeholder: '请输入/选择图片路径' -# banner_description: -# name: banner_description -# label: 横幅文字描述 -# type: text -# placeholder: '请输入描述内容' + - $formkit: radio + name: enable_banner + label: 开启博客横幅大图 + value: false + options: + - label: 开启 + value: true + - label: 关闭 + value: false + - $formkit: attachment + name: banner_image + label: 横幅背景图 + placeholder: '请输入/选择图片路径' + - $formkit: text + name: banner_description + label: 横幅文字描述 + placeholder: '请输入描述内容' # theme_style: # name: theme_style # label: 主题风格 diff --git a/templates/common/banner.ftl b/templates/common/banner.html similarity index 67% rename from templates/common/banner.ftl rename to templates/common/banner.html index 793bc97..70604cf 100644 --- a/templates/common/banner.ftl +++ b/templates/common/banner.html @@ -1,7 +1,10 @@ -