From f5e5957d2c2db54c52c174a88fbc5b0d04e78d23 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 30 Dec 2023 17:27:31 +0800 Subject: [PATCH] =?UTF-8?q?fukasawa=20=E6=94=AF=E6=8C=81fullwidth?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/fukasawa/components/ArticleDetail.js | 4 ++-- themes/fukasawa/index.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 31294304..1b9076a4 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -17,13 +17,13 @@ import WWAds from '@/components/WWAds' */ export default function ArticleDetail(props) { const { post, prev, next } = props - const { locale } = useGlobal() + const { locale, fullWidth } = useGlobal() if (!post) { return <> } return ( -
+
{post?.type && !post?.type !== 'Page' && post?.pageCover && (
diff --git a/themes/fukasawa/index.js b/themes/fukasawa/index.js index 3786c20d..bf41b1a6 100644 --- a/themes/fukasawa/index.js +++ b/themes/fukasawa/index.js @@ -46,9 +46,9 @@ export const useFukasawaGlobal = () => useContext(ThemeGlobalFukasawa) const LayoutBase = (props) => { const { children, headerSlot, meta } = props const leftAreaSlot = - const { onLoading } = useGlobal() + const { onLoading, fullWidth } = useGlobal() - const FUKASAWA_SIDEBAR_COLLAPSE_SATUS_DEFAULT = siteConfig('FUKASAWA_SIDEBAR_COLLAPSE_SATUS_DEFAULT', null, CONFIG) + const FUKASAWA_SIDEBAR_COLLAPSE_SATUS_DEFAULT = fullWidth || siteConfig('FUKASAWA_SIDEBAR_COLLAPSE_SATUS_DEFAULT', null, CONFIG) // 侧边栏折叠从 本地存储中获取 open 状态的初始值 const [isCollapsed, setIsCollapse] = useState(() => { @@ -80,7 +80,7 @@ const LayoutBase = (props) => {
-
+