Merge branch 'main' into fix/#237
This commit is contained in:
commit
9fa2d58c3b
1480
settings.yaml
1480
settings.yaml
File diff suppressed because it is too large
Load Diff
|
@ -50,7 +50,7 @@
|
|||
<div th:replace="~{modules/widgets/page :: page('/archives',${archives})}"></div>
|
||||
</div>
|
||||
<!-- sidebar -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.categoryWidgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.categoryWidgets})}"></div>
|
||||
</main>
|
||||
<!-- 底部 -->
|
||||
<footer th:replace="~{modules/footer :: footer}"></footer>
|
||||
|
|
|
@ -245,27 +245,27 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
* 需要 jQuery
|
||||
*/
|
||||
|
||||
// let detectJgJsLoad = false
|
||||
// const runJustifiedGallery = function (ele) {
|
||||
// const $justifiedGallery = $(ele)
|
||||
// const $imgList = $justifiedGallery.find('img')
|
||||
// $imgList.unwrap()
|
||||
// if ($imgList.length) {
|
||||
// $imgList.each(function (i, o) {
|
||||
// if ($(o).attr('data-lazy-src')) $(o).attr('src', $(o).attr('data-lazy-src'))
|
||||
// $(o).wrap('<div></div>')
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// if (detectJgJsLoad) btf.initJustifiedGallery($justifiedGallery)
|
||||
// else {
|
||||
// $('head').append(`<link rel="stylesheet" type="text/css" href="${GLOBAL_CONFIG.source.justifiedGallery.css}">`)
|
||||
// $.getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`, function () {
|
||||
// btf.initJustifiedGallery($justifiedGallery)
|
||||
// })
|
||||
// detectJgJsLoad = true
|
||||
// }
|
||||
// }
|
||||
let detectJgJsLoad = false
|
||||
const runJustifiedGallery = function (ele) {
|
||||
const $justifiedGallery = $(ele)
|
||||
const $imgList = $justifiedGallery.find('img')
|
||||
$imgList.unwrap()
|
||||
if ($imgList.length) {
|
||||
$imgList.each(function (i, o) {
|
||||
if ($(o).attr('data-lazy-src')) $(o).attr('src', $(o).attr('data-lazy-src'))
|
||||
$(o).wrap('<div></div>')
|
||||
})
|
||||
}
|
||||
|
||||
if (detectJgJsLoad) btf.initJustifiedGallery($justifiedGallery)
|
||||
else {
|
||||
$('head').append(`<link rel="stylesheet" type="text/css" href="${GLOBAL_CONFIG.source.justifiedGallery.css}">`)
|
||||
$.getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`, function () {
|
||||
btf.initJustifiedGallery($justifiedGallery)
|
||||
})
|
||||
detectJgJsLoad = true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* fancybox和 mediumZoom
|
||||
|
@ -317,7 +317,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
|
||||
const jqLoadAndRun = () => {
|
||||
const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img,.bber-content-img > img')
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group):not(.site-card-avatar) > img, #article-container > img,.bber-content-img > img')
|
||||
: []
|
||||
const fbLengthNoZero = $fancyboxEle.length > 0
|
||||
const $jgEle = document.querySelectorAll('#article-container .justified-gallery')
|
||||
|
|
|
@ -36,43 +36,102 @@ var btf = {
|
|||
return result;
|
||||
},
|
||||
|
||||
// loadLightbox: ele => {
|
||||
// const service = GLOBAL_CONFIG.lightbox;
|
||||
|
||||
// if (service === "mediumZoom") {
|
||||
// const zoom = mediumZoom(ele);
|
||||
// zoom.on("open", e => {
|
||||
// const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff";
|
||||
// zoom.update({
|
||||
// background: photoBg,
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// if (service === "fancybox") {
|
||||
// ele.forEach(i => {
|
||||
// if (i.parentNode.tagName !== "A") {
|
||||
// const dataSrc = i.dataset.lazySrc || i.src;
|
||||
// const dataCaption = i.title || i.alt || "";
|
||||
// btf.wrap(i, "a", {
|
||||
// href: dataSrc,
|
||||
// "data-fancybox": "gallery",
|
||||
// "data-caption": dataCaption,
|
||||
// "data-thumb": dataSrc,
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// if (!window.fancyboxRun) {
|
||||
// Fancybox.bind("[data-fancybox]", {
|
||||
// Hash: false,
|
||||
// Thumbs: {
|
||||
// autoStart: false,
|
||||
// },
|
||||
// });
|
||||
// window.fancyboxRun = true;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
loadLightbox: ele => {
|
||||
const service = GLOBAL_CONFIG.lightbox;
|
||||
|
||||
if (service === "mediumZoom") {
|
||||
const zoom = mediumZoom(ele);
|
||||
zoom.on("open", e => {
|
||||
const photoBg = document.documentElement.getAttribute("data-theme") === "dark" ? "#121212" : "#fff";
|
||||
zoom.update({
|
||||
background: photoBg,
|
||||
});
|
||||
});
|
||||
const jqLoadAndRun = () => {
|
||||
const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
? ele
|
||||
: []
|
||||
const fbLengthNoZero = $fancyboxEle.length > 0
|
||||
|
||||
if (fbLengthNoZero) {
|
||||
btf.isJqueryLoad(() => {
|
||||
fbLengthNoZero && addFancybox($fancyboxEle)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (service === "fancybox") {
|
||||
ele.forEach(i => {
|
||||
if (i.parentNode.tagName !== "A") {
|
||||
const dataSrc = i.dataset.lazySrc || i.src;
|
||||
const dataCaption = i.title || i.alt || "";
|
||||
btf.wrap(i, "a", {
|
||||
href: dataSrc,
|
||||
"data-fancybox": "gallery",
|
||||
"data-caption": dataCaption,
|
||||
"data-thumb": dataSrc,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!window.fancyboxRun) {
|
||||
Fancybox.bind("[data-fancybox]", {
|
||||
Hash: false,
|
||||
Thumbs: {
|
||||
autoStart: false,
|
||||
},
|
||||
});
|
||||
window.fancyboxRun = true;
|
||||
|
||||
|
||||
/**
|
||||
* fancybox
|
||||
*/
|
||||
const addFancybox = function (ele) {
|
||||
const runFancybox = (ele) => {
|
||||
ele.each(function (i, o) {
|
||||
const $this = $(o)
|
||||
const lazyloadSrc = $this.attr('data-lazy-src') || $this.attr('src')
|
||||
const lazyloadSrc1600 = lazyloadSrc + '_1600w'
|
||||
const dataCaption = $this.attr('alt') || ''
|
||||
if (lazyloadSrc.indexOf('!blogimg') != -1) {
|
||||
$this.wrap(`<a href="${lazyloadSrc}" data-fancybox="images" data-caption="${dataCaption}" class="fancybox" data-srcset="${lazyloadSrc1600} 1600w"></a>`)
|
||||
} else {
|
||||
$this.wrap(`<a href="${lazyloadSrc}" data-fancybox="images" data-caption="${dataCaption}" class="fancybox" data-srcset="${lazyloadSrc} 1600w"></a>`)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
$().fancybox({
|
||||
selector: '[data-fancybox]',
|
||||
loop: true,
|
||||
transitionEffect: 'slide',
|
||||
protect: true,
|
||||
buttons: ['slideShow', 'fullScreen', 'thumbs', 'close'],
|
||||
hash: false
|
||||
})
|
||||
}
|
||||
|
||||
if (typeof $.fancybox === 'undefined') {
|
||||
$('head').append(`<link rel="stylesheet" type="text/css" href="${GLOBAL_CONFIG.source.fancybox.css}">`)
|
||||
$.getScript(`${GLOBAL_CONFIG.source.fancybox.js}`, function () {
|
||||
runFancybox($(ele))
|
||||
})
|
||||
} else {
|
||||
runFancybox($(ele))
|
||||
}
|
||||
}
|
||||
|
||||
jqLoadAndRun()
|
||||
|
||||
},
|
||||
debounce: function (func, wait, immediate) {
|
||||
let timeout
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<div th:replace="~{modules/widgets/page :: page(${'/categories/'+category.spec.slug},${posts})}"></div>
|
||||
</div>
|
||||
<!-- sidebar -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.categoryWidgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.categoryWidgets})}"></div>
|
||||
</main>
|
||||
|
||||
<!-- 底部 -->
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
<div class="recent-posts" id="recent-posts">
|
||||
|
||||
<!-- 分类导航栏 -->
|
||||
<div th:replace="~{'modules/bar/' + ${theme.config.layout.nav}}"></div>
|
||||
<div th:replace="~{'modules/bar/' + ${theme.config.layout.navs.nav}}"></div>
|
||||
|
||||
<th:block th:replace="~{modules/post-list :: post-list}"></th:block>
|
||||
|
||||
</div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.indexWidgets})}"></div>
|
||||
</main>
|
||||
<!-- 底部 -->
|
||||
<footer th:replace="~{modules/footer :: footer}"></footer>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<a href="/">首页</a>
|
||||
</div>
|
||||
|
||||
<th:block th:each="customCategory : ${theme.config.layout.navCustomCategory}">
|
||||
<th:block th:each="customCategory : ${theme.config.layout.navs.navCustomCategory}">
|
||||
<div class="category-bar-item"
|
||||
th:each="categoryItem : ${categoryFinder.getByName(customCategory.category)}"
|
||||
th:id="${categoryItem.spec.displayName}">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<a href="/">首页</a>
|
||||
</div>
|
||||
|
||||
<th:block th:each="customTag : ${theme.config.layout.navCustomTag}">
|
||||
<th:block th:each="customTag : ${theme.config.layout.navs.navCustomTag}">
|
||||
<div class="category-bar-item"
|
||||
th:each="tagItem : ${tagFinder.getByName(customTag.tag)}"
|
||||
th:id="${tagItem.spec.displayName}">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<a href="/">首页</a>
|
||||
</div>
|
||||
|
||||
<th:block th:with="customUrls = ${theme.config.layout.navCustomUrl}">
|
||||
<th:block th:with="customUrls = ${theme.config.layout.navs.navCustomUrl}">
|
||||
|
||||
<div class="category-bar-item"
|
||||
th:each="customUrlItem : ${customUrls}"
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<!-- 目录条,这里使用和 category-bar 同样的 css -->
|
||||
<th:block th:fragment="more">
|
||||
<a class="category-bar-more" href="/categories"
|
||||
th:if="${#strings.equals(theme.config.layout.navMore, 'categories') }">更多</a>
|
||||
th:if="${#strings.equals(theme.config.layout.navs.navMore, 'categories') }">更多</a>
|
||||
<a class="category-bar-more" href="/tags"
|
||||
th:if="${#strings.equals(theme.config.layout.navMore, 'tags') }">更多</a>
|
||||
<a class="category-bar-more" th:href="@{${theme.config.layout.navMoreCustomUrl}}"
|
||||
th:if="${#strings.equals(theme.config.layout.navMore, 'customUrl') }">更多</a>
|
||||
th:if="${#strings.equals(theme.config.layout.navs.navMore, 'tags') }">更多</a>
|
||||
<a class="category-bar-more" th:href="@{${theme.config.layout.navs.navMoreCustomUrl}}"
|
||||
th:if="${#strings.equals(theme.config.layout.navs.navMore, 'customUrl') }">更多</a>
|
||||
</th:block>
|
||||
|
||||
</html>
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
<!-- 社交链接,需要填入 href class title -->
|
||||
<div id="footer_deal">
|
||||
<th:block th:with="socialMedias = ${theme.config.footer.socialMediaLeft}">
|
||||
<th:block th:with="socialMedias = ${theme.config.footer.social_media.socialMediaLeft}">
|
||||
<a class="deal_link" rel="external nofollow" target="_blank" th:each="socialMedia : ${socialMedias}"
|
||||
th:href="${socialMedia.url}" th:title="${socialMedia.name}">
|
||||
<i class="iconfont " th:classappend="${socialMedia.icon}"></i>
|
||||
</a>
|
||||
</th:block>
|
||||
|
||||
<img th:if="${not #strings.isEmpty(theme.config.footer.centerImg)}" class="footer_mini_logo"
|
||||
th:src="@{${theme.config.footer.centerImg}}" title="返回顶部" onclick="btf.scrollToDest(0, 500)">
|
||||
<th:block th:with="socialMedias = ${theme.config.footer.socialMediaRight}">
|
||||
<img th:if="${not #strings.isEmpty(theme.config.footer.social_media.centerImg)}" class="footer_mini_logo"
|
||||
th:src="@{${theme.config.footer.social_media.centerImg}}" title="返回顶部" onclick="btf.scrollToDest(0, 500)">
|
||||
<th:block th:with="socialMedias = ${theme.config.footer.social_media.socialMediaRight}">
|
||||
<a class="deal_link" rel="external nofollow" target="_blank" th:each="socialMedia : ${socialMedias}"
|
||||
th:href="${socialMedia.url}" th:title="${socialMedia.name}">
|
||||
<i class="iconfont " th:classappend="${socialMedia.icon}"></i>
|
||||
|
@ -34,7 +34,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${theme.config.footer.enable_footer_group}" class="footer-group">
|
||||
<div th:if="${theme.config.footer.footer_group.enable_footer_group}" class="footer-group">
|
||||
<div class="footer-title-group">
|
||||
<h3 class="footer-title">友链</h3><a class="random-friends-btn"
|
||||
href="javascript:link.addFriendLinksInFooter();"
|
||||
|
@ -93,13 +93,13 @@
|
|||
|
||||
|
||||
<!-- 右下角 snackbar 弹窗 -->
|
||||
<div th:if="${theme.config.snackbar.switch}" class="needEndHide" id="cookies-window">
|
||||
<div class="cookies-window-title" th:text="${theme.config.snackbar.introductionTitle}"></div>
|
||||
<div th:if="${theme.config.tool.snackbar.switch}" class="needEndHide" id="cookies-window">
|
||||
<div class="cookies-window-title" th:text="${theme.config.tool.snackbar.introductionTitle}"></div>
|
||||
<div class="cookies-window-content"><span class="cookies-tip"
|
||||
th:text="${theme.config.snackbar.introductionTip}"></span>
|
||||
th:text="${theme.config.tool.snackbar.introductionTip}"></span>
|
||||
<a class="cookies-link"
|
||||
th:href="@{${theme.config.snackbar.introductionUrl}}"
|
||||
th:title="${theme.config.snackbar.introductionName}" data-pjax-state=""><i
|
||||
th:href="@{${theme.config.tool.snackbar.introductionUrl}}"
|
||||
th:title="${theme.config.tool.snackbar.introductionName}" data-pjax-state=""><i
|
||||
class="bber-gotobb fas fa-arrow-circle-right"></i></a></div>
|
||||
</div>
|
||||
<div id="quit-box" onclick="RemoveRewardMask()"></div>
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<!-- 动态加载条 -->
|
||||
<script data-pace-options='{ "restartOnRequestAfter":false,"eventLag":false}'
|
||||
src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/pace/1.2.4/pace.min.js"
|
||||
th:if="${theme.config.other.loadProgressBar}">
|
||||
th:if="${theme.config.other.loadingBoxs.loadProgressBar}">
|
||||
</script>
|
||||
|
||||
<!-- 复制 https://github.com/zenorocha/clipboard.js -->
|
||||
|
@ -167,13 +167,24 @@
|
|||
copyright: undefined,
|
||||
lightbox: 'fancybox',
|
||||
lazyload: {enable: true, error: "/themes/theme-hao/assets/images/404s.gif"},
|
||||
isFriendLinksInFooter: [[${theme.config.footer.enable_footer_group}]],
|
||||
loadingBox: [[${theme.config.other.loadingBox}]],
|
||||
loadProgressBar: [[${theme.config.other.loadProgressBar}]],
|
||||
error404Enable: [[${theme.config.other.error_404Enable}]],
|
||||
allPlaylist: [[${theme.config.other.nav_music.all_playlist}]],
|
||||
navMusicEnable:[[${theme.config.other.nav_musicEnable}]],
|
||||
isFriendLinksInFooter: [[${theme.config.footer.footer_group.enable_footer_group}]],
|
||||
loadingBox: [[${theme.config.other.loadingBoxs.loadingBoxEnable}]],
|
||||
loadProgressBar: [[${theme.config.other.loadingBoxs.loadProgressBar}]],
|
||||
error404Enable: [[${theme.config.other.error_404.error_404Enable}]],
|
||||
allPlaylist: [[${theme.config.tool.nav_music.all_playlist}]],
|
||||
navMusicEnable:[[${theme.config.tool.nav_music.nav_musicEnable}]],
|
||||
isMusic: [[${ htmlType == 'music'}]],
|
||||
source: {
|
||||
jQuery: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js',
|
||||
justifiedGallery: {
|
||||
js: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js',
|
||||
css: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/justifiedGallery/3.8.1/css/justifiedGallery.min.css'
|
||||
},
|
||||
fancybox: {
|
||||
js: 'https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.js',
|
||||
css: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.css'
|
||||
}
|
||||
},
|
||||
date_suffix: {
|
||||
just: '刚刚',
|
||||
min: '分钟前',
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div th:replace="~{modules/sidebar :: sidebar}"></div>
|
||||
|
||||
<!-- 左下角音乐 -->
|
||||
<th:block th:if="${theme.config.other.nav_musicEnable}" >
|
||||
<th:block th:if="${theme.config.tool.nav_music.nav_musicEnable}" >
|
||||
<div th:replace="~{modules/nav-music :: nav-music}"></div>
|
||||
</th:block>
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
|
||||
<!--左下角音乐-->
|
||||
<script>var meting_api = '[[${theme.config.other.nav_music.meting_api}]]'; </script>
|
||||
<script>var meting_api = '[[${theme.config.tool.nav_music.meting_api}]]'; </script>
|
||||
|
||||
<link rel="stylesheet" th:href="@{/assets/libs/aplayer/APlayer.min.css}" media="all" onload="this.media='all'">
|
||||
|
||||
|
@ -181,7 +181,7 @@
|
|||
</script>
|
||||
|
||||
|
||||
<script th:if="${theme.config.other.diytitleEnable}">//动态标题
|
||||
<script th:if="${theme.config.other.diytitle.diytitleEnable}">//动态标题
|
||||
let leaveTitle = '[[${theme.config.other.diytitle.leaveTitle}]]';
|
||||
let backTitle = '[[${theme.config.other.diytitle.backTitle}]]';
|
||||
let OriginTitile = document.title
|
||||
|
@ -209,7 +209,7 @@
|
|||
// 页脚友链
|
||||
addFriendLinksInFooter: function () {
|
||||
|
||||
var fetchUrl = [[${theme.config.fcircle.fetchUrl}]]
|
||||
var fetchUrl = [[${theme.config.footer.footer_group.fetchUrl}]]
|
||||
fetch(fetchUrl)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
|
@ -327,7 +327,7 @@
|
|||
coverColor();
|
||||
}
|
||||
|
||||
if ([[${ theme.config.other.loadingBox }]]) {
|
||||
if ([[${ theme.config.other.loadingBoxs.loadingBoxEnable }]]) {
|
||||
// 移除加载动画
|
||||
removeLoading();
|
||||
}
|
||||
|
@ -350,7 +350,7 @@
|
|||
}
|
||||
|
||||
//右下角 snackbar 弹窗
|
||||
if ([[${ theme.config.snackbar.switch }]]) {
|
||||
if ([[${ theme.config.tool.snackbar.switch }]]) {
|
||||
heo.hidecookie()
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- loading 页面,todo 这块都可以不要,后面删除,先精简代码,后续考虑组件添加 -->
|
||||
<div id="loading-box" onclick="heo.hideLoading()"
|
||||
th:fragment="loading-box"
|
||||
th:if="${theme.config.other.loadingBox} and not ${#strings.isEmpty(theme.config.other.loadingBoxImg)}">
|
||||
th:if="${theme.config.other.loadingBoxs.loadingBoxEnable} and not ${#strings.isEmpty(theme.config.other.loadingBoxs.loadingBoxImg)}">
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
|
@ -89,7 +89,7 @@
|
|||
</style>
|
||||
|
||||
<div class="loading-bg">
|
||||
<img class="loading-img" style="border-radius: 50%;" th:src="${theme.config.other.loadingBoxImg}">
|
||||
<img class="loading-img" style="border-radius: 50%;" th:src="${theme.config.other.loadingBoxs.loadingBoxImg}">
|
||||
<div class="loading-image-dot"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- 音乐 -->
|
||||
<div th:fragment="nav-music" class="needEndHide" id="nav-music" >
|
||||
<a id="nav-music-hoverTips" onclick="heo.musicToggle()" accesskey="m">播放音乐</a>
|
||||
<div id="console-music-bg"></div><meting-js th:id="${theme.config.other.nav_music.id}" th:server="${theme.config.other.nav_music.server}" type="playlist" mutex="true"
|
||||
<div id="console-music-bg"></div><meting-js th:id="${theme.config.tool.nav_music.id}" th:server="${theme.config.tool.nav_music.server}" type="playlist" mutex="true"
|
||||
preload="none" theme="var(--heo-main)" data-lrctype="0" order="random"></meting-js>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
<!-- card,需要添加在没有图片时使用随机图片 -->
|
||||
<div class="recent-post-item"
|
||||
th:classappend="${theme.config.layout.cols} + ' ' +
|
||||
${theme.config.layout.postLocation} + ' ' +
|
||||
th:classappend="${theme.config.layout.post.cols} + ' ' +
|
||||
${theme.config.layout.post.postLocation} + ' ' +
|
||||
(${iStat.even} ? 'even' : 'odd') +
|
||||
(${post.spec.pinned} ? 'pinned-post-item' : '')"
|
||||
th:each="post,iStat : ${postItems}">
|
||||
|
|
|
@ -3,20 +3,20 @@
|
|||
|
||||
<!-- 文章ai摘要 -->
|
||||
|
||||
<script data-pjax th:fragment="postHeadAiDescription" th:if="${theme.config.aiDescription.enable}">
|
||||
<script data-pjax th:fragment="postHeadAiDescription" th:if="${theme.config.post.aiDescription.aiDescriptionEnable}">
|
||||
|
||||
|
||||
(function () {
|
||||
|
||||
let ai = "[[${post.status.excerpt}]]"
|
||||
let randomNum = [[${theme.config.aiDescription.randomNum}]] //按钮最大的随机次数,也就是一篇文章最大随机出来几种
|
||||
let basicWordCount = [[${theme.config.aiDescription.basicWordCount}]] // 最低获取字符数, 最小1000, 最大1999
|
||||
let btnLink = "[[${theme.config.aiDescription.btnLink}]]"
|
||||
let gptName = "[[${theme.config.aiDescription.gptName}]]"
|
||||
let modeName = "[[${theme.config.aiDescription.mode}]]"
|
||||
let switchBtn = [[${theme.config.aiDescription.switchBtn}]] //# 可以配置是否显示切换按钮 以切换tianli/local
|
||||
let keys = "[[${theme.config.aiDescription.key}]]"
|
||||
let Referers = "[[${theme.config.aiDescription.Referer}]]"
|
||||
let randomNum = [[${theme.config.post.aiDescription.randomNum}]] //按钮最大的随机次数,也就是一篇文章最大随机出来几种
|
||||
let basicWordCount = [[${theme.config.post.aiDescription.basicWordCount}]] // 最低获取字符数, 最小1000, 最大1999
|
||||
let btnLink = "[[${theme.config.post.aiDescription.btnLink}]]"
|
||||
let gptName = "[[${theme.config.post.aiDescription.gptName}]]"
|
||||
let modeName = "[[${theme.config.post.aiDescription.mode}]]"
|
||||
let switchBtn = [[${theme.config.post.aiDescription.switchBtn}]] //# 可以配置是否显示切换按钮 以切换tianli/local
|
||||
let keys = "[[${theme.config.post.aiDescription.key}]]"
|
||||
let Referers = "[[${theme.config.post.aiDescription.Referer}]]"
|
||||
|
||||
// 当前随机到的ai摘要到index
|
||||
let lastAiRandomIndex = -1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<!-- 右键菜单 -->
|
||||
<div th:fragment="right-menu" th:if="${theme.config.rightMenu.switch}">
|
||||
<div th:fragment="right-menu" th:if="${theme.config.tool.rightMenu.rightMenuEnable}">
|
||||
<script th:src="@{/assets/zhheo/rightmenu.js}"></script>
|
||||
<div id="rightMenu">
|
||||
<div class="rightMenu-group rightMenu-small">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<span>切换到下一首</span>
|
||||
</div>
|
||||
<div class="rightMenu-item" id="menu-music-playlist"
|
||||
th:attr="onclick='javascript:window.open(\''+ ${theme.config.other.nav_music.all_playlist} +'\')'"
|
||||
th:attr="onclick='javascript:window.open(\''+ ${theme.config.tool.nav_music.all_playlist} +'\')'"
|
||||
style="">
|
||||
<i class="anzhiyufont anzhiyu-icon-radio"></i>
|
||||
<span>查看所有歌曲</span>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
envId: [[${theme.config.comments.twikoos.envId}]],
|
||||
region: '',
|
||||
onCommentLoaded: function () {
|
||||
//- btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)'))
|
||||
btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)'))
|
||||
$("input").focus(function () {
|
||||
heo_intype = true;
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with='posts = ${postFinder.list(1,theme.config.post.recentPost)},
|
||||
<div class="card-widget card-recent-post" th:fragment="recent-posts" th:with='posts = ${postFinder.list(1,theme.config.sidebar.recentPost)},
|
||||
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"," : theme.config.layout.postRandomImg+"?"}'>
|
||||
<div class="item-headline"><i class="iconfont icon-listol"></i><span>最近发布</span></div>
|
||||
<div class="aside-list">
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<div id="banners">
|
||||
<div class="banners-title">
|
||||
<div class="banners-title-big"
|
||||
th:if="${not #strings.isEmpty(theme.config.top.bannersTitleBig)}"
|
||||
th:utext="${theme.config.top.bannersTitleBig}"></div>
|
||||
th:if="${not #strings.isEmpty(theme.config.top.BannerLeft.bannersTitleBig)}"
|
||||
th:utext="${theme.config.top.BannerLeft.bannersTitleBig}"></div>
|
||||
<div class="banners-title-small"
|
||||
th:if="${not #strings.isEmpty(theme.config.top.bannersTitleSmall)}"
|
||||
th:utext="${theme.config.top.bannersTitleSmall}"></div>
|
||||
th:if="${not #strings.isEmpty(theme.config.top.BannerLeft.bannersTitleSmall)}"
|
||||
th:utext="${theme.config.top.BannerLeft.bannersTitleSmall}"></div>
|
||||
</div>
|
||||
|
||||
<div class="tags-group-all">
|
||||
|
||||
<!-- banners 使用默认值-->
|
||||
<div class="tags-group-wrapper" th:if="${#strings.equals(theme.config.top.bannersBackground, 'default')}">
|
||||
<div class="tags-group-wrapper" th:if="${#strings.equals(theme.config.top.BannerLeft.bannersBackground, 'default')}">
|
||||
<div class="tags-group-icon-pair">
|
||||
<div class="tags-group-icon" style="background:#989bf8">
|
||||
<img th:src="@{/assets/images/icons/AfterEffect.png}" title="AfterEffect">
|
||||
|
@ -133,7 +133,7 @@
|
|||
|
||||
<!-- banners 使用默认值-->
|
||||
<div class="tags-group-wrapper"
|
||||
th:if="${#strings.equals(theme.config.top.bannersBackground, 'techStack')}"
|
||||
th:if="${#strings.equals(theme.config.top.BannerLeft.bannersBackground, 'techStack')}"
|
||||
th:with="techs = ${theme.config.about.techStack}">
|
||||
<th:block th:each="tech,iterStat : ${techs}">
|
||||
<div class="tags-group-icon-pair" th:if="${iterStat.odd}">
|
||||
|
@ -163,19 +163,19 @@
|
|||
<div class="categoryGroup">
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-blue)">
|
||||
<a class="categoryButton CB1 bikan"
|
||||
th:href="@{${theme.config.top.bikan}}">
|
||||
th:href="@{${theme.config.top.BannerLeft.bikan}}">
|
||||
<span class="categoryButtonText">必看精选</span><i class="iconfont icon-book"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-red)">
|
||||
<a class="categoryButton remen"
|
||||
th:href="@{${theme.config.top.remen}}">
|
||||
th:href="@{${theme.config.top.BannerLeft.remen}}">
|
||||
<span class="categoryButtonText">热门文章</span><i class="iconfont icon-burn"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="categoryItem" style="box-shadow:var(--heo-shadow-green)">
|
||||
<a class="categoryButton shiyong"
|
||||
th:href="@{${theme.config.top.shiyong}}">
|
||||
th:href="@{${theme.config.top.BannerLeft.shiyong}}">
|
||||
<span class="categoryButtonText">实用教程</span><i class="iconfont icon-book"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<!--<div class="console-btn-item" id="assist-open" onclick="heo.hideConsole()" title="无障碍工具栏"><a-->
|
||||
<!-- class="assist-btn"><i class="fa-duotone fa-wheelchair"></i></a>-->
|
||||
<!--</div>-->
|
||||
<div th:if="${theme.config.other.nav_musicEnable}" class="console-btn-item" id="consoleMusic" onclick="heo.musicToggle()" title="音乐开关">
|
||||
<div th:if="${theme.config.tool.nav_music.nav_musicEnable}" class="console-btn-item" id="consoleMusic" onclick="heo.musicToggle()" title="音乐开关">
|
||||
<a class="music-switch" data-pjax-state="">
|
||||
<i class="anzhiyufont anzhiyu-icon-music"></i>
|
||||
</a>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<!-- 返回主页 -->
|
||||
<!-- 这里可以指定使用什么作为图标,默认使用站点名称 -->
|
||||
<a href="/" id="site-name" title="返回博客主页">
|
||||
<span th:utext="${#strings.isEmpty(theme.config.nav.siteTitle)} ? ${site.title} : ${theme.config.nav.siteTitle}"></span>
|
||||
<span th:utext="${#strings.isEmpty(theme.config.basics.siteTitle)} ? ${site.title} : ${theme.config.basics.siteTitle}"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<!-- 功能都需要添加开关 -->
|
||||
|
||||
<!-- 随机前往一个开往项目网站 -->
|
||||
<div class="nav-button only-home" id="travellings_button" th:if="${theme.config.nav.travelling}">
|
||||
<a class="site-page" th:href="@{${theme.config.nav.travellingUrl}}" target="_blank" rel="external nofollow"
|
||||
<div class="nav-button only-home" id="travellings_button" th:if="${theme.config.nav.right.travelling}">
|
||||
<a class="site-page" th:href="@{${theme.config.nav.right.travellingUrl}}" target="_blank" rel="external nofollow"
|
||||
title="随机前往一个开往项目网站">
|
||||
<i class="anzhiyufont anzhiyu-icon-train" style="font-size: 1rem; font-weight: 700; "></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-button only-home" th:if="${theme.config.nav.article}">
|
||||
<div class="nav-button only-home" th:if="${theme.config.nav.right.article}">
|
||||
<a class="site-page" href="javascript:void(0);" onclick="toRandomPost()" title="随机文章">
|
||||
<i class="anzhiyufont anzhiyu-icon-dice" style="font-size: 1rem; font-weight: 700;"></i>
|
||||
</a>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
>
|
||||
<div class="recent-post-item"
|
||||
th:each="post : ${topGroupPosts}"
|
||||
th:if="${#strings.equals(theme.config.top.recommendPost, 'latest')}">
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.todayRecommendContent.recommendPost, 'latest')}">
|
||||
|
||||
<div class="post_cover">
|
||||
<a th:href="@{${post.status.permalink}}" th:title="${post.spec.title}">
|
||||
|
@ -29,8 +29,8 @@
|
|||
</div>
|
||||
<!-- 自定义的文章右上角的推荐文章 -->
|
||||
<div class="recent-post-item"
|
||||
th:each="cuscomPost : ${theme.config.top.recommendPostCustom}"
|
||||
th:if="${#strings.equals(theme.config.top.recommendPost, 'custom')}">
|
||||
th:each="cuscomPost : ${theme.config.top.BannerRight.todayRecommendContent.recommendPostCustom}"
|
||||
th:if="${#strings.equals(theme.config.top.BannerRight.todayRecommendContent.recommendPost, 'custom')}">
|
||||
<div class="post_cover">
|
||||
<a th:href="@{${cuscomPost.url}}" th:title="${cuscomPost.title}">
|
||||
<span class="recent-post-top-text"
|
||||
|
@ -52,14 +52,14 @@
|
|||
|
||||
<!-- 今日推荐 -->
|
||||
<div class="todayCard" id="todayCard"
|
||||
th:if="${theme.config.top.todayRecommend}"
|
||||
th:attr="onclick='javascript:pjax.loadUrl(\''+ ${theme.config.top.todayRecommendContent.todayRecommendUrl} +'\')'">
|
||||
th:if="${theme.config.top.BannerRight.todayRecommend}"
|
||||
th:attr="onclick='javascript:pjax.loadUrl(\''+ ${theme.config.top.BannerRight.todayRecommendContent.todayRecommendUrl} +'\')'">
|
||||
<div class="todayCard-info">
|
||||
<div class="todayCard-tips" th:text="${theme.config.top.todayRecommendContent.todayRecommendxTitle}"></div>
|
||||
<div class="todayCard-title" th:text="${theme.config.top.todayRecommendContent.todayRecommendTitle}"></div>
|
||||
<div class="todayCard-tips" th:text="${theme.config.top.BannerRight.todayRecommendContent.todayRecommendxTitle}"></div>
|
||||
<div class="todayCard-title" th:text="${theme.config.top.BannerRight.todayRecommendContent.todayRecommendTitle}"></div>
|
||||
</div>
|
||||
<div class="todayCard-cover"
|
||||
th:style="'background:url('+ ${theme.config.top.todayRecommendContent.todayRecommendCover} +') no-repeat center/cover'">
|
||||
th:style="'background:url('+ ${theme.config.top.BannerRight.todayRecommendContent.todayRecommendCover} +') no-repeat center/cover'">
|
||||
</div>
|
||||
<div class="banner-button-group">
|
||||
<a class="banner-button" onclick="window.event.cancelBubble=!0;heo.hideTodayCard()">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div id="anMusicRefreshBtn"><i class="anzhiyufont anzhiyu-icon-arrows-rotate"></i></div>
|
||||
<div id="anMusicSwitching"><i class="anzhiyufont anzhiyu-icon-repeat"></i></div> -->
|
||||
<div id="anMusic-page-meting">
|
||||
<meting-js th:id="${theme.config.other.nav_music.id}" th:server="${theme.config.other.nav_music.server}" type="playlist" mutex="true" preload="auto"
|
||||
<meting-js th:id="${theme.config.tool.nav_music.id}" th:server="${theme.config.tool.nav_music.server}" type="playlist" mutex="true" preload="auto"
|
||||
theme="var(--heo-main)" order="list" list-max-height="calc(100vh - 169px)!important">
|
||||
</meting-js>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 侧栏 -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.pageWidgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.pageWidgets})}"></div>
|
||||
|
||||
</main>
|
||||
<!-- 底部 -->
|
||||
|
|
|
@ -99,14 +99,14 @@
|
|||
|
||||
|
||||
<!-- 文章ai摘要 -->
|
||||
<div class="post-ai" th:if="${theme.config.aiDescription.enable}">
|
||||
<div class="post-ai" th:if="${theme.config.post.aiDescription.aiDescriptionEnable}">
|
||||
<div class="ai-title"><i class="anzhiyufont anzhiyu-icon-bilibili"></i>
|
||||
<div class="ai-title-text">AI-摘要</div>
|
||||
<div th:if="${theme.config.aiDescription.switchBtn}" id="ai-Toggle">切换</div>
|
||||
<div th:if="${theme.config.post.aiDescription.switchBtn}" id="ai-Toggle">切换</div>
|
||||
<i class="anzhiyufont anzhiyu-icon-arrow-rotate-right"></i>
|
||||
|
||||
<div th:if="${#strings.equals(theme.config.aiDescription.mode, 'local')}" class="ai-tag" id="ai-tag">[[${theme.config.aiDescription.gptName}]] GPT</div>
|
||||
<div th:if="${#strings.equals(theme.config.aiDescription.mode, 'tianli')}" class="ai-tag" id="ai-tag">Tianli GPT</div>
|
||||
<div th:if="${#strings.equals(theme.config.post.aiDescription.mode, 'local')}" class="ai-tag" id="ai-tag">[[${theme.config.post.aiDescription.gptName}]] GPT</div>
|
||||
<div th:if="${#strings.equals(theme.config.post.aiDescription.mode, 'tianli')}" class="ai-tag" id="ai-tag">Tianli GPT</div>
|
||||
</div>
|
||||
<div class="ai-explanation" style="display: block;">AI初始化中...</div>
|
||||
<div class="ai-btn-box">
|
||||
|
@ -206,7 +206,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 版权声明 -->
|
||||
<div class="post-copyright" th:if="${theme.config.post.copyright}">
|
||||
<div class="post-copyright" th:if="${theme.config.post.copyrights.enable}">
|
||||
<div class="post-copyright__author">
|
||||
<!-- 版权页 以及版权描述文字 -->
|
||||
<a class="post-copyright__original" th:href="@{${theme.config.basics.copyrightAgreement}}"
|
||||
|
@ -222,7 +222,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="post-copyright__notice">
|
||||
<span class="post-copyright-info" th:utext="${theme.config.post.copyrightInfo}"></span>
|
||||
<span class="post-copyright-info" th:utext="${theme.config.post.copyrights.content}"></span>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="pagination-post" id="pagination"
|
||||
|
@ -293,7 +293,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 侧栏 -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.postWidgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.postWidgets})}"></div>
|
||||
</main>
|
||||
|
||||
<!-- 底部 -->
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<div th:replace="~{modules/widgets/page :: page(${'/tags/'+tag.spec.slug},${posts})}"></div>
|
||||
</div>
|
||||
<!-- sidebar -->
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.tagWidgets})}"></div>
|
||||
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.tagWidgets})}"></div>
|
||||
</main>
|
||||
|
||||
<!-- 底部 -->
|
||||
|
|
Loading…
Reference in New Issue