diff --git a/settings.yaml b/settings.yaml
index f6e1831..99373d3 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -453,6 +453,15 @@ spec:
label: 正文长图折叠
placeholder: '请输入高度数值(px)'
help: '图片高度超出指定高度(px)后默认进行折叠,指定的高度需大于等于 400px。'
+ - $formkit: radio
+ name: show_img_name
+ label: 显示图片名称
+ value: true
+ options:
+ - value: true
+ label: 开启
+ - value: false
+ label: 关闭
- $formkit: text
name: invalid_tips_day
label: 文章失效提示
diff --git a/src/js/common.js b/src/js/common.js
index c816b9b..6dd4c83 100644
--- a/src/js/common.js
+++ b/src/js/common.js
@@ -62,7 +62,7 @@ const commonContext = {
$('.main-content img:not(.not-gallery)').each(function () {
if ($(this).parents('[data-fancybox],mew-photos').length === 0) {
$(this).wrap(`
${this.alt ? `
${this.alt}
` : ''}
`)
+ }">${(this.alt && DreamConfig.show_img_name) ? `${this.alt}
` : ''}`)
}
})
},
diff --git a/templates/assets/js/common.min.js b/templates/assets/js/common.min.js
index 40bda3f..95f79ed 100644
--- a/templates/assets/js/common.min.js
+++ b/templates/assets/js/common.min.js
@@ -1 +1 @@
-(()=>{window.encrypt=e=>window.btoa(unescape(encodeURIComponent(e))),window.decrypt=e=>decodeURIComponent(escape(window.atob(e)));const t={initWidget(){var e=$(".columns .column-right"),t=$(".columns .column-right-shadow");if(e.length&&t.length&&!t[0].children.length)for(const a of e[0].children)t[0].append(a.cloneNode(!0))},initTocAndNotice(){var e=location["pathname"],t=(window.tocPjax&&window.tocPjax(),0===$(".widget.toc .card-content ul").length),e="toc"===DreamConfig.notice_show_mode&&!t||"index"===DreamConfig.notice_show_mode&&"/"!==e;t?$(".widget.toc,.action-toc").addClass("is-hidden-all"):$(".widget.toc,.action-toc").removeClass("is-hidden-all"),e?$(".widget.notice").addClass("is-hidden-all"):$(".widget.notice").removeClass("is-hidden-all")},initBanner(){const i=$(".banner-info-desc");if(0!==i.length){const o=i.text();i.text("");let t,a="",n=!0;const s=function(){var e=a.length;n&&e${this.alt?`${this.alt}
`:""}`)})},initMode(){let t=localStorage.getItem("night")||!1;const a=e=>{e?document.documentElement.classList.add("night"):document.documentElement.classList.remove("night"),localStorage.setItem("night",e),t=e};$("#toggle-mode").on("click",()=>a("true"!==t.toString())),"system"===DreamConfig.default_theme&&window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>a(e.matches))},initNavbar(){var t=$(".navbar-nav a"),e=$(".panel-side-menu .link");let a=0;var{href:n,pathname:i}=location;if(i&&"/"!==i)for(let e=0;e$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(e){e.stopPropagation(),$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()}),a.on("click",e=>e.stopPropagation()))})},initScroll(){let i=0;document.addEventListener("scroll",()=>{var e=$(document).scrollTop(),t=(a=(t=e)>i,i=t,a),a=$("body"),n=$(".actions");50e.preventDefault),$(".navbar .toc-content").on("click",function(e){e.stopPropagation(),$("html").removeClass("disable-scroll"),$(".navbar-mask").removeClass("active slideout"),$(".navbar-slideout").removeClass("active slideout-toc")})},sideMenuMobile(){$(".navbar-slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".navbar-slideout-menu .panel").on("click",function(e){e.stopPropagation();var e=$(this),t=e.parent().parent();t.find(".panel").not(e).removeClass("in"),t.find(".panel-body").not(e.siblings(".panel-body")).stop().hide("fast"),e.toggleClass("in").siblings(".panel-body").stop().toggle("fast")})},initEvent(){var e=$("body");function a(e){var e=$(e),t=e.attr("data-close");return t&&""!==t.trim()?e.closest(t.trim()):e}e.on("click",".click-close",function(e){e.stopPropagation(),a(this).remove()}),e.on("click",".click-animation-close",function(e){e.stopPropagation();let t=a(this);t.addClass("close-animation"),setTimeout(()=>t.remove(),300)})},offscreenTip(){if(!Utils.isMobile()&&(DreamConfig.document_hidden_title||DreamConfig.document_visible_title)){const t=document.title;let e=null;document.addEventListener("visibilitychange",function(){document.hidden?(DreamConfig.document_hidden_title&&(document.title=DreamConfig.document_hidden_title),clearTimeout(e)):(document.title=DreamConfig.document_visible_title||t,DreamConfig.document_visible_title&&(e=setTimeout(function(){document.title=t},2e3)))})}},initCarousel(){window.Swiper&&new Swiper(".swiper",{loop:!0,parallax:!0,effect:"slide",spaceBetween:10,speed:600,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})},sparkInput(){const a=DreamConfig.spark_input_content&&DreamConfig.spark_input_content.filter(e=>0sparkInput(t,[t.innerText,...a]))})},loveTime(){let l=$(".love .love-time");if(0!==l.length){var e=l.attr("data-time");if(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/.test(e)){const c=new Date,d=new Date(e);setInterval(function(){c.setTime(c.getTime()+1e3);var e=parseInt((c-d)/1e3),t=e%60,a=(e=parseInt(e/60))%60;let n=(e=parseInt(e/60))%24,i=parseInt(e/24),o=0,s=d.getFullYear(),r=c.getFullYear();for(;s${i}天${n}时${a}分${t}秒`},1e3)}else o.innerText=DreamConfig.website_time}},initComment(){window.CommentWidget&&$(".widget-comment").each(function(e,t){var a=$(this).attr("data-target"),n=$(this).attr("data-id");CommentWidget.init(`.widget-comment[data-id=${n}][data-target=${a}]`,"/plugins/PluginCommentWidget/assets/static/style.css",{group:"content.halo.run",kind:a,name:n,colorScheme:window.dataTheme})})},initEffects(){Utils.isMobile()||(DreamConfig.cursor_move&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.cursor_click&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.enable_live2d&&Utils.cachedScript(DreamConfig.theme_base+"/js/autoload.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_sakura_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/sakura.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_universe_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/universe.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_circle_magic_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/circleMagic.min.js?mew="+DreamConfig.theme_version))},loadMaintain(){DreamConfig.enable_baidu_push&&Utils.baiduPush(),DreamConfig.enable_toutiao_push&&Utils.toutiaoPush()},showThemeVersion(){window.logger(`%c页面加载耗时:${Math.round(performance.now())}ms | Theme By Dream `+DreamConfig.theme_version,"color:#fff; background: linear-gradient(270deg, #986fee, #8695e6, #68b7dd, #18d7d3); padding: 8px 15px; border-radius: 0 15px 0 15px")}};window.commonContext=t;{const a=["initCarousel","sparkInput","websiteTime","initComment"],n=["initEffects","loadMaintain","showThemeVersion"];Object.keys(t).forEach(e=>!a.includes(e)&&!n.includes(e)&&t[e]()),document.addEventListener("DOMContentLoaded",function(){$("html").addClass("loaded"),a.forEach(e=>t[e]&&t[e]())}),window.addEventListener("load",function(){n.forEach(e=>t[e]&&t[e]()),$("html").addClass("ready")})}})();
\ No newline at end of file
+(()=>{window.encrypt=e=>window.btoa(unescape(encodeURIComponent(e))),window.decrypt=e=>decodeURIComponent(escape(window.atob(e)));const t={initWidget(){var e=$(".columns .column-right"),t=$(".columns .column-right-shadow");if(e.length&&t.length&&!t[0].children.length)for(const a of e[0].children)t[0].append(a.cloneNode(!0))},initTocAndNotice(){var e=location["pathname"],t=(window.tocPjax&&window.tocPjax(),0===$(".widget.toc .card-content ul").length),e="toc"===DreamConfig.notice_show_mode&&!t||"index"===DreamConfig.notice_show_mode&&"/"!==e;t?$(".widget.toc,.action-toc").addClass("is-hidden-all"):$(".widget.toc,.action-toc").removeClass("is-hidden-all"),e?$(".widget.notice").addClass("is-hidden-all"):$(".widget.notice").removeClass("is-hidden-all")},initBanner(){const i=$(".banner-info-desc");if(0!==i.length){const o=i.text();i.text("");let t,a="",n=!0;const s=function(){var e=a.length;n&&e${this.alt&&DreamConfig.show_img_name?`${this.alt}
`:""}`)})},initMode(){let t=localStorage.getItem("night")||!1;const a=e=>{e?document.documentElement.classList.add("night"):document.documentElement.classList.remove("night"),localStorage.setItem("night",e),t=e};$("#toggle-mode").on("click",()=>a("true"!==t.toString())),"system"===DreamConfig.default_theme&&window.matchMedia("(prefers-color-scheme: dark)").addListener(e=>a(e.matches))},initNavbar(){var t=$(".navbar-nav a"),e=$(".panel-side-menu .link");let a=0;var{href:n,pathname:i}=location;if(i&&"/"!==i)for(let e=0;e$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(e){e.stopPropagation(),$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()}),a.on("click",e=>e.stopPropagation()))})},initScroll(){let i=0;document.addEventListener("scroll",()=>{var e=$(document).scrollTop(),t=(a=(t=e)>i,i=t,a),a=$("body"),n=$(".actions");50e.preventDefault),$(".navbar .toc-content").on("click",function(e){e.stopPropagation(),$("html").removeClass("disable-scroll"),$(".navbar-mask").removeClass("active slideout"),$(".navbar-slideout").removeClass("active slideout-toc")})},sideMenuMobile(){$(".navbar-slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".navbar-slideout-menu .panel").on("click",function(e){e.stopPropagation();var e=$(this),t=e.parent().parent();t.find(".panel").not(e).removeClass("in"),t.find(".panel-body").not(e.siblings(".panel-body")).stop().hide("fast"),e.toggleClass("in").siblings(".panel-body").stop().toggle("fast")})},initEvent(){var e=$("body");function a(e){var e=$(e),t=e.attr("data-close");return t&&""!==t.trim()?e.closest(t.trim()):e}e.on("click",".click-close",function(e){e.stopPropagation(),a(this).remove()}),e.on("click",".click-animation-close",function(e){e.stopPropagation();let t=a(this);t.addClass("close-animation"),setTimeout(()=>t.remove(),300)})},offscreenTip(){if(!Utils.isMobile()&&(DreamConfig.document_hidden_title||DreamConfig.document_visible_title)){const t=document.title;let e=null;document.addEventListener("visibilitychange",function(){document.hidden?(DreamConfig.document_hidden_title&&(document.title=DreamConfig.document_hidden_title),clearTimeout(e)):(document.title=DreamConfig.document_visible_title||t,DreamConfig.document_visible_title&&(e=setTimeout(function(){document.title=t},2e3)))})}},initCarousel(){window.Swiper&&new Swiper(".swiper",{loop:!0,parallax:!0,effect:"slide",spaceBetween:10,speed:600,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})},sparkInput(){const a=DreamConfig.spark_input_content&&DreamConfig.spark_input_content.filter(e=>0sparkInput(t,[t.innerText,...a]))})},loveTime(){let l=$(".love .love-time");if(0!==l.length){var e=l.attr("data-time");if(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/.test(e)){const c=new Date,d=new Date(e);setInterval(function(){c.setTime(c.getTime()+1e3);var e=parseInt((c-d)/1e3),t=e%60,a=(e=parseInt(e/60))%60;let n=(e=parseInt(e/60))%24,i=parseInt(e/24),o=0,s=d.getFullYear(),r=c.getFullYear();for(;s${i}天${n}时${a}分${t}秒`},1e3)}else o.innerText=DreamConfig.website_time}},initComment(){window.CommentWidget&&$(".widget-comment").each(function(e,t){var a=$(this).attr("data-target"),n=$(this).attr("data-id");CommentWidget.init(`.widget-comment[data-id=${n}][data-target=${a}]`,"/plugins/PluginCommentWidget/assets/static/style.css",{group:"content.halo.run",kind:a,name:n,colorScheme:window.dataTheme})})},initEffects(){Utils.isMobile()||(DreamConfig.cursor_move&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/move/${DreamConfig.cursor_move}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.cursor_click&&Utils.cachedScript(`${DreamConfig.theme_base}/js/cursor/click/${DreamConfig.cursor_click}.min.js?mew=`+DreamConfig.theme_version),DreamConfig.enable_live2d&&Utils.cachedScript(DreamConfig.theme_base+"/js/autoload.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_sakura_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/sakura.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_universe_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/universe.min.js?mew="+DreamConfig.theme_version),DreamConfig.effects_circle_magic_mode&&Utils.cachedScript(DreamConfig.theme_base+"/js/effects/circleMagic.min.js?mew="+DreamConfig.theme_version))},loadMaintain(){DreamConfig.enable_baidu_push&&Utils.baiduPush(),DreamConfig.enable_toutiao_push&&Utils.toutiaoPush()},showThemeVersion(){window.logger(`%c页面加载耗时:${Math.round(performance.now())}ms | Theme By Dream `+DreamConfig.theme_version,"color:#fff; background: linear-gradient(270deg, #986fee, #8695e6, #68b7dd, #18d7d3); padding: 8px 15px; border-radius: 0 15px 0 15px")}};window.commonContext=t;{const a=["initCarousel","sparkInput","websiteTime","initComment"],n=["initEffects","loadMaintain","showThemeVersion"];Object.keys(t).forEach(e=>!a.includes(e)&&!n.includes(e)&&t[e]()),document.addEventListener("DOMContentLoaded",function(){$("html").addClass("loaded"),a.forEach(e=>t[e]&&t[e]())}),window.addEventListener("load",function(){n.forEach(e=>t[e]&&t[e]()),$("html").addClass("ready")})}})();
\ No newline at end of file
diff --git a/templates/common/config.html b/templates/common/config.html
index ad11fb2..04c6cfd 100644
--- a/templates/common/config.html
+++ b/templates/common/config.html
@@ -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.enable_baidu_push?'DreamConfig["enable_baidu_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 + '";': ''})]
[(${!#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 + '";': ''})]