From e6e7259e8a6803b19e403d485144c7a337db4c52 Mon Sep 17 00:00:00 2001 From: julylies Date: Thu, 14 Apr 2022 21:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A62%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.ftl | 68 +++++++++++++++++++++++++++++++++- footer.ftl | 59 ++++++++++++++++++++++++++++- header.ftl | 45 +++++++++++++++------- index.ftl | 23 ++++++++---- settings.yaml | 86 ++++++++++++++++++++++++++++++++++++++++--- source/css/single.css | 7 +++- source/js/single.js | 1 + theme.yaml | 6 +-- 8 files changed, 261 insertions(+), 34 deletions(-) diff --git a/404.ftl b/404.ftl index 8d1c8b6..4e3345c 100644 --- a/404.ftl +++ b/404.ftl @@ -1 +1,67 @@ - + + + + + + + + + <#-- 导航面包蟹 未完成--> + + + + + <@global.head /> + <#if ! (options.blog_favicon?? && options.blog_favicon!='')> + + + <#-- 背景图片--> + <#if settings.rimage_url?? && settings.rimage_url!=''> + + + <#-- 自定css 未完成--> + + +
+
+

${blog_title!}

+
+
+
+
+
+
+ + +
+
+
+
+

404

+

找不到页面啦

+ +
+
+
+<#include "footer.ftl"> + diff --git a/footer.ftl b/footer.ftl index 8d1c8b6..a0f773b 100644 --- a/footer.ftl +++ b/footer.ftl @@ -1 +1,58 @@ - + +<@global.footer /> + + + + + + diff --git a/header.ftl b/header.ftl index c65f06a..2b77801 100644 --- a/header.ftl +++ b/header.ftl @@ -3,17 +3,29 @@ + ${title} - ${title} + + + <#-- 导航面包蟹 未完成--> + + - - - ${blog_logo!} + <@global.head /> + <#if ! (options.blog_favicon?? && options.blog_favicon!='')> + + + <#-- 背景图片--> + <#if settings.rimage_url?? && settings.rimage_url!=''> + + + <#-- 自定css 未完成--> - + <#-- 夜间模式 未完成--> +

${blog_title!}

@@ -24,22 +36,27 @@
+ + -<#nested >
- - - -<@global.footer /> - - diff --git a/index.ftl b/index.ftl index f7b1865..dfd5a22 100644 --- a/index.ftl +++ b/index.ftl @@ -7,12 +7,16 @@

${blog_title!}

${user.description!} - <#--快捷--> -
+ <#-- 待优化--> +
+ <#if settings.home_social?? && settings.home_social != ''> + ${settings.home_social!} + +
-
- <#list posts.content as post> + <#list posts.content as post> +

${post.title!}

@@ -23,7 +27,9 @@ <#list post.categories as category> - ${category.name!} + + ${category.name!} + @@ -38,8 +44,8 @@ ${post.visits!}
- -
+ +
- \ No newline at end of file + +<#include "footer.ftl"> \ No newline at end of file diff --git a/settings.yaml b/settings.yaml index ce5f82c..44a8f0c 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1,9 +1,83 @@ -# 配置详情请参考:https://docs.halo.run/zh/developer-guide/theme/config-files -genernal: +general: label: 基本设置 items: - index_notice: - name: index_notice - label: 首页公告 + favicon: + name: favicon + label: 站点图标 + type: attachment + default: 'https://api.lixingyong.com/api/images' + description: '在这里填入一张 png 图片地址(192x192px),不填则使用默认图标' + background: + name: background + label: 站点背景 + type: attachment + default: '' + description: '在这里填入一张图片地址,不填则显示纯色背景' + home_social: + name: home_social + label: 自定义社交链接 type: textarea - default: '欢迎来到我的博客' \ No newline at end of file + placeholder: '' + default: '' + description: '在这里填入你的自定义社交链接,不填则不输出。(格式请看帮助信息)' + custom_css: + name: custom_css + label: 自定义样式表 + type: textarea + placeholder: '' + default: '' + description: '在这里填入你的自定义样式表,不填则不输出。' + custom_script: + name: custom_script + label: 统计代码 + type: textarea + placeholder: '' + default: '' + description: 在这里填入你的统计代码,不填则不输出。需要 <script>标签 ' + author_text: + name: author_text + label: 自定义作者信息 + type: textarea + placeholder: '' + default: '' + description: '显示在文章底部的作者信息,不填则不输出。' + night_mode: + name: night_mode + label: 夜间模式 + type: radio + data-type: string + default: '1' + options: + - value: '0' + label: 关闭 + - value: '1' + label: 开启 + - value: '2' + label: 始终 + description: '在 22:00 - 5:00 期间自动开启夜间模式,始终则为始终开启夜间模式' + copy_notice: + name: copy_notice + label: 复制提示 + type: radio + data-type: bool + default: true + options: + - value: true + label: 开启 + - value: false + label: 关闭 + description: '开启则会在访客复制内容时弹窗' + widget_set: + name: widget_set + label: 信息栏 + type: radio + data-type: bool + default: true + options: + - value: true + label: 开启 + - value: false + label: 关闭 + description: '是否显示信息栏在页尾显示 “最新文章”、“最近评论” 和 “时光机”' +# 首页、存档页属性显示 +# 文章页属性显示 \ No newline at end of file diff --git a/source/css/single.css b/source/css/single.css index 6a68a77..66379a1 100644 --- a/source/css/single.css +++ b/source/css/single.css @@ -417,6 +417,11 @@ main img { .post-item{ margin-bottom: 3em; word-break: break-all; + width:100%; + height:100%; + border-radius:20px; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1); + padding:10px } .post-item:last-child{ margin-bottom: 0 } @@ -849,7 +854,7 @@ footer .widget{ padding: 2em 0 } footer .title-comments:after, footer .title-recent:after, footer .title-date:after{ - float: right; + float:left; margin-right: .75em; font-family: "FontAwesome"; } diff --git a/source/js/single.js b/source/js/single.js index 0b8218e..0703c4f 100644 --- a/source/js/single.js +++ b/source/js/single.js @@ -158,6 +158,7 @@ var Paul_Single = function (config) { document.oncopy = function () { ks.notice("复制内容请注明来源并保留版权信息!", {color: "yellow", overlay: true}) }; + } }; diff --git a/theme.yaml b/theme.yaml index ee3a924..a7c9d64 100644 --- a/theme.yaml +++ b/theme.yaml @@ -3,9 +3,9 @@ name: Single author: name: julylies website: https://blog.huangdf.xyz -description: 一个简洁大气,含夜间模式的Halo博客模板。 +description: 一个简洁大气,含夜间模式的Halo博客主题。 logo: https://avatars.githubusercontent.com/u/48195280?s=200&v=4 -website: -repo: +website: https://git.huangdf.xyz/july/halo-theme-Single +repo: https://git.huangdf.xyz/july/halo-theme-Single version: 1.0.0 require: 1.4.2