master
julylies 2 years ago
parent 63e0f77652
commit e6e7259e8a

@ -1 +1,67 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="${meta_keywords!}"/>
<meta name="description" content="${meta_description!}" />
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1"/>
<meta property="og:site_name" content="${blog_title!}">
<#-- 导航面包蟹 未完成-->
<link rel="alternate" type="application/rss+xml" title="atom 1.0" href="${atom_url!}">
<link href="${theme_base!}/source/css/kico.css" rel="stylesheet" type="text/css"/>
<link href="${theme_base!}/source/css/single.css" rel="stylesheet" type="text/css"/>
<link href="https://fastly.jsdelivr.net/gh/FortAwesome/Font-Awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<@global.head />
<#if ! (options.blog_favicon?? && options.blog_favicon!='')>
<link rel="shortcut icon" type="images/x-icon" href="${theme_base!}/source/images/icon.png" sizes="192x192"/>
</#if>
<#-- 背景图片-->
<#if settings.rimage_url?? && settings.rimage_url!=''>
<style>body:before{content: ''; background-image: url(${settings.rimage_url!})}</style>
</#if>
<#-- 自定css 未完成-->
</head>
<body >
<header>
<div class="head-title">
<h4>${blog_title!}</h4>
</div>
<div class="head-action">
<div class="toggle-btn"></div>
<div class="light-btn"></div>
<div class="search-btn"></div>
</div>
<form class="head-search" method="post">
<input type="text" name="s"lde placehor="搜索什么?">
</form>
<nav class="head-menu">
<#-- 菜单未优化-->
<@menuTag method="list">
<#list menus?sort_by('priority') as menu>
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
</#list>
</@menuTag>
<#-- <@menuTag method="tree">
<ul>
<#list menus as menu>
<a href="${menu.url!}" target="${menu.target!}">${menu.name!}
<#if menu.children?? && menu.children?size gt 0>
<#list menu.children as child>
<a href="${child.url!}" target="${menu.target!}">${child.name!}</a>
</#list>
</#if>
</#list>
</@menuTag>-->
</nav>
</header>
<main>
<div class="wrap">
<div class="error-page">
<h1>404</h1>
<p>找不到页面啦</p>
<img src="${theme_base!}/source/images/404.png"/>
</div>
</div>
</main>
<#include "footer.ftl">
</html>

@ -1 +1,58 @@
<footer>
<div class="buttons">
<a class="to-top" href="#"></a>
</div>
<div class="wrap min">
<#if settings.widget_set!true>
<section class="widget">
<div class="row">
<div class="col-m-4">
<h3 class="title-recent">最新文章:</h3>
<ul>
<@postTag method="latest" top="6">
<#list posts as post>
<li>
<a href="${post.fullPath!}" target="_blank">${post.title!}</a>
</li>
</#list>
</@postTag>
</ul>
</div>
<div class="col-m-4">
<#--存在问题 -->
<h3 class="title-date">时光机:</h3>
<ul>
<@postTag method="archiveMonth">
<#list archives as archive>
<li>
<a href="${archive.fullPath!}" rel="nofollow" target="_blank">${archive.year?c} 年${archive.month?c} 月</a>
</li>
</#list>
</@postTag>
</ul>
</div>
<div class="col-m-4">
<#--存在问题 -->
<h3 class="title-comments">最近评论:</h3>
<ul>
<@commentTag method="latest" top="6">
<#list comments.content as comment>
<li>${comment.author!}<a href="${comment.fullPath!}" rel="nofollow" target="_blank">${comment.content!}</a></li>
</#list>
</@commentTag>
</ul>
</div>
</div>
</#if>
<section class="sub-footer">
<p>© ${.now?string("yyyy")} <a href="${blog_url!}">${(user.nickname)!}</a>. All Rights Reserved. Theme By <a href="https://github.com/Dreamer-Paul/Single" target="_blank" rel="nofollow">Single</a>.</p>
</section>
</div>
</footer>
<@global.footer />
<script type='text/javascript' src="${theme_base!}/source/js/kico.js"></script>
<script type='text/javascript' src="${theme_base!}/source/js/single.js"></script>
<script type='text/javascript' src="${theme_base!}/source/js/prism.js"></script>
<script>var single = new Paul_Single({copyright: <#if settings.copy_notice!true>true<#else>false</#if>, night: <#if settings.night_mode=='1'>true<#else>false</#if>});</script>
</body>
</html>

@ -3,17 +3,29 @@
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>${title}</title>
<meta name="keywords" content="${meta_keywords!}"/>
<meta name="description" content="${meta_description!}" />
<title>${title}</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1"/>
<meta property="og:site_name" content="${blog_title!}">
<#-- 导航面包蟹 未完成-->
<meta property="og:title" content="${title}">
<link rel="alternate" type="application/rss+xml" title="atom 1.0" href="${atom_url!}">
<link href="${theme_base!}/source/css/kico.css" rel="stylesheet" type="text/css"/>
<link href="${theme_base!}/source/css/single.css" rel="stylesheet" type="text/css"/>
<link href="https://fastly.jsdelivr.net/gh/FortAwesome/Font-Awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1"/>
<link rel="shortcut icon" type="images/x-icon" href="${theme_base!}/source/images/icon.png" sizes="192x192"/>
${blog_logo!}
<@global.head />
<#if ! (options.blog_favicon?? && options.blog_favicon!='')>
<link rel="shortcut icon" type="images/x-icon" href="${theme_base!}/source/images/icon.png" sizes="192x192"/>
</#if>
<#-- 背景图片-->
<#if settings.rimage_url?? && settings.rimage_url!=''>
<style>body:before{content: ''; background-image: url(${settings.rimage_url!})}</style>
</#if>
<#-- 自定css 未完成-->
</head>
<body>
<#-- 夜间模式 未完成-->
<body >
<header>
<div class="head-title">
<h4>${blog_title!}</h4>
@ -24,22 +36,27 @@
<div class="search-btn"></div>
</div>
<form class="head-search" method="post">
<input type="text" name="s" placeholder="搜索什么?">
</form>
<input type="text" name="s"lde placehor="搜索什么?">
</form>
<nav class="head-menu">
<#-- 菜单未优化-->
<@menuTag method="list">
<#list menus?sort_by('priority') as menu>
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
</#list>
</@menuTag>
<#-- <@menuTag method="tree">
<ul>
<#list menus as menu>
<a href="${menu.url!}" target="${menu.target!}">${menu.name!}
<#if menu.children?? && menu.children?size gt 0>
<#list menu.children as child>
<a href="${child.url!}" target="${menu.target!}">${child.name!}</a>
</#list>
</#if>
</#list>
</@menuTag>-->
</nav>
<#nested >
</header>
<script src="${theme_base!}/source/js/kico.js"></script>
<script src="${theme_base!}/source/js/single.js"></script>
<script src="${theme_base!}/source/js/prism.js"></script>
<@global.footer />
</body>
</html>
</#macro>

@ -7,12 +7,16 @@
<section class="home-title">
<h1>${blog_title!}</h1>
<span>${user.description!}</span>
<#--快捷-->
<div class="home-social"> </div>
<#-- 待优化-->
<div class="home-social">
<#if settings.home_social?? && settings.home_social != ''>
${settings.home_social!}
</#if>
</div>
</section>
<section class="home-posts">
<div class="post-item">
<#list posts.content as post>
<#list posts.content as post>
<div class="post-item">
<h2>
<a href="${post.fullPath!}">${post.title!}</a>
</h2>
@ -23,7 +27,9 @@
</time>
<span class="category">
<#list post.categories as category>
${category.name!}
<a href="${category.fullPath!}" >
${category.name!}
</a>
</#list>
</span>
<span class="tags">
@ -38,8 +44,8 @@
${post.visits!}
</span>
</div>
</#list>
</div>
</div>
</#list>
</section>
<section class="page-navigator">
<@paginationTag method="archives" page="${posts.number}" total="${posts.totalPages}" display="3">
@ -59,4 +65,5 @@
</@paginationTag>
</section>
</div>
</main>
</main>
<#include "footer.ftl">

@ -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 图片地址(<a>192x192px</a>),不填则使用默认图标'
background:
name: background
label: 站点背景
type: attachment
default: ''
description: '在这里填入一张图片地址,不填则显示纯色背景'
home_social:
name: home_social
label: 自定义社交链接
type: textarea
default: '欢迎来到我的博客'
placeholder: ''
default: ''
description: '在这里填入你的自定义社交链接,不填则不输出。(格式请看<a href="https://github.com/Dreamer-Paul/Single/releases/tag/1.1" target="_blank">帮助信息</a>'
custom_css:
name: custom_css
label: 自定义样式表
type: textarea
placeholder: ''
default: ''
description: '在这里填入你的自定义样式表,不填则不输出。'
custom_script:
name: custom_script
label: 统计代码
type: textarea
placeholder: ''
default: ''
description: 在这里填入你的统计代码,不填则不输出。需要 <a>&lt;script&gt;</a>标签 '
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: '是否显示信息栏在页尾显示 “最新文章”、“最近评论” 和 “时光机”'
# 首页、存档页属性显示
# 文章页属性显示

@ -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";
}

@ -158,6 +158,7 @@ var Paul_Single = function (config) {
document.oncopy = function () {
ks.notice("复制内容请注明来源并保留版权信息!", {color: "yellow", overlay: true})
};
}
};

@ -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

Loading…
Cancel
Save