封装useGlobal组件,存放全局变量;
新增search页面,修复搜索页无法分页的bug
This commit is contained in:
tangly1024
2021-11-04 13:28:08 +08:00
parent 8f9d3c45e7
commit 4b53a3612c
21 changed files with 214 additions and 169 deletions

View File

@@ -39,7 +39,7 @@ const BlogPost = ({ post, blockMap, tags, prev, next, posts }) => {
const targetRef = useRef(null)
const url = BLOG.link + useRouter().asPath
return <BaseLayout meta={meta} tags={tags} post={post} posts={posts}>
return <BaseLayout meta={meta} tags={tags} totalPosts={post} posts={posts}>
{/* 阅读进度条 */}
<Progress targetRef={targetRef} />
@@ -61,8 +61,12 @@ const BlogPost = ({ post, blockMap, tags, prev, next, posts }) => {
{post.title}
</h1>
<h2 className='text-gray-500 my-5 dark:text-gray-400 animate__animated animate__fadeIn'>
{post.summary}
</h2>
{/* 文章信息 */}
<div className='justify-between flex flex-wrap bg-gray-50 p-2 dark:bg-gray-700 dark:text-white'>
<div className='justify-between flex flex-wrap bg-gray-50 p-2 dark:bg-gray-800 dark:text-white'>
<div className='flex-nowrap flex'>
{post.slug !== 'about' && (<>