diff --git a/themes/fukasawa/components/AsideLeft.js b/themes/fukasawa/components/AsideLeft.js index 0c8aa27d..984385cf 100644 --- a/themes/fukasawa/components/AsideLeft.js +++ b/themes/fukasawa/components/AsideLeft.js @@ -14,7 +14,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import { siteConfig } from '@/lib/config' import MailChimpForm from './MailChimpForm' import { useGlobal } from '@/lib/global' -import { useEffect, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import { isBrowser } from '@/lib/utils' import { debounce } from 'lodash' @@ -75,14 +75,30 @@ function AsideLeft(props) { } } }, []) - + const position = useMemo(()=>{ + const isReverse = JSON.parse(siteConfig('LAYOUT_SIDEBAR_REVERSE')) + if(isCollapsed){ + if(isReverse){ + return 'right-2' + }else{ + return 'left-2' + } + }else{ + if(isReverse){ + return 'right-80' + }else{ + return 'left-80' + } + } + },[isCollapsed] ) + return