${post.title}
diff --git a/module/widget/sponsor.ftl b/module/widget/sponsor.ftl
index b7a5cff..a719f66 100644
--- a/module/widget/sponsor.ftl
+++ b/module/widget/sponsor.ftl
@@ -2,14 +2,14 @@
<#if settings.QR_code_zfb??>
-
-
+
#if>
<#if settings.QR_code_wx??>
-
-
+
#if>
<#if settings.QR_code_zfb??>
diff --git a/post.ftl b/post.ftl
index fffdeb1..f1cb06e 100644
--- a/post.ftl
+++ b/post.ftl
@@ -36,21 +36,44 @@
id="lightGallery">
${post.content!}
-
- <#if post.tags?? && post.tags?size gt 0>
- <#list post.tags as tag>
-
-
-
+
+
+ <#if post.tags?? && post.tags?size gt 0>
+ <#list post.tags as tag>
+
+
+
${tag.name}
+
+ #list>
+ #if>
+
+ <#if settings.allow_share!true>
+
#if>
-
+
<#if settings.post_toc!true>
diff --git a/screenshot.png b/screenshot.png
index 250f99c..a50afd2 100644
Binary files a/screenshot.png and b/screenshot.png differ
diff --git a/settings.yaml b/settings.yaml
index 4bf20a2..bcbf865 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -3,6 +3,56 @@
genernal:
label: 通用设置
items:
+ show_logo:
+ name: show_logo
+ label: LOGO展示
+ type: radio
+ data-type: bool
+ default: false
+ options:
+ - value: true
+ label: 是
+ - value: false
+ label: 否
+ pjax_enabled:
+ name: pjax_enabled
+ label: 全局 Pjax
+ type: radio
+ data-type: bool
+ default: false
+ options:
+ - value: true
+ label: 开启
+ - value: false
+ label: 关闭
+ Icp:
+ name: Icp
+ label: "ICP 备案号"
+ type: text
+ placeholder: "填入 ICP 备案号,没有则不填. "
+ PoliceSecurityRecordCode:
+ name: PoliceSecurityRecordCode
+ label: "网安备案号编码"
+ type: text
+ placeholder: "网安备案号编码,用于链接跳转"
+ PublicSecurityRecord:
+ name: PublicSecurityRecord
+ label: "网安备案号"
+ type: text
+ placeholder: "填入网安备案号文字"
+ card_random_cover_list:
+ name: card_random_cover_list
+ label: 随机封面图片列表,分号分割
+ type: textarea
+ description: "英文分号(;)分割。注意,这里面填写了图片路径则默认开启了随机图片"
+home_setting:
+ label: 首页设置
+ items:
+ home_cover:
+ name: home_cover
+ label: 首页背景
+ type: attachment
+ default: https://cdn.jsdelivr.net/gh/xzzai/static@master/uPic/default-bg.jpg
home_title:
name: home_title
label: 首页展示博客名
@@ -14,17 +64,17 @@ genernal:
label: 网站slogan
type: text
placeholder: "用于首页描述"
- show_logo:
- name: show_logo
- label: 是否展示Logo
+ enabled_index_cover_height:
+ name: enabled_index_cover_height
+ label: 首页全屏图片
type: radio
data-type: bool
- default: false
+ default: true
options:
- value: true
- label: 是
+ label: 开启
- value: false
- label: 否
+ label: 关闭
posts_style:
name: posts_style
label: 首页文章列表展示风格
@@ -46,7 +96,7 @@ genernal:
- value: true
label: 展示
- value: false
- label: 隐藏
+ label: 隐藏
post_card_tag:
name: post_card_tag
label: 卡片是否展示标签
@@ -69,54 +119,8 @@ genernal:
label: 是
- value: false
label: 否
- home_cover:
- name: home_cover
- label: 首页背景
- type: attachment
- default: https://cdn.jsdelivr.net/gh/xzzai/static@master/uPic/default-bg.jpg
- enabled_index_cover_height:
- name: enabled_index_cover_height
- label: 首页全屏图片
- type: radio
- data-type: bool
- default: true
- options:
- - value: true
- label: 开启
- - value: false
- label: 关闭
- card_random_cover_list:
- name: card_random_cover_list
- label: 随机封面图片列表,分号分割
- type: textarea
- description: "英文分号(;)分割。注意,这里面填写了图片路径则默认开启了随机图片"
- Icp:
- name: Icp
- label: "ICP 备案号"
- type: text
- placeholder: "填入 ICP 备案号,没有则不填. "
- PoliceSecurityRecordCode:
- name: PoliceSecurityRecordCode
- label: "网安备案号编码"
- type: text
- placeholder: "网安备案号编码,用于链接跳转"
- PublicSecurityRecord:
- name: PublicSecurityRecord
- label: "网安备案号"
- type: text
- placeholder: "填入网安备案号文字"
- QR_code_zfb:
- name: QR_code_zfb
- label: "支付宝二维码图片"
- type: attachment
- placeholder: "支付宝收款二维码链接,不填不显示"
- QR_code_wx:
- name: QR_code_wx
- label: "微信二维码图片"
- type: attachment
- placeholder: "微信收款二维码链接,不填不显示"
head_img:
- label: 网页首部图片
+ label: 网页头部图片
items:
archives_patternimg:
name: archives_patternimg
@@ -175,6 +179,27 @@ post:
label: 开启
- value: false
label: 关闭
+ allow_share:
+ name: allow_share
+ label: 开启分享
+ type: radio
+ data-type: bool
+ default: true
+ options:
+ - value: true
+ label: 开启
+ - value: false
+ label: 关闭
+ QR_code_zfb:
+ name: QR_code_zfb
+ label: "支付宝二维码图片"
+ type: attachment
+ placeholder: "支付宝收款二维码链接,不填不显示"
+ QR_code_wx:
+ name: QR_code_wx
+ label: "微信二维码图片"
+ type: attachment
+ placeholder: "微信收款二维码链接,不填不显示"
title:
label: 自定义页面标题
items:
@@ -246,21 +271,6 @@ social:
label: 开启
- value: false
label: 关闭
-experimental:
- label: 高级功能
- items:
- pjax_enabled:
- name: pjax_enabled
- label: 全局 Pjax
- type: radio
- data-type: bool
- default: false
- options:
- - value: true
- label: 开启
- - value: false
- label: 关闭
-
other:
label: 其他
items:
@@ -271,7 +281,7 @@ other:
description: "填入起始时间,格式:月/日/年 时:分:秒,如08/20/2018 12:00:00"
visit_statistics:
name: visit_statistics
- label: 用户访问统计
+ label: 用户访问统计(需要引入不蒜子统计脚本,官网:https://busuanzi.ibruce.info)
type: radio
data-type: bool
default: false
diff --git a/source/js/main.js b/source/js/main.js
index 8ebbbc2..9f3bb09 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -69,7 +69,6 @@ const xueContext = {
// 客户端宽度小于 800, 就不需要处理了
if (document.body.clientWidth <= 800) {
$('#navHeader .nav').addClass('opacity-100').removeClass('opacity-0')
- return;
}
// 获取是否是深色模式
const dark = $(document.body).hasClass("dark");
@@ -102,8 +101,7 @@ const xueContext = {
xueContext.initialToc();
xueContext.addTocFixEvent();
},
-
-
+
// 初始化目录
initialToc: function () {
if ($("#container").find('#toc').length < 1) {
@@ -312,6 +310,7 @@ const xueContext = {
$e.removeClass('icon-heart')
$e.addClass('icon-heart-fill')
xueContext.likeBtn()
+ Qmsg.success("Thanks for your support!")
},
error: function (msg) {
xueContext.likeBtn();
@@ -353,6 +352,25 @@ const xueContext = {
});
},
+ shareBtn: function () {
+ var clipboard = new ClipboardJS('.share-link');
+ clipboard.on('success', function(e) {
+ Qmsg.success('Copy article link success.');
+ e.clearSelection();
+ });
+ },
+
+ shareItem: function () {
+ const url = document.location.href;
+ document.querySelectorAll('.share-item')
+ .forEach((e) => {
+ var $e = $(e)
+ var href = $e.attr('href')
+ $e.attr('href', href.replace('{url}', url))
+ });
+
+ },
+
// 包裹图片 ,这个需要在 lazyloadImages 方法之前
wrapImage: function () {
const $imgs = $(
@@ -415,7 +433,7 @@ const xueContext = {
const loaded = el.getAttribute('data-loaded')
if (!loaded) {
var index = el.getAttribute('index');
- var imgIndex = !index ? new Date().getSeconds() : index;
+ var imgIndex = !index ? new Date().getMinutes() : index;
if (el.classList.contains('img-random') && typeof photos !== 'undefined' && photos.length > 0) {
el.src = photos[imgIndex % photos.length];
}
diff --git a/source/js/utils.js b/source/js/utils.js
index 4e37d80..784bcb7 100644
--- a/source/js/utils.js
+++ b/source/js/utils.js
@@ -92,7 +92,6 @@ var timeAgo = function (timestamp) {
} else if (minC >= 1) {
return parseInt(minC) + "分钟前";
}
- console.info(monthC, weekC, dayC, hourC, minC)
return '刚刚';
};
@@ -136,18 +135,13 @@ function addCodeCopyBtn() {
new ClipboardJS($this.children('.icon-copy')[0], {
text: () => $this.find("code[class*='language-']").text(),
- }).on("success", () => Qmsg.success("复制成功!"));
+ }).on("success", () => Qmsg.success("Copy success!"));
})
}
function toggleNavCheckBox() {
const navCheckbox = document.querySelector('#navCheckbox')
const navListOpen = document.querySelectorAll('.nav-list.-open')
- if (navListOpen.length < 1) {
- navCheckbox.checked = false;
- } else {
- navCheckbox.checked = true
- }
-
+ navCheckbox.checked = navListOpen.length >= 1;
}
diff --git a/src/styles/_plugins/inside-md.less b/src/styles/_plugins/inside-md.less
index 598d987..f372bf5 100644
--- a/src/styles/_plugins/inside-md.less
+++ b/src/styles/_plugins/inside-md.less
@@ -482,13 +482,17 @@ div.code-toolbar>.toolbar>.toolbar-item:first-child span::before {
text-decoration: none;
&:hover {
- color: var(--base-hover-color) !important;
text-decoration: none;
border-block-end: none;
padding-block-end: 0;
}
}
+a.post-tag:hover {
+ border:none !important;
+ padding: 0 !important;
+}
+
.md-content pre {
position: relative;
//padding: 0;
diff --git a/src/styles/font.less b/src/styles/font.less
index e19040f..a51cbf8 100644
--- a/src/styles/font.less
+++ b/src/styles/font.less
@@ -6,8 +6,36 @@
-moz-osx-font-smoothing: grayscale;
}
-.icon-like3:before {
- content: "\e631";
+.icon-share:before {
+ content: "\e623";
+}
+
+.icon-Qzone:before {
+ content: "\e65e";
+}
+
+.icon-QQ:before {
+ content: "\e65f";
+}
+
+.icon-xinlang:before {
+ content: "\e660";
+}
+
+.icon-round_link_fill:before {
+ content: "\e80b";
+}
+
+.icon-WeChat:before {
+ content: "\e65b";
+}
+
+.icon-uqur:before {
+ content: "\e616";
+}
+
+.icon-Comment:before {
+ content: "\e657";
}
.icon-copy:before {
@@ -18,6 +46,14 @@
content: "\e688";
}
+.icon-like3:before {
+ content: "\e631";
+}
+
+.icon-comment-lines:before {
+ content: "\e7f6";
+}
+
.icon-heart:before {
content: "\e7df";
}
@@ -30,7 +66,7 @@
content: "\e613";
}
-.icon-sun:before {
+.icon-sun1:before {
content: "\e663";
}
@@ -42,22 +78,14 @@
content: "\e6c9";
}
-.icon-sun1:before {
+.icon-sun:before {
content: "\e6d2";
}
-.icon-like1:before {
- content: "\e7c8";
-}
-
.icon-like-fill:before {
content: "\e869";
}
-.icon-like2:before {
- content: "\e64b";
-}
-
.icon-see1:before {
content: "\e639";
}
@@ -150,10 +178,6 @@
content: "\e612";
}
-.icon-wechat1:before {
- content: "\e65c";
-}
-
.icon-zhiding1:before {
content: "\e603";
}
@@ -242,10 +266,6 @@
content: "\e88b";
}
-.icon-Share:before {
- content: "\e62d";
-}
-
.icon-Eyesight:before {
content: "\e68b";
}
diff --git a/src/styles/fonts/iconfont.ttf b/src/styles/fonts/iconfont.ttf
index b069f42..addc4e2 100644
Binary files a/src/styles/fonts/iconfont.ttf and b/src/styles/fonts/iconfont.ttf differ
diff --git a/src/styles/fonts/iconfont.woff b/src/styles/fonts/iconfont.woff
index 1494fc6..8d29e6e 100644
Binary files a/src/styles/fonts/iconfont.woff and b/src/styles/fonts/iconfont.woff differ
diff --git a/src/styles/fonts/iconfont.woff2 b/src/styles/fonts/iconfont.woff2
index ca92ea4..0f09f2c 100644
Binary files a/src/styles/fonts/iconfont.woff2 and b/src/styles/fonts/iconfont.woff2 differ
diff --git a/src/styles/header.less b/src/styles/header.less
index 19cb6f5..15d4eb6 100644
--- a/src/styles/header.less
+++ b/src/styles/header.less
@@ -1,20 +1,14 @@
// 顶部 nav 样式
.nav-wrapper {
- //background-color: var(--header-bg-color);
position: absolute;
top: 0;
left: 0;
right: 0;
min-height: 4rem;
- width: 100%;
+ //width: 100%;
margin: 0 auto;
z-index: 100;
padding: 0;
- display: block;
- transform-style: preserve-3d;
- backface-visibility: hidden;
- -webkit-transform-style: preserve-3d;
- -webkit-backface-visibility: hidden;
}
.nav-list a {
@@ -40,7 +34,6 @@
z-index: 999;
}
-
.nav-wrapper > .nav > .toggle-nav {
z-index: 2;
transition: all 0.3s;
@@ -71,24 +64,8 @@
.nav-wrapper.-sticky.-bottom > .nav > .nav-list > .list.-left {
display: flex;
flex-direction: column;
- justify-content: flex-end;
-}
+ justify-content: flex-end;}
-.nav-wrapper .search {
- line-height: 58px;
- font-size: 1rem;
- position: relative;
- right: 40px;
-}
-
-.nav-wrapper .search .by_icon_sousuo {
- font-size: 20px;
- cursor: pointer;
-}
-
-.nav-wrapper .search .by_icon_sousuo:hover {
- color: var(--base-hl-color);
-}
@media screen and (min-width: 768px) {
.nav-wrapper.-sticky.-bottom > .nav > .nav-list > .list.-left {
@@ -126,12 +103,6 @@
// max-width: 60px;
width: 100%;
height: auto;
- backface-visibility: hidden;
- transform-style: preserve-3d;
- -webkit-backface-visibility: hidden;
- -webkit-transform-style: preserve-3d;
- transition: max-height 0.2s ease-in-out;
- -webkit-transition: max-height 0.2s ease-in-out;
}
.nav-list {
@@ -267,8 +238,7 @@
justify-content: flex-start;
}
- .nav-list > .list > .item > .link,
- .nav-list > .list > .item > .void-link {
+ .nav-list > .list > .item > .link {
display: block;
flex-basis: unset;
background: transparent;
@@ -276,10 +246,14 @@
padding-right: 0;
font-size: 1.1rem;
outline: 0;
- transition: all 0.2s ease-in-out;
+ transition: box-shadow 0.3s ease-in-out;
}
}
+//a.link:hover {
+// border: none;
+// box-shadow: inset 0 -0.3em 0 rgba(229, 231, 235, 1);
+//}
.menu-active:after {
content: '·';
@@ -291,7 +265,43 @@
opacity: 0;
}
+.sub-menu-item {
+ padding: 10px 15px;
+ top: 46px;
+ right: -30%;
+ animation: fade-up .3s .1s ease both;
+ -webkit-animation: fade-up .3s .1s ease both;
+
+ &:before {
+ content: "";
+ position: absolute;
+ top: -20px;
+ left: 50%;
+ margin-left: -10px;
+ border-width: 10px;
+ border-style: solid;
+ border-color: transparent transparent #fff;
+ }
+}
+
+.dark {
+ .sub-menu-item:before {
+ border-color: transparent transparent rgba(31, 41, 55, var(--tw-bg-opacity));
+ }
+}
+
+.has-sub:hover {
+ .sub-menu-item {
+ display: block;
+ }
+}
+
@media all and (max-width: 768px) {
+ .sub-menu-item {
+ &:before {
+ content: none;
+ }
+ }
.link {
color: rgba(31, 41, 55, 1);
@@ -305,11 +315,11 @@
.link {
color: rgba(156, 163, 175, 1) !important;
}
-
+
.nav-line {
color: rgba(156, 163, 175, 1) !important;
}
-
+
.nav {
background-color: rgba(31, 41, 55, 1);
}
diff --git a/src/styles/post.less b/src/styles/post.less
index e62aea5..22da5bf 100644
--- a/src/styles/post.less
+++ b/src/styles/post.less
@@ -20,3 +20,6 @@
opacity: .5;
}
+.share-items a {
+ box-shadow: none !important;
+}
diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css
index f6af748..c800810 100644
--- a/src/styles/tailwind.css
+++ b/src/styles/tailwind.css
@@ -186,9 +186,9 @@
@font-face {
font-family: "iconfont"; /* Project id 2025344 */
- src: url('./fonts/iconfont.woff2?t=1649308749760') format('woff2'),
- url('./fonts/iconfont.woff?t=1649308749760') format('woff'),
- url('./fonts/iconfont.ttf?t=1649308749760') format('truetype');
+ src: url('./fonts/iconfont.woff2?t=1649612262475') format('woff2'),
+ url('./fonts/iconfont.woff?t=1649612262475') format('woff'),
+ url('./fonts/iconfont.ttf?t=1649612262475') format('truetype');
}
@keyframes fade-down {
diff --git a/tag.ftl b/tag.ftl
index 05e4a52..de282f5 100644
--- a/tag.ftl
+++ b/tag.ftl
@@ -19,19 +19,17 @@
- <#if settings.posts_style!true>
- <#include "module/widget/post_cards.ftl">
- <#else>
- <#include "module/widget/post_list.ftl">
- #if>
+ <#if settings.posts_style!true>
+ <#include "module/widget/post_cards.ftl">
+ <#else>
+ <#include "module/widget/post_list.ftl">
+ #if>
<#-- 分页-->
- <#if posts.totalPages gt 1>
-
- #if>
+
@layout>
diff --git a/tailwind.config.js b/tailwind.config.js
index ffcd556..167b543 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -38,7 +38,8 @@ module.exports = {
'60': 'brightness(0.6)',
},
boxShadow: {
-
+ 'lx': '0 1px 40px -8px rgb(0 0 0 / 50%)',
+ 'none': 'none',
},
maxWidth: {
'16': '16rem',
diff --git a/theme.yaml b/theme.yaml
index 97b4b3b..656cd84 100644
--- a/theme.yaml
+++ b/theme.yaml
@@ -7,5 +7,5 @@ description: 大道至简
logo:
website: https://github.com/xzhuz/halo-theme-xue
repo: https://github.com/xzhuz/halo-theme-xue
-version: 1.4.1
+version: 1.4.2
require: 1.5.1