Compare commits
10 Commits
4efe429012
...
ae4eb238a7
Author | SHA1 | Date | |
---|---|---|---|
|
ae4eb238a7 | ||
|
427448fea7 | ||
|
a8cf01142f | ||
|
238a442081 | ||
|
7e6ea9151a | ||
|
2854d4c1a5 | ||
|
7d6563a7d0 | ||
|
50596ec29d | ||
|
6e0a72ad93 | ||
|
0da46f418c |
35
.github/ISSUE_TEMPLATE/custom_config.yml
vendored
Normal file
35
.github/ISSUE_TEMPLATE/custom_config.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: 定制化配置
|
||||||
|
description: 提交定制化配置疑问
|
||||||
|
title: 'custom:'
|
||||||
|
labels: [custom]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
id: preface
|
||||||
|
attributes:
|
||||||
|
value: "你好!感谢你为 Dream 提交定制化配置建议。在开始之前,我们非常推荐阅读一遍[《开源最佳实践》](https://github.com/LinuxSuRen/open-source-best-practice),这会在很大程度上提高我们彼此的效率。"
|
||||||
|
- type: markdown
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
value: "## 环境信息"
|
||||||
|
- type: input
|
||||||
|
id: dream-version
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
attributes:
|
||||||
|
label: "你当前使用的 Dream 版本"
|
||||||
|
description: "可以在主题 `theme.yaml` 文件中找到。"
|
||||||
|
- type: markdown
|
||||||
|
id: details
|
||||||
|
attributes:
|
||||||
|
value: "## 详细信息"
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: "描述一下此定制化内容"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: additional-information
|
||||||
|
attributes:
|
||||||
|
label: "补充信息"
|
||||||
|
description: "如果你还有其他需要提供的信息或解决思路,可以在这里填写。"
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "halo-theme-dream2.0",
|
"name": "halo-theme-dream2.0",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "梦之城,童话梦境,动漫类型博客主题。",
|
"description": "梦之城,童话梦境,动漫类型博客主题。",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "nineya",
|
"author": "nineya",
|
||||||
|
@ -453,6 +453,15 @@ spec:
|
|||||||
label: 正文长图折叠
|
label: 正文长图折叠
|
||||||
placeholder: '请输入高度数值(px)'
|
placeholder: '请输入高度数值(px)'
|
||||||
help: '图片高度超出指定高度(px)后默认进行折叠,指定的高度需大于等于 400px。'
|
help: '图片高度超出指定高度(px)后默认进行折叠,指定的高度需大于等于 400px。'
|
||||||
|
- $formkit: radio
|
||||||
|
name: show_img_name
|
||||||
|
label: 显示图片名称
|
||||||
|
value: true
|
||||||
|
options:
|
||||||
|
- value: true
|
||||||
|
label: 开启
|
||||||
|
- value: false
|
||||||
|
label: 关闭
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: invalid_tips_day
|
name: invalid_tips_day
|
||||||
label: 文章失效提示
|
label: 文章失效提示
|
||||||
@ -915,6 +924,16 @@ spec:
|
|||||||
label: 开启全站离线
|
label: 开启全站离线
|
||||||
- value: "uninstall"
|
- value: "uninstall"
|
||||||
label: 卸载
|
label: 卸载
|
||||||
|
- $formkit: radio
|
||||||
|
name: enable_pjax
|
||||||
|
label: Pjax 加载
|
||||||
|
value: false
|
||||||
|
help: '使用Pjax加载可极大提升页面跳转的速度,但可能和部分插件不兼容。'
|
||||||
|
options:
|
||||||
|
- value: true
|
||||||
|
label: 开启
|
||||||
|
- value: false
|
||||||
|
label: 关闭
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: effects_sakura_mode
|
name: effects_sakura_mode
|
||||||
label: 樱花飘落特效显示模式
|
label: 樱花飘落特效显示模式
|
||||||
@ -964,16 +983,6 @@ spec:
|
|||||||
label: 开启
|
label: 开启
|
||||||
- value: false
|
- value: false
|
||||||
label: 关闭
|
label: 关闭
|
||||||
- $formkit: radio
|
|
||||||
name: enable_patch
|
|
||||||
label: 补丁模式
|
|
||||||
value: true
|
|
||||||
help: '引入补丁脚本,实现对部分异常不更新主题进行 bug 修复!'
|
|
||||||
options:
|
|
||||||
- value: true
|
|
||||||
label: 开启
|
|
||||||
- value: false
|
|
||||||
label: 关闭
|
|
||||||
- $formkit: radio
|
- $formkit: radio
|
||||||
name: enable_busuanzi
|
name: enable_busuanzi
|
||||||
label: 开启 busuanzi 访客统计
|
label: 开启 busuanzi 访客统计
|
||||||
|
@ -62,7 +62,7 @@ const commonContext = {
|
|||||||
$('.main-content img:not(.not-gallery)').each(function () {
|
$('.main-content img:not(.not-gallery)').each(function () {
|
||||||
if ($(this).parents('[data-fancybox],mew-photos').length === 0) {
|
if ($(this).parents('[data-fancybox],mew-photos').length === 0) {
|
||||||
$(this).wrap(`<div class="gallery-item"><div data-fancybox="gallery" ${this.alt ? `data-caption="${this.alt}"` : ''} href="${$(this).attr('src')
|
$(this).wrap(`<div class="gallery-item"><div data-fancybox="gallery" ${this.alt ? `data-caption="${this.alt}"` : ''} href="${$(this).attr('src')
|
||||||
}"></div>${this.alt ? `<p>${this.alt}</p>` : ''}</div>`)
|
}"></div>${(this.alt && DreamConfig.show_img_name) ? `<p>${this.alt}</p>` : ''}</div>`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -412,7 +412,7 @@ const commonContext = {
|
|||||||
let target = $(this).attr('data-target')
|
let target = $(this).attr('data-target')
|
||||||
let id = $(this).attr('data-id')
|
let id = $(this).attr('data-id')
|
||||||
CommentWidget.init(
|
CommentWidget.init(
|
||||||
`.widget-comment[data-id=${id}][data-target=${target}]`,
|
`.widget-comment[data-id='${id}'][data-target='${target}']`,
|
||||||
'/plugins/PluginCommentWidget/assets/static/style.css',
|
'/plugins/PluginCommentWidget/assets/static/style.css',
|
||||||
{
|
{
|
||||||
group: 'content.halo.run',
|
group: 'content.halo.run',
|
||||||
|
@ -188,6 +188,19 @@ const postContext = {
|
|||||||
localStorage.setItem(name, encrypt(JSON.stringify(commentIds)))
|
localStorage.setItem(name, encrypt(JSON.stringify(commentIds)))
|
||||||
}
|
}
|
||||||
postContextInitial = true
|
postContextInitial = true
|
||||||
|
},
|
||||||
|
/* 初始化公式 */
|
||||||
|
initKatex() {
|
||||||
|
let $mainContent = $('.main-content')
|
||||||
|
if (!window.katex && $mainContent.length !== 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$mainContent.find('.katex--inline').each(function (index, domEle) {
|
||||||
|
katex.render(domEle.innerText, domEle, { displayMode: false })
|
||||||
|
})
|
||||||
|
$mainContent.find('.katex--display').each(function (index, domEle) {
|
||||||
|
katex.render(domEle.innerText, domEle, { displayMode: true })
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.postPjax = function (serialNumber) {
|
window.postPjax = function (serialNumber) {
|
||||||
|
2
templates/assets/js/common.min.js
vendored
2
templates/assets/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
2
templates/assets/js/post.min.js
vendored
2
templates/assets/js/post.min.js
vendored
@ -1 +1 @@
|
|||||||
(()=>{let t=!1;const a={initCodeBlock(){var e=$("*:not(figure) > pre > code");0!==e.length&&e.each(function(e){var t=$(this).parent();let i=$(this).attr("class"),n="",a=!1,o=!1;if(null!=i){var s=i.match(/[|<](.*)$/),l=i.match(/:select/);if(s||l){let e=0;l&&(e=l.index,s?s[1].endsWith(l[0])&&(s[1]=s[1].substring(0,s[1].length-l[0].length)):n=i.substring(9,l.index),a=!0),s&&(e=s.index<e?s.index:e,"<"===s[0][0]&&(o=!0),n=s[1]),$(this).attr("class",i.substring(0,e)),n=n||i.substring(9,e)}else n=i.substring(9)}let r=$(this).text().split("\n")||[],d=r.length-1,c=String(d).length,g=(1===c&&(c=2),"");for(var p=0;p<d;p++)g+=`<li ${a&&/^\s*\|\+\s+/.test(r[p])?'class="code-select"':""}>${String(p+1).padStart(c,0)}</li>`;a&&$(this).text($(this).text().replace(/(^\s*)\|\+\s/gm,"$1"));let h=`codeBlock${e}-`+(new Date).getTime(),f="";o&&(f=" close",$(this).parent().hide());l=`<div><i class="fa fa-angle-down${f}" data-code='#${h}'></i><i class="fa fa-clone btn-clipboard" title="复制代码" data-clipboard-target='#${h}'></i></div>`;$(this).attr("id",h),t.prepend(`<ul>${g}</ul>`),d>DreamConfig.code_fold_line?t.wrap('<figure class="fold hljs"></figure>').append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):t.wrap('<figure class="hljs"></figure>'),t.parent().prepend(`<figcaption>${n}${l}</figcaption>`)})},initLiterature(){$(".literature-content>p:not([class]),.literature-content>mew-hide>p:not([class])").each(function(){0===$(this).children(":not(code,a,strong,em,ins,b,s,br,span.pwd)").length&&$(this).addClass("note")})},initLike(){Utils.initLikeButton(".admire .agree.like","posts")},initHighlighting(){hljs.initHighlightingOnLoad()},initShare(){if(window.DShare){let e=$(".cover-image").css("background-image");e=e&&e.substring(5,e.length-2),DShare.create(".dshare",{image:e,imageSelector:".main-content"})}},initClipboard(){window.clipboard||(window.clipboard=new ClipboardJS(".btn-clipboard"),clipboard.on("error",function(e){e.clearSelection(),Qmsg.error("您的浏览器不支持复制")}),clipboard.on("success",function(){Qmsg.success("复制成功")}))},foldImage(){var e;DreamConfig.img_fold_height&&((e=$(".article .gallery-item>[data-fancybox]>img")).parent().addClass("fold"),e.each(function(){const e=$(this).parent();this.complete?this.scrollHeight>=DreamConfig.img_fold_height?e.append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):e.removeClass("fold"):this.onload=function(){this.scrollHeight>=DreamConfig.img_fold_height?e.append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):e.removeClass("fold")}}))},initEvent(){var e;t||((e=$("body")).on("click","figure>figcaption .fa-angle-down",function(){var e=$(this);e.is(".close")?($(e.attr("data-code")).parent().slideDown(200),e.removeClass("close")):($(e.attr("data-code")).parent().slideUp(200),e.addClass("close"))}),e.on("click","figure > pre > .expand-done",function(){Utils.foldBlock($(this).parent().parent())}),e.on("click",".gallery-item .expand-done",function(e){e.stopPropagation(),Utils.foldBlock($(this).parent())}),Utils.initLikeEvent(".admire .agree.like","posts",e=>e.find("span").find("span")),window.onCommentSuccessEvent=(e,t)=>{var i=encrypt("mew-hide-"+t),n=(n=localStorage.getItem(i))?JSON.parse(decrypt(n)):[],e=String(e.postId);n.includes(e)||(n.push(e),$(`.main-content[data-target='${t}'][data-id='${e}'] mew-hide[hide]`).each(function(){$(this).before(decrypt(this.getAttribute("hide"))),$(this).remove(),commonContext.initGallery(),a.initCodeBlock(),a.initLiterature(),a.initHighlighting(),"true"===this.getAttribute("toc")&&commonContext.initTocAndNotice()}),localStorage.setItem(i,encrypt(JSON.stringify(n))))},t=!0)}};window.postPjax=function(t){0!==$(".main-content").length&&Object.keys(a).forEach(e=>window.pjaxSerialNumber===t&&a[e]())};{const i=["initEvent","initCodeBlock","initLiterature","initLike","foldImage"];Object.keys(a).forEach(e=>!window.pjaxSerialNumber&&i.includes(e)&&a[e]()),document.addEventListener("DOMContentLoaded",function(){Object.keys(a).forEach(e=>!window.pjaxSerialNumber&&!i.includes(e)&&a[e]())})}})();
|
(()=>{let t=!1;const a={initCodeBlock(){var e=$("*:not(figure) > pre > code");0!==e.length&&e.each(function(e){var t=$(this).parent();let i=$(this).attr("class"),n="",a=!1,o=!1;if(null!=i){var s=i.match(/[|<](.*)$/),l=i.match(/:select/);if(s||l){let e=0;l&&(e=l.index,s?s[1].endsWith(l[0])&&(s[1]=s[1].substring(0,s[1].length-l[0].length)):n=i.substring(9,l.index),a=!0),s&&(e=s.index<e?s.index:e,"<"===s[0][0]&&(o=!0),n=s[1]),$(this).attr("class",i.substring(0,e)),n=n||i.substring(9,e)}else n=i.substring(9)}let r=$(this).text().split("\n")||[],d=r.length-1,c=String(d).length,g=(1===c&&(c=2),"");for(var p=0;p<d;p++)g+=`<li ${a&&/^\s*\|\+\s+/.test(r[p])?'class="code-select"':""}>${String(p+1).padStart(c,0)}</li>`;a&&$(this).text($(this).text().replace(/(^\s*)\|\+\s/gm,"$1"));let h=`codeBlock${e}-`+(new Date).getTime(),f="";o&&(f=" close",$(this).parent().hide());l=`<div><i class="fa fa-angle-down${f}" data-code='#${h}'></i><i class="fa fa-clone btn-clipboard" title="复制代码" data-clipboard-target='#${h}'></i></div>`;$(this).attr("id",h),t.prepend(`<ul>${g}</ul>`),d>DreamConfig.code_fold_line?t.wrap('<figure class="fold hljs"></figure>').append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):t.wrap('<figure class="hljs"></figure>'),t.parent().prepend(`<figcaption>${n}${l}</figcaption>`)})},initLiterature(){$(".literature-content>p:not([class]),.literature-content>mew-hide>p:not([class])").each(function(){0===$(this).children(":not(code,a,strong,em,ins,b,s,br,span.pwd)").length&&$(this).addClass("note")})},initLike(){Utils.initLikeButton(".admire .agree.like","posts")},initHighlighting(){hljs.initHighlightingOnLoad()},initShare(){if(window.DShare){let e=$(".cover-image").css("background-image");e=e&&e.substring(5,e.length-2),DShare.create(".dshare",{image:e,imageSelector:".main-content"})}},initClipboard(){window.clipboard||(window.clipboard=new ClipboardJS(".btn-clipboard"),clipboard.on("error",function(e){e.clearSelection(),Qmsg.error("您的浏览器不支持复制")}),clipboard.on("success",function(){Qmsg.success("复制成功")}))},foldImage(){var e;DreamConfig.img_fold_height&&((e=$(".article .gallery-item>[data-fancybox]>img")).parent().addClass("fold"),e.each(function(){const e=$(this).parent();this.complete?this.scrollHeight>=DreamConfig.img_fold_height?e.append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):e.removeClass("fold"):this.onload=function(){this.scrollHeight>=DreamConfig.img_fold_height?e.append('<div class="expand-done"><i class="fa fa-angle-double-up"></i></div>'):e.removeClass("fold")}}))},initEvent(){var e;t||((e=$("body")).on("click","figure>figcaption .fa-angle-down",function(){var e=$(this);e.is(".close")?($(e.attr("data-code")).parent().slideDown(200),e.removeClass("close")):($(e.attr("data-code")).parent().slideUp(200),e.addClass("close"))}),e.on("click","figure > pre > .expand-done",function(){Utils.foldBlock($(this).parent().parent())}),e.on("click",".gallery-item .expand-done",function(e){e.stopPropagation(),Utils.foldBlock($(this).parent())}),Utils.initLikeEvent(".admire .agree.like","posts",e=>e.find("span").find("span")),window.onCommentSuccessEvent=(e,t)=>{var i=encrypt("mew-hide-"+t),n=(n=localStorage.getItem(i))?JSON.parse(decrypt(n)):[],e=String(e.postId);n.includes(e)||(n.push(e),$(`.main-content[data-target='${t}'][data-id='${e}'] mew-hide[hide]`).each(function(){$(this).before(decrypt(this.getAttribute("hide"))),$(this).remove(),commonContext.initGallery(),a.initCodeBlock(),a.initLiterature(),a.initHighlighting(),"true"===this.getAttribute("toc")&&commonContext.initTocAndNotice()}),localStorage.setItem(i,encrypt(JSON.stringify(n))))},t=!0)},initKatex(){var e=$(".main-content");!window.katex&&0!==e.length||(e.find(".katex--inline").each(function(e,t){katex.render(t.innerText,t,{displayMode:!1})}),e.find(".katex--display").each(function(e,t){katex.render(t.innerText,t,{displayMode:!0})}))}};window.postPjax=function(t){0!==$(".main-content").length&&Object.keys(a).forEach(e=>window.pjaxSerialNumber===t&&a[e]())};{const i=["initEvent","initCodeBlock","initLiterature","initLike","foldImage"];Object.keys(a).forEach(e=>!window.pjaxSerialNumber&&i.includes(e)&&a[e]()),document.addEventListener("DOMContentLoaded",function(){Object.keys(a).forEach(e=>!window.pjaxSerialNumber&&!i.includes(e)&&a[e]())})}})();
|
@ -80,6 +80,7 @@
|
|||||||
[(${theme.config.enhance.effects_circle_magic_mode != 'none'?'DreamConfig["effects_circle_magic_mode"] = "' + theme.config.enhance.effects_circle_magic_mode + '";': ''})]
|
[(${theme.config.enhance.effects_circle_magic_mode != 'none'?'DreamConfig["effects_circle_magic_mode"] = "' + theme.config.enhance.effects_circle_magic_mode + '";': ''})]
|
||||||
[(${theme.config.enhance.enable_baidu_push?'DreamConfig["enable_baidu_push"] = true;': ''})]
|
[(${theme.config.enhance.enable_baidu_push?'DreamConfig["enable_baidu_push"] = true;': ''})]
|
||||||
[(${theme.config.enhance.enable_toutiao_push?'DreamConfig["enable_toutiao_push"] = true;': ''})]
|
[(${theme.config.enhance.enable_toutiao_push?'DreamConfig["enable_toutiao_push"] = true;': ''})]
|
||||||
|
[(${theme.config.post.show_img_name?'DreamConfig["show_img_name"] = true;': ''})]
|
||||||
[(${theme.config.basic_style.load_progress != 'none'?'DreamConfig["load_progress"] = "' + theme.config.basic_style.load_progress + '";': ''})]
|
[(${theme.config.basic_style.load_progress != 'none'?'DreamConfig["load_progress"] = "' + theme.config.basic_style.load_progress + '";': ''})]
|
||||||
[(${!#strings.isEmpty(theme.config.page_config.journals_share_image)?'DreamConfig["journals_share_image"] = "' + theme.config.page_config.journals_share_image + '";': ''})]
|
[(${!#strings.isEmpty(theme.config.page_config.journals_share_image)?'DreamConfig["journals_share_image"] = "' + theme.config.page_config.journals_share_image + '";': ''})]
|
||||||
[(${!#strings.isEmpty(theme.config.sidebar.meting_api)?'var meting_api = "' + theme.config.sidebar.meting_api + '";': ''})]
|
[(${!#strings.isEmpty(theme.config.sidebar.meting_api)?'var meting_api = "' + theme.config.sidebar.meting_api + '";': ''})]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<head xmlns:th="https://www.thymeleaf.org" th:fragment="head"
|
<head xmlns:th="https://www.thymeleaf.org" th:fragment="head"
|
||||||
th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}">
|
th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}">
|
||||||
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
||||||
<script th:if="${(theme.config.enhance.enable_sw != 'false')}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script>
|
<script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
||||||
<meta http-equiv="x-dns-prefetch-control" content="on">
|
<meta http-equiv="x-dns-prefetch-control" content="on">
|
||||||
@ -30,7 +30,7 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
|
|||||||
<link data-pjax rel="preload stylesheet" as="style"
|
<link data-pjax rel="preload stylesheet" as="style"
|
||||||
th:href="@{'/assets/lib/highlightjs@11.5.1/styles/' + ${theme.config.post.code_pretty} + '.min.css'}"/>
|
th:href="@{'/assets/lib/highlightjs@11.5.1/styles/' + ${theme.config.post.code_pretty} + '.min.css'}"/>
|
||||||
<link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/>
|
<link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/>
|
||||||
<link th:if="${enableKatex}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/lib/katex@0.12.0/katex.min.css(mew=${theme.spec.version})}"/>
|
<link th:if="${enableKatex}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/lib/katex@0.12.0/katex.min.css}"/>
|
||||||
<link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}">
|
<link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}">
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
||||||
@ -44,9 +44,7 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
|
|||||||
|
|
||||||
<script th:src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script>
|
<script th:src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script>
|
||||||
|
|
||||||
<script th:if="${theme.config.enhance.enable_patch}" src="//cdn.jsdelivr.net/gh/nineya/halo-theme-dream@master/src/patch.js"></script>
|
|
||||||
<link th:if="${!#strings.isEmpty(theme.config.custom.external_css)}" rel="stylesheet" th:href="${theme.config.custom.external_css}">
|
<link th:if="${!#strings.isEmpty(theme.config.custom.external_css)}" rel="stylesheet" th:href="${theme.config.custom.external_css}">
|
||||||
|
|
||||||
<style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:text="${theme.config.custom.inline_css}"></style>
|
<style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:text="${theme.config.custom.inline_css}"></style>
|
||||||
[(${theme.config.custom.external_js_head})]
|
[(${theme.config.custom.external_js_head})]
|
||||||
<script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:text="${theme.config.custom.inline_js_head}">
|
<script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:text="${theme.config.custom.inline_js_head}">
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<a th:if="${#lists.isEmpty(menuItem.children)}"
|
<a th:if="${#lists.isEmpty(menuItem.children)}"
|
||||||
class="item"
|
class="item"
|
||||||
th:href="${menuItem.status.href}"
|
th:href="${menuItem.status.href}"
|
||||||
th:target="${menuItem.spec.target}"
|
th:target="${menuItem.spec.target?.value}"
|
||||||
th:title="${menuItem.status.displayName}">
|
th:title="${menuItem.status.displayName}">
|
||||||
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(menuItem, 'icon', ''))}"
|
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(menuItem, 'icon', ''))}"
|
||||||
th:class="${'m-icon ' + #annotations.getOrDefault(menuItem, 'icon', '')}"></i>
|
th:class="${'m-icon ' + #annotations.getOrDefault(menuItem, 'icon', '')}"></i>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="item-dropdown-link">
|
<div class="item-dropdown-link">
|
||||||
<a class="item"
|
<a class="item"
|
||||||
th:href="${#strings.defaultString(menuItem.status.href, 'javascript:')}"
|
th:href="${#strings.defaultString(menuItem.status.href, 'javascript:')}"
|
||||||
th:target="${menuItem.spec.target}"
|
th:target="${menuItem.spec.target?.value}"
|
||||||
th:title="${menuItem.status.displayName}">
|
th:title="${menuItem.status.displayName}">
|
||||||
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(menuItem, 'icon', ''))}"
|
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(menuItem, 'icon', ''))}"
|
||||||
th:class="${'m-icon ' + #annotations.getOrDefault(menuItem, 'icon', '')}"></i>
|
th:class="${'m-icon ' + #annotations.getOrDefault(menuItem, 'icon', '')}"></i>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<li th:each="dropdown : ${menuItem.children}" class="item-sub-li">
|
<li th:each="dropdown : ${menuItem.children}" class="item-sub-li">
|
||||||
<a class="item"
|
<a class="item"
|
||||||
th:href="${#strings.defaultString(dropdown.status.href, 'javascript:')}"
|
th:href="${#strings.defaultString(dropdown.status.href, 'javascript:')}"
|
||||||
th:target="${dropdown.spec.target}"
|
th:target="${dropdown.spec.target?.value}"
|
||||||
th:title="${dropdown.status.displayName}">
|
th:title="${dropdown.status.displayName}">
|
||||||
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(dropdown, 'icon', ''))}"
|
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(dropdown, 'icon', ''))}"
|
||||||
th:class="${'m-icon ' + #annotations.getOrDefault(dropdown, 'icon', '')}"></i>
|
th:class="${'m-icon ' + #annotations.getOrDefault(dropdown, 'icon', '')}"></i>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<li th:each="dropdownChild : ${dropdown.children}">
|
<li th:each="dropdownChild : ${dropdown.children}">
|
||||||
<a class="item"
|
<a class="item"
|
||||||
th:href="${dropdownChild.status.href}"
|
th:href="${dropdownChild.status.href}"
|
||||||
th:target="${dropdownChild.spec.target}"
|
th:target="${dropdownChild.spec.target?.value}"
|
||||||
th:title="${dropdownChild.status.displayName}">
|
th:title="${dropdownChild.status.displayName}">
|
||||||
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(dropdownChild, 'icon', ''))}"
|
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(dropdownChild, 'icon', ''))}"
|
||||||
th:class="${'m-icon ' + #annotations.getOrDefault(dropdownChild, 'icon', '')}"></i>
|
th:class="${'m-icon ' + #annotations.getOrDefault(dropdownChild, 'icon', '')}"></i>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<div class="navbar-slideout-author">
|
<div class="navbar-slideout-author">
|
||||||
<img width="50" height="50" th:src="${contributor.avatar}" th:alt="${contributor.displayName}" class="avatar"/>
|
<img width="50" height="50" th:src="${contributor.avatar}" th:alt="${contributor.displayName}" class="avatar"/>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<a class="link" target="_blank" rel="noopener noreferrer nofollow" th:text="${contributor.displayName}"></a>
|
<p class="link" th:text="${contributor.displayName}"></p>
|
||||||
<p class="motto" th:text="${contributor.bio}"></p>
|
<p class="motto" th:text="${contributor.bio}"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<th:block th:if="${isPost}">
|
<th:block th:if="${isPost}">
|
||||||
<script th:if="${isPost}" data-pjax th:src="@{/assets/lib/highlightjs@11.5.1/highlight.min.js}"></script>
|
<script th:if="${isPost}" data-pjax th:src="@{/assets/lib/highlightjs@11.5.1/highlight.min.js}"></script>
|
||||||
<script th:if="${isPost}" data-pjax th:src="@{/assets/lib/clipboard@2.0.10/clipboard.min.js}"></script>
|
<script th:if="${isPost}" data-pjax th:src="@{/assets/lib/clipboard@2.0.10/clipboard.min.js}"></script>
|
||||||
|
<script th:if="${enableKatex}" data-pjax th:src="@{/assets/lib/katex@0.12.0/katex.min.js}"></script>
|
||||||
<script th:if="${enableShare}" data-pjax th:src="@{/assets/js/dshare.min.js(mew=${theme.spec.version})}"></script>
|
<script th:if="${enableShare}" data-pjax th:src="@{/assets/js/dshare.min.js(mew=${theme.spec.version})}"></script>
|
||||||
<script th:if="${isPost}" data-pjax th:src="@{/assets/js/post.min.js(mew=${theme.spec.version})}"></script>
|
<script th:if="${isPost}" data-pjax th:src="@{/assets/js/post.min.js(mew=${theme.spec.version})}"></script>
|
||||||
<script th:if="${isJournals}" data-pjax th:src="@{/assets/js/journals.min.js(mew=${theme.spec.version})}"></script>
|
<script th:if="${isJournals}" data-pjax th:src="@{/assets/js/journals.min.js(mew=${theme.spec.version})}"></script>
|
||||||
@ -18,9 +19,11 @@
|
|||||||
|
|
||||||
<script th:src="@{/assets/js/mew-custom.min.js(mew=${theme.spec.version})}"></script>
|
<script th:src="@{/assets/js/mew-custom.min.js(mew=${theme.spec.version})}"></script>
|
||||||
|
|
||||||
<script th:src="@{/assets/lib/jquery-pjax@2.0.1/jquery.pjax.min.js}"></script>
|
|
||||||
<script th:if="${theme.config.basic_style.load_progress != 'none'}" th:src="@{/assets/js/dprogress.min.js(mew=${theme.spec.version})}"></script>
|
<script th:if="${theme.config.basic_style.load_progress != 'none'}" th:src="@{/assets/js/dprogress.min.js(mew=${theme.spec.version})}"></script>
|
||||||
<script th:src="@{/assets/js/pjax.min.js(mew=${theme.spec.version})}"></script>
|
<th:block th:if="${theme.config.enhance.enable_pjax}">
|
||||||
|
<script th:src="@{/assets/lib/jquery-pjax@2.0.1/jquery.pjax.min.js}"></script>
|
||||||
|
<script th:src="@{/assets/js/pjax.min.js(mew=${theme.spec.version})}"></script>
|
||||||
|
</th:block>
|
||||||
<script async th:src="@{/assets/lib/qmsg/qmsg.min.js}"></script>
|
<script async th:src="@{/assets/lib/qmsg/qmsg.min.js}"></script>
|
||||||
|
|
||||||
<script th:if="${isPost}" data-pjax async th:src="@{/assets/lib/fancybox@5.3.7/jquery.fancybox.min.js}"></script>
|
<script th:if="${isPost}" data-pjax async th:src="@{/assets/lib/fancybox@5.3.7/jquery.fancybox.min.js}"></script>
|
||||||
|
@ -9,9 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-content main">
|
<div class="card-content main">
|
||||||
<h1 class="title" th:text="'友情链接 - ' + ${contributor.displayName} + '的小伙伴们'"></h1>
|
<h1 class="title" th:text="'友情链接 - ' + ${contributor.displayName} + '的小伙伴们'"></h1>
|
||||||
<div class="main-content"
|
<div class="main-content">
|
||||||
th:data-id="${theme.config.page_config.link_comment_id}"
|
|
||||||
data-target="SinglePage">
|
|
||||||
<th:block th:each="group : ${groups}">
|
<th:block th:each="group : ${groups}">
|
||||||
<div th:if="${!#lists.isEmpty(group.links)}" class="links">
|
<div th:if="${!#lists.isEmpty(group.links)}" class="links">
|
||||||
<h3 class="link-title" th:text="${#strings.defaultString(group.spec.displayName, '小伙伴们')}" th:id="'toc' + ${groupStat.index}"></h3>
|
<h3 class="link-title" th:text="${#strings.defaultString(group.spec.displayName, '小伙伴们')}" th:id="'toc' + ${groupStat.index}"></h3>
|
||||||
@ -48,9 +46,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card card-content" id="comment-wrapper" th:if="${pluginFinder.available('PluginCommentWidget') && !#strings.isEmpty(theme.config.page_config.link_comment_id)}">
|
<div class="card card-content" id="comment-wrapper" th:if="${pluginFinder.available('PluginCommentWidget') && enableComment}">
|
||||||
<h3 class="comment-title">评论</h3>
|
<h3 class="comment-title">评论</h3>
|
||||||
<div id="comment"></div>
|
<div class="widget-comment" th:data-id="${theme.config.page_config.link_comment_id}" data-target="SinglePage"></div>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
@ -22,6 +22,6 @@ spec:
|
|||||||
settingName: theme-dream-setting
|
settingName: theme-dream-setting
|
||||||
configMapName: theme-dream-configMap
|
configMapName: theme-dream-configMap
|
||||||
# 版本号
|
# 版本号
|
||||||
version: 1.0.3
|
version: 1.0.4
|
||||||
# 最低支持的 Halo 版本
|
# 最低支持的 Halo 版本
|
||||||
require: ">=2.0.0"
|
require: ">=2.0.0"
|
Loading…
Reference in New Issue
Block a user