From 84ad5c5dd697b676fd4b67e3ae565885ba47456a Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 16 Jan 2022 00:47:05 +0800 Subject: [PATCH] =?UTF-8?q?improvement:=20=E5=84=AA=E5=8C=96=20pjax=20?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E5=8F=B3=E4=B8=8B=E8=A7=92=E6=8C=89=E9=88=95?= =?UTF-8?q?=E7=9A=84=E5=8B=95=E7=95=AB=20fix:=20=E4=BF=AE=E5=BE=A9?= =?UTF-8?q?=E9=A0=81=E9=9D=A2=E8=A8=AD=E7=BD=AE=20aside=20=E7=88=B2=20true?= =?UTF-8?q?=20=E6=99=82=EF=BC=8Cjs=20=E5=A0=B1=E9=8C=AF=E7=9A=84=20bug=20f?= =?UTF-8?q?ix:=20=E4=BF=AE=E5=BE=A9=E9=83=A8=E5=88=86=E9=A0=81=E9=9D=A2?= =?UTF-8?q?=E5=8F=B3=E4=B8=8B=E8=A7=92=E6=8C=89=E9=88=95=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E9=81=AE=E6=93=8B=E7=9A=84=20bug=20fix:=20=E4=BF=AE=E5=BE=A9?= =?UTF-8?q?=E5=A3=93=E7=B8=AE=20html=20=E4=BB=A3=E7=A2=BC,=E5=8F=8B?= =?UTF-8?q?=E6=83=85=E9=8F=88=E6=8E=A5=E9=A0=81=E9=9D=A2=E5=A3=93=E7=B8=AE?= =?UTF-8?q?=E6=9C=83=E5=A0=B1=E9=8C=AF=E7=9A=84=20bug=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=BE=A9=20safari=20=E4=B8=8A=E6=BB=91=E5=8B=95=E5=81=B4?= =?UTF-8?q?=E9=82=8A=E8=8F=9C=E5=96=AE=E6=AC=84=E6=9C=83=E6=94=B6=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/head/config_site.pug | 2 +- layout/includes/page/flink.pug | 46 ++++++++++++++-------------- layout/includes/third-party/pjax.pug | 5 +-- package.json | 2 +- source/js/main.js | 7 +++-- 5 files changed, 32 insertions(+), 30 deletions(-) diff --git a/layout/includes/head/config_site.pug b/layout/includes/head/config_site.pug index 220c55f..94cbb51 100644 --- a/layout/includes/head/config_site.pug +++ b/layout/includes/head/config_site.pug @@ -7,7 +7,7 @@ else isHighlightShrink = theme.highlight_shrink var showToc = false - if (theme.aside.enable) { + if (theme.aside.enable && page.aside !== false) { let tocEnable = false if (is_post()) { if (theme.toc.post) tocEnable = true diff --git a/layout/includes/page/flink.pug b/layout/includes/page/flink.pug index 59032c9..e63eb68 100644 --- a/layout/includes/page/flink.pug +++ b/layout/includes/page/flink.pug @@ -4,64 +4,64 @@ script. (()=>{ const replaceSymbol = (str) => { - return str.replace(/[\p{P}\p{S}]/gu, '-') + return str.replace(/[\p{P}\p{S}]/gu, "-") } - let result = '' - fetch('!{url_for(page.flink_url)}') + let result = "" + fetch("!{url_for(page.flink_url)}") .then(response => response.json()) .then(str => { for(let i = 0; i < str.length; i++){ const replaceClassName = replaceSymbol(str[i].class_name) - const className = str[i].class_name ? `

${str[i].class_name}

` : '' - const classDesc = str[i].class_desc ? `` : '' + const className = str[i].class_name ? `

${str[i].class_name}

` : "" + const classDesc = str[i].class_desc ? `` : "" - let listResult = '' + let listResult = "" const lists = str[i].link_list for(let j = 0; j < lists.length; j++){ listResult += `