Merge pull request #102 from jiewenhuang/dev

update:v1.1.2
This commit is contained in:
Jevon 2023-09-27 22:32:19 +08:00 committed by GitHub
commit 2efa2e6234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 190 additions and 98 deletions

View File

@ -1,6 +1,6 @@
{
"name": "halo-theme-joe3.0",
"version": "1.1.1",
"version": "1.1.2",
"description": "Theme of Halo2",
"devDependencies": {
"uglify-js": "^3.17.4"

View File

@ -38,6 +38,23 @@ spec:
label: Waline 服务端地址
value: ""
help: "Waline 服务端地址,如 https://waline-server.herokuapp.com 不要加结尾反斜杠"
- $formkit: radio
name: enable_source_link
id: enable_source_link
label: "是否使用外部资源地址"
help: "使用外部请将整个assets目录上传"
value: false
options:
- value: false
label: 默认
- value: true
label: 外部
- $formkit: text
name: source_link
label: 外部资源地址
value: ""
help: "如果你的资源地址是https://example.com/assets/js/min/index.min.js那么这里填写https://example.com"
- $formkit: text
name: mode_color_light

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -310,7 +310,7 @@ const commonContext = {
} else {
htmlStr = `
<div class="joe_pdf">
<iframe src="${ThemeConfig.blog_url}/themes/theme-Joe3/assets/lib/pdfjs/web/viewer.html?file=${options.src}" style="width:${options.width};height:${options.height}"></iframe>
<iframe src="${ThemeConfig.BASE_RES_URL}/assets/lib/pdfjs/web/viewer.html?file=${options.src}" style="width:${options.width};height:${options.height}"></iframe>
</div>`;
}
$(item).replaceWith(htmlStr);
@ -537,7 +537,7 @@ const commonContext = {
)
return;
$.getScript(
`/themes/theme-Joe3/assets/lib/3dtag/3dtag.min.js`,
`${ThemeConfig.BASE_RES_URL}/assets/lib/3dtag/3dtag.min.js`,
(_res) => {
const entries = [];
const colors = [
@ -839,7 +839,7 @@ const commonContext = {
)
return;
$.getScript(
`/themes/theme-Joe3/assets/effect/cursor/${ThemeConfig.cursor_effect}.js`
`${ThemeConfig.BASE_RES_URL}/assets/effect/cursor/${ThemeConfig.cursor_effect}.js`
);
},
/* 加载背景特效 */
@ -851,7 +851,7 @@ const commonContext = {
)
return;
$.getScript(
`/themes/theme-Joe3/assets/effect/backdrop/${ThemeConfig.backdrop}.js`
`${ThemeConfig.BASE_RES_URL}/assets/effect/backdrop/${ThemeConfig.backdrop}.js`
);
},
/* 自定义favicon */

View File

@ -235,6 +235,7 @@ document.addEventListener("DOMContentLoaded", () => {
github: "Github仓库",
gitee: "Gitee仓库",
lz: "蓝奏云网盘",
ad: "阿里云盘",
};
this.innerHTML = `
<span class="joe_cloud">
@ -277,7 +278,7 @@ document.addEventListener("DOMContentLoaded", () => {
if (!$comment || !$header) return;
this.$button.addEventListener("click", (e) => {
e.stopPropagation();
if (!Boolean(document.querySelector('[id*="comment-"]'))) {
if (!Boolean(document.querySelector('[id*="comment-"]')) &&!Boolean(document.querySelector("#waline"))) {
Qmsg.warning("评论功能不可用!");
return;
@ -612,6 +613,7 @@ document.addEventListener("DOMContentLoaded", () => {
}
);
customElements.define(
"joe-dplayer",
class JoeDplayer extends HTMLElement {
@ -621,7 +623,7 @@ document.addEventListener("DOMContentLoaded", () => {
src: this.getAttribute("src") || "",
player:
this.getAttribute("player") ||
`/themes/theme-Joe3/assets/lib/dplayer/web/dplayer.html?url=`,
`${ThemeConfig.BASE_RES_URL}/assets/lib/dplayer/web/${ThemeConfig.BASE_RES_URL==='/themes/theme-Joe3'?'dplayer':'dplayer-source'}.html?url=`,
width: this.getAttribute("width") || "100%",
height: this.getAttribute("height") || "500px",
};

File diff suppressed because one or more lines are too long

View File

@ -29,13 +29,13 @@ function getChildren(t,e){for(var s of t.children)if(s.className===e)return s;re
<div class="joe_cloud__logo _${this.options.type}"></div>
<div class="joe_cloud__describe">
<div class="joe_cloud__describe-title">${this.options.title}</div>
<div class="joe_cloud__describe-type">来源${{default:"默认网盘",360:"360网盘",bd:"百度网盘",ty:"天翼网盘",ct:"城通网盘",wy:"微云网盘",github:"Github仓库",gitee:"Gitee仓库",lz:"蓝奏云网盘"}[this.options.type]||"默认网盘"}${this.options.password?" | 提取码:"+this.options.password:""}</div>
<div class="joe_cloud__describe-type">来源${{default:"默认网盘",360:"360网盘",bd:"百度网盘",ty:"天翼网盘",ct:"城通网盘",wy:"微云网盘",github:"Github仓库",gitee:"Gitee仓库",lz:"蓝奏云网盘",ad:"阿里云盘"}[this.options.type]||"默认网盘"}${this.options.password?" | 提取码:"+this.options.password:""}</div>
</div>
<a class="joe_cloud__btn" href="${this.options.url}" target="_blank" rel="noopener noreferrer nofollow">
<i class="fa fa-download"></i>
</a>
</span>
`}}),customElements.define("joe-read-limited",class extends HTMLElement{constructor(){super(),this.render()}render(){this.innerHTML='<div class="joe_read_limited"><p><i class="joe-font joe-icon-locker" style="color:#f5840d;"></i>&nbsp;此处内容仅 <span class="joe_read_limited__button">评论</span> 后可见</p></div>',this.$button=this.querySelector(".joe_read_limited__button");const e=document.querySelector(".joe_comment"),s=document.querySelector(".joe_header");var t=$(".joe_detail").attr("data-cid");console.log(t),e&&s&&this.$button.addEventListener("click",t=>{t.stopPropagation(),Boolean(document.querySelector('[id*="comment-"]'))?(t=e.offsetTop-s.offsetHeight-15,$("html,body").animate({scrollTop:t},500)):Qmsg.warning("评论功能不可用!")})}}),customElements.define("joe-card-default",class extends HTMLElement{constructor(){super();var t,e=getChildren(this,"_temp"),e=(this.options={width:this.getAttribute("width")||"100%",label:this.getAttribute("label")||"卡片标题",content:e.innerHTML.trim().replace(/^(<br>)|(<br>)$/g,"")||"卡片内容"},`
`}}),customElements.define("joe-read-limited",class extends HTMLElement{constructor(){super(),this.render()}render(){this.innerHTML='<div class="joe_read_limited"><p><i class="joe-font joe-icon-locker" style="color:#f5840d;"></i>&nbsp;此处内容仅 <span class="joe_read_limited__button">评论</span> 后可见</p></div>',this.$button=this.querySelector(".joe_read_limited__button");const e=document.querySelector(".joe_comment"),s=document.querySelector(".joe_header");var t=$(".joe_detail").attr("data-cid");console.log(t),e&&s&&this.$button.addEventListener("click",t=>{t.stopPropagation(),Boolean(document.querySelector('[id*="comment-"]'))||Boolean(document.querySelector("#waline"))?(t=e.offsetTop-s.offsetHeight-15,$("html,body").animate({scrollTop:t},500)):Qmsg.warning("评论功能不可用!")})}}),customElements.define("joe-card-default",class extends HTMLElement{constructor(){super();var t,e=getChildren(this,"_temp"),e=(this.options={width:this.getAttribute("width")||"100%",label:this.getAttribute("label")||"卡片标题",content:e.innerHTML.trim().replace(/^(<br>)|(<br>)$/g,"")||"卡片内容"},`
<div class="joe_card__default" style="width: ${this.options.width}">
<div class="joe_card__default-title">${this.options.label}</div>
<div class="joe_card__default-content">${this.options.content}</div>
@ -81,7 +81,7 @@ function getChildren(t,e){for(var s of t.children)if(s.className===e)return s;re
<div class="joe_collapse__item-wrapper--content">${s.trim().replace(/^(<br>)|(<br>)$/g,"")}</div>
</div>
</div>
`});var e,t=`<div class="joe_collapse">${i}</div>`;getChildren(this,"_content")?getChildren(this,"_content").innerHTML=t:((e=document.createElement("span")).className="_content",e.style.display="block",e.innerHTML=t,this.appendChild(e)),this.querySelectorAll(".joe_collapse__item").forEach(s=>{var t=s.getAttribute("label")||"",e=getChildren(s,"joe_collapse__item-head");getChildren(e,"joe_collapse__item-head--label").innerHTML=t;const i=getChildren(s,"joe_collapse__item-wrapper"),n=getChildren(i,"joe_collapse__item-wrapper--content");null!==s.getAttribute("open")&&(s.classList.add("active"),i.style.maxHeight="none"),e.addEventListener("click",t=>{t.stopPropagation(),i.style.maxHeight=n.offsetHeight+"px";let e=setTimeout(()=>{s.classList.contains("active")?(s.classList.remove("active"),i.style.maxHeight=0):(s.classList.add("active"),i.style.maxHeight=n.offsetHeight+"px"),clearTimeout(e),e=null},30)})})}}),customElements.define("joe-dplayer",class extends HTMLElement{constructor(){super(),this.options={src:this.getAttribute("src")||"",player:this.getAttribute("player")||"/themes/theme-Joe3/assets/lib/dplayer/web/dplayer.html?url=",width:this.getAttribute("width")||"100%",height:this.getAttribute("height")||"500px"},this.render()}render(){this.options.src?this.innerHTML=`<iframe allowfullscreen="true" class="joe_vplayer" src="${this.options.player+this.options.src}" style="width:${this.options.width};height:${this.options.height}"></iframe>`:this.innerHTML=""}}),customElements.define("joe-bilibili",class extends HTMLElement{constructor(){super(),this.options={bvid:this.getAttribute("bvid"),page:+(this.getAttribute("page")||"1"),width:this.getAttribute("width")||"100%",height:this.getAttribute("height")||"500px"},this.render()}render(){this.options.bvid?this.innerHTML=`<iframe allowfullscreen="true" class="joe_vplayer" src="//player.bilibili.com/player.html?bvid=${this.options.bvid}&page=${this.options.page}" style="width:${this.options.width};height:${this.options.height}"></iframe>`:this.innerHTML="bvid"}}),customElements.define("joe-raw-content",class extends HTMLElement{constructor(){super(),this.options={content:this.querySelector("#_raw"),width:this.getAttribute("width")||"unset",height:this.getAttribute("height")||"unset"},this.render()}render(){this.options.content&&this.attachShadow({mode:"closed"}).appendChild(this.options.content)}}),customElements.define("joe-tabs",class extends HTMLElement{constructor(){super();var t=getChildren(this,"_tpl"),e=t.innerHTML.trim().replace(/^(<br>)|(<br>)$/g,"");let i="",n="";e.replace(/{tabs-pane([^}]*)}([\s\S]*?){\/tabs-pane}/g,function(t,e,s){i+=`<div class="joe_tabs__head-item" label="${e}"></div>`,n+=`<div style="display: none" class="joe_tabs__body-item" label="${e}">${s.trim().replace(/^(<br>)|(<br>)$/g,"")}</div>`});var s,e=`
`});var e,t=`<div class="joe_collapse">${i}</div>`;getChildren(this,"_content")?getChildren(this,"_content").innerHTML=t:((e=document.createElement("span")).className="_content",e.style.display="block",e.innerHTML=t,this.appendChild(e)),this.querySelectorAll(".joe_collapse__item").forEach(s=>{var t=s.getAttribute("label")||"",e=getChildren(s,"joe_collapse__item-head");getChildren(e,"joe_collapse__item-head--label").innerHTML=t;const i=getChildren(s,"joe_collapse__item-wrapper"),n=getChildren(i,"joe_collapse__item-wrapper--content");null!==s.getAttribute("open")&&(s.classList.add("active"),i.style.maxHeight="none"),e.addEventListener("click",t=>{t.stopPropagation(),i.style.maxHeight=n.offsetHeight+"px";let e=setTimeout(()=>{s.classList.contains("active")?(s.classList.remove("active"),i.style.maxHeight=0):(s.classList.add("active"),i.style.maxHeight=n.offsetHeight+"px"),clearTimeout(e),e=null},30)})})}}),customElements.define("joe-dplayer",class extends HTMLElement{constructor(){super(),this.options={src:this.getAttribute("src")||"",player:this.getAttribute("player")||`${ThemeConfig.BASE_RES_URL}/assets/lib/dplayer/web/${"/themes/theme-Joe3"===ThemeConfig.BASE_RES_URL?"dplayer":"dplayer-source"}.html?url=`,width:this.getAttribute("width")||"100%",height:this.getAttribute("height")||"500px"},this.render()}render(){this.options.src?this.innerHTML=`<iframe allowfullscreen="true" class="joe_vplayer" src="${this.options.player+this.options.src}" style="width:${this.options.width};height:${this.options.height}"></iframe>`:this.innerHTML=""}}),customElements.define("joe-bilibili",class extends HTMLElement{constructor(){super(),this.options={bvid:this.getAttribute("bvid"),page:+(this.getAttribute("page")||"1"),width:this.getAttribute("width")||"100%",height:this.getAttribute("height")||"500px"},this.render()}render(){this.options.bvid?this.innerHTML=`<iframe allowfullscreen="true" class="joe_vplayer" src="//player.bilibili.com/player.html?bvid=${this.options.bvid}&page=${this.options.page}" style="width:${this.options.width};height:${this.options.height}"></iframe>`:this.innerHTML="bvid"}}),customElements.define("joe-raw-content",class extends HTMLElement{constructor(){super(),this.options={content:this.querySelector("#_raw"),width:this.getAttribute("width")||"unset",height:this.getAttribute("height")||"unset"},this.render()}render(){this.options.content&&this.attachShadow({mode:"closed"}).appendChild(this.options.content)}}),customElements.define("joe-tabs",class extends HTMLElement{constructor(){super();var t=getChildren(this,"_tpl"),e=t.innerHTML.trim().replace(/^(<br>)|(<br>)$/g,"");let i="",n="";e.replace(/{tabs-pane([^}]*)}([\s\S]*?){\/tabs-pane}/g,function(t,e,s){i+=`<div class="joe_tabs__head-item" label="${e}"></div>`,n+=`<div style="display: none" class="joe_tabs__body-item" label="${e}">${s.trim().replace(/^(<br>)|(<br>)$/g,"")}</div>`});var s,e=`
<div class="joe_tabs">
<div class="joe_tabs__head">${i}</div>
<div class="joe_tabs__body">${n}</div>

File diff suppressed because one or more lines are too long

View File

@ -314,7 +314,7 @@ const postContext = {
const $header = document.querySelector(".joe_header");
if (!$comment || !$header) return;
e.stopPropagation();
if (!Boolean(document.querySelector('[id*="comment-"]'))) {
if (!Boolean(document.querySelector('[id*="comment-"]'))&& !Boolean(document.querySelector("#waline"))) {
Qmsg.warning("评论功能不可用!");
return;
}

View File

@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="renderer" content="webkit" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover" />
<title>DPlayer</title>
<style>
* {
margin: 0;
padding: 0;
-webkit-tap-highlight-color: transparent;
outline: none;
text-decoration: none;
}
html,
body,
#dplayer {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="dplayer"></div>
<script src="/assets/lib/hls/hls.min.js"></script>
<script src="/assets/lib/dplayer/DPlayer.min.js"></script>
<script>
var getUrlParams = function (key) {
var search = location.search;
// 判断是否为字符串类型
if (typeof search !== "string") {
search = search.toString();
}
var paramsSplit = search.replace(/^[^\?]*\?/i, "").split(/&/);
var params = {};
// 数据为空
if (paramsSplit.length < 1) {
return params;
}
if (Array.isArray(paramsSplit)) {
paramsSplit.forEach(function (item) {
// 数据为空, 退出方法
if (!item) {
return false;
}
var itemSplit = item.split(/=/);
// 判断字符串中是否有多个=
if (itemSplit.length >= 2) {
// 是
var key = itemSplit.splice(0, 1);
params[key] = itemSplit.join("=");
}
});
}
return key ? params[key] : params;
}
new DPlayer({
container: document.getElementById('dplayer'), // 播放器容器元素
autoplay: false, // 视频自动播放
theme: '#409eff', // 主题色
loop: false, // 视频循环播放
screenshot: false, // 开启截图,如果开启,视频和视频封面需要允许跨域
airplay: true, // 在 Safari 中开启 AirPlay
volume: 0.5, // 默认音量,请注意播放器会记忆用户设置,用户手动设置音量后默认音量即失效
playbackSpeed: [2, 1.5, 1.25, 1], // 可选的播放速率,可以设置成自定义的数组
video: {
url: getUrlParams('url')
}
})
</script>
</body>
</html>

View File

@ -80,14 +80,7 @@
<span class="num">0</span>
<span>评论数</span>
</div>
<script th:inline="javascript">
const url = [[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]];
fetch(url).then(async (response) => {
const data = await response.json();
document.querySelector('.waline-comment .num').innerHTML = data.data;
document.querySelector('.waline-comment').title = '累计评论数:'+data.data;
});
</script>
</th:block>
</th:block>
<!-- 搭配C-->
@ -111,14 +104,7 @@
<span class="num">0</span>
<span>评论数</span>
</div>
<script th:inline="javascript">
const url = [[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]];
fetch(url).then(async (response) => {
const data = await response.json();
document.querySelector('.waline-comment .num').innerHTML = data.data;
document.querySelector('.waline-comment').title = '累计评论数:'+data.data;
});
</script>
</th:block>
</th:block>
<!-- 搭配D-->
@ -147,14 +133,7 @@
<span class="num">0</span>
<span>评论数</span>
</div>
<script th:inline="javascript">
const url = [[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]];
fetch(url).then(async (response) => {
const data = await response.json();
document.querySelector('.waline-comment .num').innerHTML = data.data;
document.querySelector('.waline-comment').title = '累计评论数:'+data.data;
});
</script>
</th:block>
</th:block>
</div>
@ -178,6 +157,14 @@
<th:block th:if="${theme.config.blogger.enable_strips}">
<canvas id="canvas-strips" width="300" height="340"></canvas>
<script th:src="@{/assets/effect/bg/strips.js}"></script>
<script th:inline="javascript">
const url = [[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]];
fetch(url).then(async (response) => {
const data = await response.json();
document.querySelector('.waline-comment .num').innerHTML = data.data;
document.querySelector('.waline-comment').title = '累计评论数:'+data.data;
});
</script>
</th:block>
</section>
</th:block>

View File

@ -23,7 +23,7 @@
src: url("[[${theme.config.custom.custom_font}]]") format("woff2");
[/]
[# th:if="${theme.config.theme.web_font != 'off'} and (${theme.config.custom.custom_font != null} or ${theme.config.custom.custom_font != ''})"]
src: url("/themes/theme-Joe3/assets/[[${theme.config.theme.web_font}]]") format("woff2");
src: url("[[${(#strings.trim(theme.config.basic.source_link) !='' && theme.config.basic.enable_source_link)? theme.config.basic.source_link : '/themes/theme-Joe3'}]]/assets/[[${theme.config.theme.web_font}]]") format("woff2");
[/]
}

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="links">
<th:block th:fragment="links" th:with="source_link=${(#strings.trim(theme.config.basic.source_link) !='' && theme.config.basic.enable_source_link)? theme.config.basic.source_link : '/themes/theme-Joe3'}">
<!-- <th:block th:replace="~{modules/themeSettingVariable :: themeSetting}" />-->
<!-- <th:block th:if="${htmlType == 'post'}">-->
<!-- <th:block th:replace="~{modules/postMetaVariable :: postSetting}" />-->
@ -11,7 +11,7 @@
<th:block th:replace="~{modules/key_css :: key_css}" />
<th:block th:if="${theme.config.theme.enable_loading_bar}">
<!-- 加载条 -->
<link rel="stylesheet" th:href="@{/assets/lib/nprogress/nprogress.min.css}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/nprogress/nprogress.min.css'}">
<style th:inline="text">
#nprogress .bar {
height: [[${theme.config.theme.loading_bar_height ?: '3px'}]];
@ -21,16 +21,16 @@
display: none;
}
</style>
<script th:src="@{/assets/lib/nprogress/nprogress.min.js}"></script>
<script th:src="${source_link+'/assets/lib/nprogress/nprogress.min.js'}"></script>
</th:block>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/normalize.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/font-awesome/css/font-awesome.min.css}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/normalize.min.css?v='+theme.spec.version}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/lib/font-awesome/css/font-awesome.min.css'}">
<link rel="preload stylesheet" as="style" href="//at.alicdn.com/t/font_2788564_crkap1ed9j5.css">
<link rel="preload stylesheet" as="style" href="//at.alicdn.com/t/c/font_4198339_jcoci5bgy7.css">
<th:block th:if="${theme.config.custom.iconfont != '' and theme.config.custom.iconfont != null}">
<link rel="stylesheet" th:href="${theme.config.custom.iconfont}">
</th:block>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/theme.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/theme.min.css?v='+theme.spec.version}">
<style th:inline="text">
#Joe .joe_container {
max-width: [[${theme.config.basic.content_max_width+'px'}]] !important;
@ -47,42 +47,42 @@
}
}
</style>
<link rel="stylesheet" th:href="@{/assets/lib/qmsg/qmsg.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/animate/animate.min.css}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/qmsg/qmsg.css'}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/lib/animate/animate.min.css'}">
<th:block th:if="${htmlType == 'index'} and ${theme.config.carousel.enable_banner}">
<link rel="stylesheet" th:href="@{/assets/lib/swiper/swiper-bundle.min.css}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/swiper/swiper-bundle.min.css'}">
</th:block>
<th:block th:if="${htmlType == 'post' or tmlType == 'journals' or tmlType == 'sheet'}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/prism/prism.min.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/prism/themes}+'/prism-'+${theme.config.code_block.code_theme}+'.css'">
<th:block th:if="${htmlType == 'post' or htmlType == 'journals' or htmlType == 'sheet'}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/lib/prism/prism.min.css'}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/lib/prism/themes'+'/prism-'+theme.config.code_block.code_theme+'.css'}">
</th:block>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/global.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/global.min.css?v='+theme.spec.version}">
<th:block th:if="${htmlType == 'index'}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/index.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/index.min.css?v='+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'post'}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/post.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/post.min.css?v='+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'journals'}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/journals.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/journals.min.css?v='+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'archives'}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/archives.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="¥{source_link+/assets/css/min/archives.min.css?v=+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'photos'}">
<link rel="stylesheet" th:href="@{/assets/lib/justifiedGallery/justifiedGallery.min.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/photos.min.css?v={version}(version=${theme.spec.version})}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/justifiedGallery/justifiedGallery.min.css'}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/photos.min.css?v='+theme.spec.version}">
</th:block>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/responsive.min.css?v={version}(version=${theme.spec.version})}">
<link rel="stylesheet" th:href="@{/assets/lib/fancybox/jquery.fancybox.min.css}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/responsive.min.css?v='+theme.spec.version}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/fancybox/jquery.fancybox.min.css'}">
<link
rel="stylesheet"
href="https://unpkg.com/@waline/client@v2/dist/waline.css"
/>
<th:block th:if="${ttheme.config.other.enable_clean_mode != true} and ${theme.config.theme.cursor_skin != 'off'}">
<link rel="stylesheet" th:href="@{/assets/cursor/style/min}+'/'+${theme.config.theme.cursor_skin}+'.min.css'">
<link rel="stylesheet" th:href="${source_link+'/assets/cursor/style/min/'+theme.config.theme.cursor_skin+'.min.css'}">
</th:block>
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/min/beauty.min.css?v={version}(version=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/beauty.min.css?v='+theme.spec.version}">
<style th:if="${theme.config.custom.custom_css != null and theme.config.custom.custom_css != ''}"
th:utext="${theme.config.custom.custom_css}">

View File

@ -1,77 +1,77 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="tail">
<th:block th:fragment="tail" th:with="source_link=${(#strings.trim(theme.config.basic.source_link) !='' && theme.config.basic.enable_source_link)? theme.config.basic.source_link : '/themes/theme-Joe3'}">
<!-- ===== 引入脚本 start ===== -->
<!-- <th:block th:if="${htmlType == 'index' && theme.config.home.enable_index_list_effect == true} or ${htmlType == 'journals' && theme.config.journals.enable_journal_effect == true} or ${htmlType == 'photos' && theme.config.photos.enable_photos_effect == true}">-->
<script th:src="@{/assets/lib/wowjs/wow.min.js}"></script>
<script th:src="${source_link+'/assets/lib/wowjs/wow.min.js'}"></script>
<!-- </th:block>-->
<script th:src="@{/assets/lib/lazysizes/lazysizes.min.js}"></script>
<script th:src="@{/assets/lib/qmsg/qmsg.js}"></script>
<script th:src="${source_link+'/assets/lib/lazysizes/lazysizes.min.js'}"></script>
<script th:src="${source_link+'/assets/lib/qmsg/qmsg.js'}"></script>
<th:block th:if="${theme.config.aside.show_newreply == true} or ${htmlType == 'sheet'}">
<script th:src="@{/assets/lib/j-marked/marked.min.js}"></script>
<script th:src="${source_link+'/assets/lib/j-marked/marked.min.js'}"></script>
</th:block>
<script th:src="@{/assets/js/min/utils.min.js}"></script>
<script th:src="${source_link+'/assets/js/min/utils.min.js'}"></script>
<th:block th:if="${htmlType == 'index' && theme.config.carousel.enable_banner}">
<script th:src="@{/assets/lib/swiper/swiper-bundle.min.js}"></script>
<script th:src="${source_link+'/assets/lib/swiper/swiper-bundle.min.js'}"></script>
</th:block>
<th:block th:if="${htmlType == 'post'} and ${theme.config.post.enable_toc == true}">
<script th:src="@{/assets/lib/tocbot/tocbot.min.js}"></script>
<script th:src="${source_link+'/assets/lib/tocbot/tocbot.min.js'}"></script>
</th:block>
<th:block th:if="${theme.config.other.enable_clean_mode != false && (htmlType =='post' || htmlType =='journals' || htmlType =='sheet')}">
<script th:src="@{/assets/lib/vue@2.6.10/vue.min.js}"></script>
<script th:src="${source_link+'/assets/lib/vue@2.6.10/vue.min.js'}"></script>
</th:block>
<script th:src="@{/assets/lib/fancybox/jquery.fancybox.min.js}"></script>
<script th:src="${source_link+'/assets/lib/fancybox/jquery.fancybox.min.js'}"></script>
<th:block th:each="aside : ${theme.config.aside.enable_outpost_aside}">
<th:block th:if="(${aside.template_aside == 'enable_music_player'} and ${theme.config.aside.music_id != null && theme.config.aside.music_id != ''}) or ${htmlType =='post'}">
<link rel="stylesheet" th:href="@{/assets/lib/APlayer/APlayer.min.css}">
<script th:src="@{/assets/lib/APlayer/APlayer.min.js}"></script>
<script th:src="@{/assets/lib/meting/meting.min.js}"></script>
<link rel="stylesheet" th:href="${source_link+'/assets/lib/APlayer/APlayer.min.css'}">
<script th:src="${source_link+'/assets/lib/APlayer/APlayer.min.js'}"></script>
<script th:src="${source_link+'/assets/lib/meting/meting.min.js'}"></script>
</th:block>
</th:block>
<script th:src="@{/assets/js/min/custom.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/custom.min.js?v='+theme.spec.version}"></script>
<th:block th:if="${htmlType == 'post'} or ${htmlType == 'journals'} or ${htmlType == 'sheet'}">
<script th:src="@{/assets/lib/clipboard/clipboard.min.js}"></script>
<script th:src="${source_link+'/assets/lib/clipboard/clipboard.min.js'}"></script>
</th:block>
<th:block th:if="${theme.config.custom.favicon != null && theme.config.custom.favicon != ''}">
<script th:src="@{/assets/lib/favico/favico.min.js}"></script>
<script th:src="${source_link+'/assets/lib/favico/favico.min.js'}"></script>
</th:block>
<th:block th:if="${htmlType == 'post'}">
<script th:src="@{/assets/lib/jquery-qrcode/jquery.qrcode.min.js}"></script>
<script th:src="${source_link+'/assets/lib/jquery-qrcode/jquery.qrcode.min.js'}"></script>
</th:block>
<!--相册-->
<th:block th:if="${htmlType == 'photos'}">
<script th:src="@{/assets/lib/justifiedGallery/justifiedGallery.min.js}"></script>
<script th:src="${source_link+'/assets/lib/justifiedGallery/justifiedGallery.min.js'}"></script>
</th:block>
<!--===== 引入页面级js start =====-->
<script th:src="@{/assets/js/min/common.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/common.min.js?v='+theme.spec.version}"></script>
<th:block th:if="${htmlType == 'post'} or ${htmlType == 'journals'} or ${htmlType == 'sheet'}">
<script th:src="@{/assets/lib/prism/prism.min.js}"></script>
<script th:src="${source_link+'/assets/lib/prism/prism.min.js'}"></script>
</th:block>
<th:block th:if="${htmlType == 'index'}">
<script th:src="@{/assets/js/min/index.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/index.min.js?v='+theme.spec.version}"></script>
</th:block>
<th:block th:if="${htmlType == 'archives'}">
<script th:src="@{/assets/js/min/archives.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/archives.min.js?v='+theme.spec.version}"></script>
</th:block>
<th:block th:if="${htmlType == 'post'}">
<script th:src="@{/assets/js/min/post.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/post.min.js?v='+theme.spec.version}"></script>
</th:block>
<th:block th:if="${htmlType == 'journals'}">
<script th:src="@{/assets/js/min/journals.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/journals.min.js?v='+theme.spec.version}"></script>
</th:block>
<th:block th:if="${htmlType == 'photos'}">
<script th:src="@{/assets/js/min/photos.min.js?v={version}(version=${theme.spec.version})}"></script>
<script th:src="${source_link+'/assets/js/min/photos.min.js?v='+theme.spec.version}"></script>
</th:block>
<th:block th:if="${htmlType == 'sheet'}">
<script th:src="@{/assets/lib/draggabilly/draggabilly.min.js}"></script>
<script th:src="@{/assets/js/min/leaving.min.js}"></script>
<script th:src="${source_link+'/assets/lib/draggabilly/draggabilly.min.js'}"></script>
<script th:src="${source_link+'/assets/js/min/leaving.min.js'}"></script>
</th:block>
<th:block th:if="${theme.config.beauty.enable_big_banner}">
<script th:src="@{/assets/js/min/beauty.min.js}"></script>
<script th:src="${source_link+'/assets/js/min/beauty.min.js'}"></script>
</th:block>
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
@ -81,7 +81,7 @@
<th:block th:if="${theme.config.footer.enable_busuanzi}">
<!-- 卜算子 -->
<script th:src="@{/assets/lib/busuanzi/busuanzi.min.js}"></script>
<script th:src="${source_link+'/assets/lib/busuanzi/busuanzi.min.js'}"></script>
</th:block>
<!-- ===== 引入脚本 end =====-->
@ -97,7 +97,7 @@
</th:block>
<th:block th:if="${theme.config.other.enable_debug}">
<!-- vconsole -->
<script th:src="@{/assets/lib/vconsole/vconsole.min.js}"></script>
<script th:src="${source_link+'/assets/lib/vconsole/vconsole.min.js'}"></script>
</th:block>
<!--搜索点击-->
<script>

View File

@ -79,9 +79,9 @@
photos_layout : 'waterfall',
blog_url : /*[[${#strings.substring(site.url, #strings.length(site.url) - 1)== '/'}? ${#strings.substring(site.url,0,#strings.length(site.url) - 1)}:${site.url}]]*/ '',
blog_title : /*[[${site.title}]]*/ '',
BASE_RES_URL : '/themes/theme-Joe3',
BASE_RES_URL : /*[[${(#strings.trim(theme.config.basic.source_link) !='' && theme.config.basic.enable_source_link)? theme.config.basic.source_link : '/themes/theme-Joe3'}]]*/'',
BASE_URL : 'https://bbchin.com',
}
//转数字

View File

@ -25,7 +25,12 @@
<div class="item">
<span class="text">[[${#dates.format(singlePage.spec.publishTime,'yyyy-MM-dd')}]]</span>
<span class="line">/</span>
<th:block th:if="${theme.config.basic.comment_option == 'default'} or ${#strings.trim(theme.config.basic.waline_serverURL) ==''}">
<span class="text">[[${singlePage.stats.comment}]] 评论</span>
</th:block>
<th:block th:if="${theme.config.basic.comment_option == 'waline'} and ${#strings.trim(theme.config.basic.waline_serverURL) !=''}">
<span class="text waline-comment-count" th:data-path="@{${singlePage.status.permalink}}">0</span>&nbsp;评论
</th:block>
<span class="line">/</span>
<span class="text" >[[${singlePage.stats.visit}]] 阅读</span>
<span class="line">/</span>
@ -79,8 +84,6 @@
let countNum = 0;
fetch(url).then(async (response) => {
const data = await response.json();
document.querySelector('.waline-comment .num').innerHTML = data.data;
document.querySelector('.waline-comment').title = '累计评论数:'+data.data;
countNum = data.data;
});

View File

@ -13,7 +13,7 @@ spec:
repo: "https://github.com/jiewenhuang/halo-theme-joe3.0"
settingName: "theme-Joe-setting"
configMapName: "theme-Joe-configMap"
version: "1.1.1"
version: "1.1.2"
require: ">=2.8.0"
customTemplates:
page: