This commit is contained in:
tangly
2021-11-07 08:52:07 +08:00
4 changed files with 11 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
import React, { useCallback } from 'react' import React, { useCallback } from 'react'
import throttle from 'lodash.throttle' import throttle from 'lodash.throttle'
import { uuidToId } from 'notion-utils' import { uuidToId } from 'notion-utils'
import { cs } from 'react-notion-x' // import { cs } from 'react-notion-x'
/** /**
* 目录导航组件 * 目录导航组件
@@ -62,12 +62,9 @@ const Toc = ({ toc }) => {
<a <a
key={id} key={id}
href={`#${id}`} href={`#${id}`}
className={cs( className={`notion-table-of-contents-item px-5
'notion-table-of-contents-item px-5', notion-table-of-contents-item-indent-level-${tocItem.indentLevel}
`notion-table-of-contents-item-indent-level-${tocItem.indentLevel}`, ${activeSection === id && ' font-bold text-black dark:text-white animate-pulse'}`}
activeSection === id &&
' font-bold text-black dark:text-white animate-pulse'
)}
> >
<span <span
className='notion-table-of-contents-item-body' className='notion-table-of-contents-item-body'

View File

@@ -29,15 +29,15 @@
"lodash.throttle": "^4.1.1", "lodash.throttle": "^4.1.1",
"memory-cache": "^0.2.0", "memory-cache": "^0.2.0",
"next": "10.2.0", "next": "10.2.0",
"notion-client": "4.9.3", "notion-client": "4.10.0",
"notion-utils": "4.8.6", "notion-utils": "4.10.0",
"preact": "^10.5.13", "preact": "^10.5.13",
"qrcode.react": "^1.0.1", "qrcode.react": "^1.0.1",
"react": "17.0.2", "react": "17.0.2",
"react-cookies": "^0.1.1", "react-cookies": "^0.1.1",
"react-cusdis": "^2.0.1", "react-cusdis": "^2.0.1",
"react-dom": "17.0.2", "react-dom": "17.0.2",
"react-notion-x": "^4.6.5", "react-notion-x": "4.6.5",
"use-ackee": "^3.0.0" "use-ackee": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -137,7 +137,7 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, posts, categories })
{post.tags && ( {post.tags && (
<div className='flex flex-nowrap leading-8 p-1 py-4'> <div className='flex flex-nowrap leading-8 p-1 py-4'>
<div className='hidden md:block'>标签</div> <div className='hidden md:block dark:text-gray-300'>标签</div>
{post.tags.map(tag => ( {post.tags.map(tag => (
<TagItem key={tag} tag={tag} /> <TagItem key={tag} tag={tag} />
))} ))}

View File

@@ -180,14 +180,15 @@
min-height: 100vh; min-height: 100vh;
} }
/* .notion-viewport { .notion-viewport {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: -10; z-index: -10;
} */ pointer-events: none;
}
.medium-zoom-overlay { .medium-zoom-overlay {
z-index: 300; z-index: 300;