commit
5f100cc4fe
109
settings.yaml
109
settings.yaml
|
@ -39,9 +39,43 @@ spec:
|
||||||
- group: nav
|
- group: nav
|
||||||
label: 导航
|
label: 导航
|
||||||
formSchema:
|
formSchema:
|
||||||
|
- $formkit: group
|
||||||
|
name: menus
|
||||||
|
label: 菜单控制
|
||||||
|
value:
|
||||||
|
pc_leftMenu: true
|
||||||
|
phone_leftMenu: true
|
||||||
|
phone_menu: true
|
||||||
|
children:
|
||||||
|
- $formkit: radio
|
||||||
|
name: pc_leftMenu
|
||||||
|
id: pc_leftMenu
|
||||||
|
label: pc端左侧菜单
|
||||||
|
options:
|
||||||
|
- label: 显示
|
||||||
|
value: true
|
||||||
|
- label: 隐藏
|
||||||
|
value: false
|
||||||
|
- $formkit: radio
|
||||||
|
name: phone_leftMenu
|
||||||
|
label: 移动左侧菜单
|
||||||
|
options:
|
||||||
|
- label: 显示
|
||||||
|
value: true
|
||||||
|
- label: 隐藏
|
||||||
|
value: false
|
||||||
|
- $formkit: radio
|
||||||
|
name: phone_menu
|
||||||
|
label: 移动主菜单
|
||||||
|
options:
|
||||||
|
- label: 显示
|
||||||
|
value: true
|
||||||
|
- label: 隐藏
|
||||||
|
value: false
|
||||||
- $formkit: menuRadio
|
- $formkit: menuRadio
|
||||||
name: leftMenu
|
name: leftMenu
|
||||||
label: 站点名左侧
|
if: $get(pc_leftMenu).value
|
||||||
|
label: 站点名左侧菜单
|
||||||
help: 默认只有主菜单,可前往【外观】—>【菜单】新建菜单组
|
help: 默认只有主菜单,可前往【外观】—>【菜单】新建菜单组
|
||||||
value: ""
|
value: ""
|
||||||
- $formkit: group
|
- $formkit: group
|
||||||
|
@ -1168,6 +1202,15 @@ spec:
|
||||||
- label: 关闭
|
- label: 关闭
|
||||||
value: false
|
value: false
|
||||||
help: 文章主色匹配图片颜色
|
help: 文章主色匹配图片颜色
|
||||||
|
- $formkit: radio
|
||||||
|
name: opacity
|
||||||
|
label: 目录模糊效果
|
||||||
|
value: true
|
||||||
|
options:
|
||||||
|
- label: 打开
|
||||||
|
value: true
|
||||||
|
- label: 关闭
|
||||||
|
value: false
|
||||||
- $formkit: group
|
- $formkit: group
|
||||||
name: aiDescription
|
name: aiDescription
|
||||||
label: 文章 AI 摘要
|
label: 文章 AI 摘要
|
||||||
|
@ -1249,6 +1292,34 @@ spec:
|
||||||
label: 你的博客地址
|
label: 你的博客地址
|
||||||
help: 注意保留最后的斜杠
|
help: 注意保留最后的斜杠
|
||||||
value: https://xx.xx/
|
value: https://xx.xx/
|
||||||
|
- $formkit: group
|
||||||
|
name: passage_tips
|
||||||
|
label: 温馨提示
|
||||||
|
value:
|
||||||
|
enable: false
|
||||||
|
content: 文章内容可能已经过时。
|
||||||
|
day: 7
|
||||||
|
children:
|
||||||
|
- $formkit: radio
|
||||||
|
name: enable
|
||||||
|
id: enable
|
||||||
|
options:
|
||||||
|
- label: 启用
|
||||||
|
value: true
|
||||||
|
- label: 禁用
|
||||||
|
value: false
|
||||||
|
- $formkit: number
|
||||||
|
if: "$get(enable).value"
|
||||||
|
name: day
|
||||||
|
label: 更新时间大于天数显示
|
||||||
|
validation: required
|
||||||
|
- $formkit: code
|
||||||
|
if: "$get(enable).value"
|
||||||
|
name: content
|
||||||
|
height: 100px
|
||||||
|
label: 温馨提示文案
|
||||||
|
help: "自定义温馨提示的文案,支持html语法"
|
||||||
|
language: html
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
name: copyrightsStyle
|
name: copyrightsStyle
|
||||||
id: copyrightsStyle
|
id: copyrightsStyle
|
||||||
|
@ -1322,24 +1393,24 @@ spec:
|
||||||
value: true
|
value: true
|
||||||
- label: 禁用
|
- label: 禁用
|
||||||
value: false
|
value: false
|
||||||
# - $formkit: radio
|
- $formkit: radio
|
||||||
# name: qq_edit
|
name: qq_edit
|
||||||
# help: 启用分享到QQ
|
help: 启用分享到QQ
|
||||||
# value: true
|
value: true
|
||||||
# options:
|
options:
|
||||||
# - label: 启用
|
- label: 启用
|
||||||
# value: true
|
value: true
|
||||||
# - label: 禁用
|
- label: 禁用
|
||||||
# value: false
|
value: false
|
||||||
# - $formkit: radio
|
- $formkit: radio
|
||||||
# name: wechat_edit
|
name: wechat_edit
|
||||||
# help: 启用分享到微信朋友圈
|
help: 启用分享到微信朋友圈
|
||||||
# value: true
|
value: true
|
||||||
# options:
|
options:
|
||||||
# - label: 启用
|
- label: 启用
|
||||||
# value: true
|
value: true
|
||||||
# - label: 禁用
|
- label: 禁用
|
||||||
# value: false
|
value: false
|
||||||
- $formkit: group
|
- $formkit: group
|
||||||
name: copyrights
|
name: copyrights
|
||||||
label: 版权声明
|
label: 版权声明
|
||||||
|
|
|
@ -262,6 +262,54 @@ rm.sharePage = function () {
|
||||||
rm.hideRightMenu();
|
rm.hideRightMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isMobileDevice() {
|
||||||
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
rm.shareToQQ = function () {
|
||||||
|
var url = /*[[${post.status.permalink}]]*/ window.location.href;
|
||||||
|
var title = $('#post-info .post-title')[0].innerText;
|
||||||
|
if (isMobileDevice()) {
|
||||||
|
// 使用手机分享方式
|
||||||
|
window.location.href = "mqqapi://share/to_fri?src_type=web&version=1&file_type=news&url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&callback_type=scheme&generalpastboard=1";
|
||||||
|
} else {
|
||||||
|
// 使用Web分享方式
|
||||||
|
window.open("https://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title));
|
||||||
|
}
|
||||||
|
btf.snackbarShow('分享链接地址成功', false, 2000);
|
||||||
|
rm.hideRightMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
rm.shareToWechat = function () {
|
||||||
|
|
||||||
|
// 手机分享逻辑
|
||||||
|
if (isMobileDevice) {
|
||||||
|
|
||||||
|
wx.config({
|
||||||
|
// 配置微信的appID、timestamp、nonceStr、signature等参数
|
||||||
|
// ...
|
||||||
|
debug: false,
|
||||||
|
jsApiList: ['onMenuShareTimeline'] // 需要使用的微信接口
|
||||||
|
});
|
||||||
|
|
||||||
|
wx.ready(function () {
|
||||||
|
wx.onMenuShareTimeline({
|
||||||
|
title: $('#post-info .post-title')[0].innerText,
|
||||||
|
link: window.location.href,
|
||||||
|
imgUrl: $('#coverdiv img')[0].src,
|
||||||
|
success: function () {
|
||||||
|
btf.snackbarShow('分享链接地址成功', false, 2000);
|
||||||
|
rm.hideRightMenu();
|
||||||
|
},
|
||||||
|
cancel: function () {
|
||||||
|
btf.snackbarShow('分享链接地址失败', false, 2000);
|
||||||
|
rm.hideRightMenu();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 复制当前选中文本
|
// 复制当前选中文本
|
||||||
var selectTextNow = '';
|
var selectTextNow = '';
|
||||||
document.onmouseup = document.ondbclick = selceText;
|
document.onmouseup = document.ondbclick = selceText;
|
||||||
|
|
|
@ -7679,20 +7679,22 @@ div#power-star-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 侧边栏在左侧时,显示 100% */
|
@media screen and (min-width: 1200px) {
|
||||||
.layout.left-aside > div:first-child {
|
/* 侧边栏在左侧时,显示 100% */
|
||||||
-webkit-box-ordinal-group: 2;
|
.layout.left-aside > div:first-child {
|
||||||
-moz-box-ordinal-group: 2;
|
-webkit-box-ordinal-group: 2;
|
||||||
-o-box-ordinal-group: 2;
|
-moz-box-ordinal-group: 2;
|
||||||
-ms-flex-order: 2;
|
-o-box-ordinal-group: 2;
|
||||||
-webkit-order: 2;
|
-ms-flex-order: 2;
|
||||||
order: 2;
|
-webkit-order: 2;
|
||||||
}
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* 侧栏在左侧时,关闭左边距,打开右边距 */
|
/* 侧栏在左侧时,关闭左边距,打开右边距 */
|
||||||
.layout.left-aside .aside-content {
|
.layout.left-aside .aside-content {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
padding-left: 0px !important;
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 主页分类 */
|
/* 主页分类 */
|
||||||
|
|
|
@ -163,6 +163,8 @@
|
||||||
<!-- 复制 https://githubfast.com/zenorocha/clipboard.js -->
|
<!-- 复制 https://githubfast.com/zenorocha/clipboard.js -->
|
||||||
<script th:src="${assets_link + '/libs/clipboard/clipboard.min.js'}"></script>
|
<script th:src="${assets_link + '/libs/clipboard/clipboard.min.js'}"></script>
|
||||||
|
|
||||||
|
<script th:if="${theme.config.post.share_right.wechat_edit}" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||||
|
|
||||||
<!-- 关于统计-->
|
<!-- 关于统计-->
|
||||||
<script th:if="${#strings.contains(theme.config.about.widgetList,'statistics-map')}" th:src="${assets_link + '/libs/countup/countup.js'}"></script>
|
<script th:if="${#strings.contains(theme.config.about.widgetList,'statistics-map')}" th:src="${assets_link + '/libs/countup/countup.js'}"></script>
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,16 @@
|
||||||
<div class="share-button" id="post-share-url" onclick="rm.copyPageUrl()" title="复制链接"><i
|
<div class="share-button" id="post-share-url" onclick="rm.copyPageUrl()" title="复制链接"><i
|
||||||
class="haofont hao-icon-link"></i></div>
|
class="haofont hao-icon-link"></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="share-link weibo" th:if="${theme.config.post.share_right.qq_edit}">
|
||||||
|
<div class="share-button" id="post-share-url-qq" onclick="rm.shareToQQ()" title="分享到QQ">
|
||||||
|
<i class="haofont hao-icon-qq" style="font-size:19px"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="share-link weibo" th:if="${theme.config.post.share_right.wechat_edit}">
|
||||||
|
<div class="share-button" id="post-share-url-wechat" onclick="rm.shareToWechat()" title="分享到微信朋友圈">
|
||||||
|
<i class="haofont hao-icon-weixin" style="font-size:22px"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-tools-right">
|
<div class="post-tools-right">
|
||||||
<div class="tag_share">
|
<div class="tag_share">
|
||||||
|
|
|
@ -67,6 +67,16 @@
|
||||||
<div class="share-button" id="post-share-url" onclick="rm.copyPageUrl()" title="复制链接"><i
|
<div class="share-button" id="post-share-url" onclick="rm.copyPageUrl()" title="复制链接"><i
|
||||||
class="haofont hao-icon-link"></i></div>
|
class="haofont hao-icon-link"></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="share-link weibo" th:if="${theme.config.post.share_right.qq_edit}">
|
||||||
|
<div class="share-button" id="post-share-url-qq" onclick="rm.shareToQQ()" title="分享到QQ">
|
||||||
|
<i class="haofont hao-icon-qq" style="font-size:19px"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="share-link weibo" th:if="${theme.config.post.share_right.wechat_edit}">
|
||||||
|
<div class="share-button" id="post-share-url-wechat" onclick="rm.shareToWechat()" title="分享到微信朋友圈">
|
||||||
|
<i class="haofont hao-icon-weixin" style="font-size:22px"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<span>显示模式</span>
|
<span>显示模式</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu)}"
|
<th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu) && theme.config.nav.menus.phone_leftMenu}"
|
||||||
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
|
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
|
||||||
<div class="back-menu-list-groups">
|
<div class="back-menu-list-groups">
|
||||||
<div class="back-menu-list-group" th:each="menuItem : ${leftMenu.menuItems}">
|
<div class="back-menu-list-group" th:each="menuItem : ${leftMenu.menuItems}">
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:if="${not #lists.isEmpty(menuFinder.getPrimary().menuItems)}"
|
<th:block th:if="${not #lists.isEmpty(menuFinder.getPrimary().menuItems) && theme.config.nav.menus.phone_menu}"
|
||||||
>
|
>
|
||||||
<div class="menus_items">
|
<div class="menus_items">
|
||||||
<div class="menus_item" th:each="menuItem : ${menuFinder.getPrimary().menuItems}">
|
<div class="menus_item" th:each="menuItem : ${menuFinder.getPrimary().menuItems}">
|
||||||
|
|
|
@ -32,4 +32,10 @@
|
||||||
[data-theme=light] {
|
[data-theme=light] {
|
||||||
--halo-search-widget-color-result-item-title : #4B5563
|
--halo-search-widget-color-result-item-title : #4B5563
|
||||||
}
|
}
|
||||||
|
[# th:if="${!theme.config.post.opacity}"]
|
||||||
|
#aside-content #card-toc .toc-content a.toc-link:not(.active) {
|
||||||
|
opacity: 1;
|
||||||
|
filter: blur(0px);
|
||||||
|
}
|
||||||
|
[/]
|
||||||
</style>
|
</style>
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- 导航栏左侧 -->
|
<!-- 导航栏左侧 -->
|
||||||
<div id="blog_name" >
|
<div id="blog_name" >
|
||||||
|
|
||||||
<th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu)}"
|
<th:block th:if="${not #strings.isEmpty(theme.config.nav.leftMenu) && theme.config.nav.menus.pc_leftMenu}"
|
||||||
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
|
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.leftMenu)}">
|
||||||
<!-- 菜单栏左侧按钮,没有配置时,则不展示-->
|
<!-- 菜单栏左侧按钮,没有配置时,则不展示-->
|
||||||
<div class="back-home-button" tabindex="-1"
|
<div class="back-home-button" tabindex="-1"
|
||||||
|
|
|
@ -165,7 +165,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 文章内容 -->
|
<!-- 文章内容 -->
|
||||||
<article th:class="'post-content '+${ theme.config.code.enable_line || pluginFinder.available('PluginPrismJS') ? 'line-numbers' : ''}" id="article-container" th:utext="${post.content.content}">
|
<article th:class="'post-content '+${ theme.config.code.enable_line || pluginFinder.available('PluginPrismJS') ? 'line-numbers' : ''}" id="article-container">
|
||||||
|
<th:block th:if="${theme.config.post.passage_tips.enable}"
|
||||||
|
th:with="days=${(new java.util.Date().getTime()-post.status.lastModifyTime.toEpochMilli())/86400000}">
|
||||||
|
<div class="note simple warning" th:if="${days > #conversions.convert(theme.config.post.passage_tips.day, 'java.lang.Integer')}">
|
||||||
|
<p>
|
||||||
|
<th:block th:text="|本文最后更新于 ${#dates.format(post.status.lastModifyTime,'yyyy-MM-dd')},|"/><th:block th:utext="${theme.config.post.passage_tips.content}"/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
<th:block th:utext="${post.content.content}"/>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<!-- 文章ai摘要 -->
|
<!-- 文章ai摘要 -->
|
||||||
|
|
Loading…
Reference in New Issue