Skip to content

Commit

Permalink
Merge pull request #102 from jiewenhuang/dev
Browse files Browse the repository at this point in the history
update:v1.1.2
  • Loading branch information
jiewenhuang committed Sep 27, 2023
2 parents 0bafea9 + b26f6e5 commit 2efa2e6
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 98 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
17 changes: 17 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions templates/assets/css/global.less

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion templates/assets/css/min/global.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions templates/assets/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -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`
);
},
/* 加载背景特效 */
Expand All @@ -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 */
Expand Down
6 changes: 4 additions & 2 deletions templates/assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ document.addEventListener("DOMContentLoaded", () => {
github: "Github仓库",
gitee: "Gitee仓库",
lz: "蓝奏云网盘",
ad: "阿里云盘",
};
this.innerHTML = `
<span class="joe_cloud">
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -612,6 +613,7 @@ document.addEventListener("DOMContentLoaded", () => {
}
);


customElements.define(
"joe-dplayer",
class JoeDplayer extends HTMLElement {
Expand All @@ -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",
};
Expand Down
4 changes: 2 additions & 2 deletions templates/assets/js/min/common.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions templates/assets/js/min/custom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2efa2e6

Please sign in to comment.