Merge branch 'main' into original-fix

This commit is contained in:
tangly1024
2025-01-01 15:49:15 +08:00
committed by GitHub
355 changed files with 16915 additions and 6775 deletions

View File

@@ -73,7 +73,7 @@ const Catalog = ({ toc }) => {
key={id}
href={`#${id}`}
className={`notion-table-of-contents-item duration-300 transform font-light
notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `}>
notion-table-of-contents-item-indent-level-${tocItem.indentLevel} catalog-item `}>
<span
style={{
display: 'inline-block',

View File

@@ -1,26 +1,27 @@
import { BeiAnGongAn } from '@/components/BeiAnGongAn'
import BeiAnSite from '@/components/BeiAnSite'
import CopyRightDate from '@/components/CopyRightDate'
import DarkModeButton from '@/components/DarkModeButton'
import { siteConfig } from '@/lib/config'
import PoweredBy from '@/components/PoweredBy'
export const Footer = (props) => {
const d = new Date()
const currentYear = d.getFullYear()
const since = siteConfig('SINCE')
const copyrightDate = parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
export const Footer = props => {
return (
<footer className='z-10 relative w-full bg-white px-6 space-y-1 border-t dark:border-hexo-black-gray dark:bg-hexo-black-gray '>
<DarkModeButton className='text-center pt-4' />
return <footer className="z-10 relative w-full bg-white px-6 border-t dark:border-hexo-black-gray dark:bg-hexo-black-gray ">
<DarkModeButton className='text-center pt-4'/>
<div className="container mx-auto max-w-4xl py-6 md:flex flex-wrap md:flex-no-wrap md:justify-between items-center text-sm">
<div className='text-center'> &copy;{`${copyrightDate}`} {siteConfig('AUTHOR')}. All rights reserved.</div>
<div className="md:p-0 text-center md:text-right text-xs">
{/* 右侧链接 */}
{/* <a href="#" className="text-black no-underline hover:underline">Privacy Policy</a> */}
{siteConfig('BEI_AN') && (<a href="https://beian.miit.gov.cn/" className="text-black dark:text-gray-200 no-underline hover:underline ml-4">{siteConfig('BEI_AN')} </a>)}
<span className='dark:text-gray-200 no-underline ml-4'>
Powered by
<a href="https://github.com/tangly1024/NotionNext" className=' hover:underline'> NotionNext {siteConfig('VERSION')} </a>
</span>
</div>
<div className='container mx-auto max-w-4xl py-6 md:flex flex-wrap md:flex-no-wrap md:justify-between items-center text-sm'>
<CopyRightDate />
<div className='md:p-0 text-center md:text-right text-xs'>
{/* 右侧链接 */}
{/* <a href="#" className="text-black no-underline hover:underline">Privacy Policy</a> */}
<div className='flex flex-wrap'>
{' '}
<BeiAnSite />
<BeiAnGongAn />
</div>
<PoweredBy />
</div>
</div>
</footer>
)
}

View File

@@ -13,7 +13,7 @@ export const Header = props => {
<div className='mx-auto max-w-4xl md:flex justify-between items-center'>
<Link
href='/'
className='py-6 w-full text-center md:text-left md:w-auto text-gray-dark no-underline flex justify-center items-center'>
className='logo py-6 w-full text-center md:text-left md:w-auto text-gray-dark no-underline flex justify-center items-center'>
{siteConfig('TITLE')}
</Link>
<div className='w-full md:w-auto text-center md:text-right'>

View File

@@ -156,13 +156,14 @@ const LayoutPostList = props => {
const LayoutSlug = props => {
const { post, lock, validPassword } = props
const router = useRouter()
const waiting404 = siteConfig('POST_WAITING_TIME_FOR_404') * 1000
useEffect(() => {
// 404
if (!post) {
setTimeout(
() => {
if (isBrowser) {
const article = document.getElementById('notion-article')
const article = document.querySelector('#article-wrapper #notion-article')
if (!article) {
router.push('/404').then(() => {
console.warn('找不到页面', router.asPath)
@@ -170,7 +171,7 @@ const LayoutSlug = props => {
}
}
},
siteConfig('POST_WAITING_TIME_FOR_404') * 1000
waiting404
)
}
}, [post])
@@ -178,11 +179,13 @@ const LayoutSlug = props => {
<>
{lock ? (
<PostLock validPassword={validPassword} />
) : (
<div id='article-wrapper'>
) : post && (
<div>
<PostMeta post={post} />
<NotionPage post={post} />
<ShareBar post={post} />
<div id='article-wrapper'>
<NotionPage post={post} />
<ShareBar post={post} />
</div>
<Comment frontMatter={post} />
</div>
)}