From 5678b89001055375c19ffdffc5e477b6aea7074b Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 25 Dec 2022 19:29:05 +0800 Subject: [PATCH] align-center --- themes/matery/LayoutSlug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 85ef4ced..0d872286 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -17,7 +17,7 @@ export const LayoutSlug = props => { const scrollListener = () => { const scrollY = window.pageYOffset - const shouldShow = scrollY > 220 + const shouldShow = scrollY > 220 && post?.toc?.length > 0 if (shouldShow !== show) { switchShow(shouldShow) @@ -46,7 +46,7 @@ export const LayoutSlug = props => { >
-
+
{lock && }