mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
Gitbook导航微调
This commit is contained in:
@@ -6,13 +6,12 @@ const BlogPostCard = ({ post, className }) => {
|
||||
const router = useRouter()
|
||||
const currentSelected = router.asPath.split('?')[0] === '/' + post.slug
|
||||
return (
|
||||
<div key={post.id} className={`${className} py-1 cursor-pointer px-2 hover:bg-gray-50 rounded-md dark:hover:bg-gray-600 ${currentSelected ? 'bg-green-50 text-green-500' : ''}`}>
|
||||
<Link href={`${siteConfig('SUB_PATH', '')}/${post.slug}`} passHref> <div key={post.id} className={`${className} py-1.5 cursor-pointer px-1.5 hover:bg-gray-50 rounded-md dark:hover:bg-gray-600 ${currentSelected ? 'bg-green-50 text-green-500' : ''}`}>
|
||||
<div className="flex flex-col w-full select-none">
|
||||
<Link href={`${siteConfig('SUB_PATH', '')}/${post.slug}`} passHref>
|
||||
{post.title}
|
||||
</Link>
|
||||
{post.title}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ const NavPostList = (props) => {
|
||||
if (!groupedArray || groupedArray.length === 0) {
|
||||
return <NavPostListEmpty />
|
||||
} else {
|
||||
return <div id='posts-wrapper' className='w-full flex-grow'>
|
||||
return <div id='posts-wrapper' className='w-full flex-grow space-y-0.5 tracking-wider'>
|
||||
{/* 文章列表 */}
|
||||
{groupedArray?.map((group, index) => <NavPostItem key={index} group={group} onHeightChange={props.onHeightChange}/>)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user