From f99f010297b93268bdd135364cedb115bf285899 Mon Sep 17 00:00:00 2001 From: nineya <361654768@qq.com> Date: Wed, 22 Mar 2023 10:08:39 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 2 +- package.json | 1 + settings.yaml | 50 +++++-------- templates/common/{banner.ftl => banner.html} | 9 ++- templates/common/head.ftl | 75 ------------------- templates/common/head.html | 77 ++++++++++++++++++++ templates/common/layout.html | 41 +++++++++++ templates/common/scripts.ftl | 59 --------------- templates/common/scripts.html | 59 +++++++++++++++ templates/index.ftl | 15 ---- templates/index.html | 20 +++++ templates/layout.ftl | 24 ------ templates/layout_default.ftl | 32 -------- templates/layout_pjax.ftl | 14 ---- templates/main/pagination.ftl | 5 ++ 15 files changed, 230 insertions(+), 253 deletions(-) rename templates/common/{banner.ftl => banner.html} (67%) delete mode 100644 templates/common/head.ftl create mode 100644 templates/common/head.html create mode 100644 templates/common/layout.html delete mode 100644 templates/common/scripts.ftl create mode 100644 templates/common/scripts.html delete mode 100644 templates/index.ftl create mode 100644 templates/index.html delete mode 100644 templates/layout.ftl delete mode 100644 templates/layout_default.ftl delete mode 100644 templates/layout_pjax.ftl 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 @@ -