日期跳转归档
This commit is contained in:
tangly
2021-12-05 13:38:49 +08:00
parent 3a040dd794
commit 490f05b448
2 changed files with 2 additions and 2 deletions

View File

@@ -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>

View File

@@ -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>