From c5aafde03c77672998e87cde609977b33778b222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=B8=E9=B9=BF/Zhilu?= Date: Tue, 28 May 2024 23:16:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(bug):=20=E6=96=87=E7=AB=A0banner=E9=9D=9E?= =?UTF-8?q?=E6=B3=95=E5=B1=9E=E6=80=A7,=20=E7=9B=AE=E5=BD=95=E8=AE=A8?= =?UTF-8?q?=E8=AE=BA=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91=20(#475)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/_partial/widgets/toc.ejs | 12 +++++++----- source/css/_components/partial/article-banner.styl | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/layout/_partial/widgets/toc.ejs b/layout/_partial/widgets/toc.ejs index 57fe2c7..a7942a2 100644 --- a/layout/_partial/widgets/toc.ejs +++ b/layout/_partial/widgets/toc.ejs @@ -55,11 +55,13 @@ function layoutDiv(fallback) { el += icon('default:upup') el += `${__('btn.top')}` el += `` - if (page.comments) { - el += `` - el += icon('default:tocomment') - el += `${__('btn.comments')}` - el += `` + if (theme.comments.service && theme.comments.service.length > 0) { + if (page.comments == undefined || page.comments != false) { + el += `` + el += icon('default:tocomment') + el += `${__('btn.comments')}` + el += `` + } } el += `` el += `` diff --git a/source/css/_components/partial/article-banner.styl b/source/css/_components/partial/article-banner.styl index 3690b3e..a08752d 100644 --- a/source/css/_components/partial/article-banner.styl +++ b/source/css/_components/partial/article-banner.styl @@ -13,7 +13,7 @@ .article.banner .content .top align-items: flex-start - margin: 1rem 'calc(1rem - 4px)' + margin: 1rem calc(1rem - 4px) .title font-size: $fsh1 color: var(--text-banner)