Merge pull request #638 from tangly1024/3.7.0

3.7.0
This commit is contained in:
tangly1024
2022-12-25 20:57:38 +08:00
committed by GitHub
2 changed files with 15 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ const LayoutBase = props => {
}
return (
<div id="outer-wrapper" className="min-h-screen flex flex-col justify-between bg-hexo-background-gray dark:bg-black w-full overflow-hidden">
<div id="outer-wrapper" className="min-h-screen flex flex-col justify-between bg-hexo-background-gray dark:bg-black w-full">
<CommonHead meta={meta} siteInfo={siteInfo} />

View File

@@ -18,7 +18,6 @@ export const LayoutSlug = props => {
const scrollListener = () => {
const scrollY = window.pageYOffset
const shouldShow = scrollY > 220 && post?.toc?.length > 0
if (shouldShow !== show) {
switchShow(shouldShow)
}
@@ -45,12 +44,12 @@ export const LayoutSlug = props => {
showTag={false}
>
<div id='inner-wrapper' className='flex'>
<div className={'drop-shadow-xl max-w-4xl 2xl:ml-36'}>
<div id='inner-wrapper'>
<div className={'drop-shadow-xl max-w-4xl'}>
<div className="-mt-32 rounded-md mx-3 lg:border lg:rounded-xl lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
{lock && <ArticleLock validPassword={validPassword} />}
{!lock && <div id="container" className="overflow-x-auto flex-grow md:w-full ">
{!lock && <div id="container" className="overflow-x-auto md:w-full px-3 ">
{post?.type === 'Post' && <>
<div className='px-10'>
<ArticleInfo post={post} />
@@ -91,17 +90,23 @@ export const LayoutSlug = props => {
</div>}
</div>
{post.type === 'Post' && <ArticleAdjacent {...props} />}
{post?.toc?.length > 0 && <div id='toc-wrapper' className='absolute top-0 w-full h-full xl:block hidden' >
<div className='relative h-full'>
<div className='float-right -mr-72 h-full mt-40'>
<div className='sticky top-24'>
<Catalog toc={post.toc} />
</div>
</div>
</div>
</div>}
</div>
<div className='fixed bottom-28 right-4'>
<JumpToCommentButton />
</div>
<div id='toc-widget' className='w-60 hidden xl:block '>
<div className='fixed top-24 overflow-auto'>
{show && <Catalog toc={post.toc} />}
</div>
</div>
</div>
</LayoutBase>