优化增量静态及404处理

This commit is contained in:
tangly1024
2022-04-26 22:20:02 +08:00
parent 5a884f9a73
commit d0edae963b
10 changed files with 71 additions and 51 deletions

View File

@@ -23,7 +23,7 @@ export const ArticleLock = props => {
}
}
return <div className='w-full flex justify-center items-center h-96 font-sans'>
return <div id='container' className='w-full flex justify-center items-center h-96 font-sans'>
<div className='text-center space-y-3'>
<div className='font-bold'>{locale.COMMON.ARTICLE_LOCK_TIPS}</div>
<div className='flex'>
@@ -35,5 +35,5 @@ export const ArticleLock = props => {
<div id='tips'>
</div>
</div>
</div>
</div>
}

View File

@@ -5,7 +5,7 @@ import { useEffect } from 'react'
export default function HeaderArticle({ post, siteInfo }) {
if (!post) {
return <>loading...</>
return <></>
}
const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("${siteInfo?.pageCover}")`
const { isDarkMode } = useGlobal()

View File

@@ -1,12 +1,13 @@
import BLOG from '@/blog.config'
import Link from 'next/link'
import React from 'react'
const Logo = props => {
const { siteInfo } = props
return <Link href='/' passHref>
<div className='flex flex-col justify-center items-center cursor-pointer space-y-3'>
<div className='font-sans text-lg p-1.5 rounded bg-black text-white dark:border-white border-black border'> {siteInfo?.title}</div>
</div>
<div className='flex flex-col justify-center items-center cursor-pointer space-y-3'>
<div className='font-sans text-lg p-1.5 rounded bg-black text-white dark:border-white border-black border'> {siteInfo?.title || BLOG.TITLE}</div>
</div>
</Link>
}
export default Logo