mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
feature:
日期跳转归档
This commit is contained in:
@@ -14,7 +14,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
|
||||
return <></>
|
||||
} else {
|
||||
return <div ref={targetRef}>
|
||||
<div className='pt-14 pb-4 text-3xl dark:text-white' id={archiveTitle}>{archiveTitle}</div>
|
||||
<div className='pt-16 pb-4 text-3xl dark:text-white' id={archiveTitle}>{archiveTitle}</div>
|
||||
<ul className='flex flex-wrap space-y-1'>
|
||||
{posts.map(post => (
|
||||
<Link key={post.id} href={`${BLOG.path}/article/${post.slug}`} passHref>
|
||||
|
||||
@@ -24,7 +24,7 @@ const BlogPostCard = ({ post, tags }) => {
|
||||
</span>
|
||||
</Link>
|
||||
<span className='mx-1 dark:text-gray-400'>|</span>
|
||||
<Link href='/archive' passHref>
|
||||
<Link href={`/archive#${post?.date?.start_date?.substr(0, 7)}`} passHref>
|
||||
<span className='mt-2 mx-2 text-gray-400 hover:text-blue-400 hover:underline cursor-pointer dark:text-gray-300 text-sm leading-4'>{post.date.start_date}</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user