主题适配twikoo评论数

This commit is contained in:
tangly1024
2023-05-07 19:01:34 +08:00
parent eecac656e1
commit baa6fa753f
8 changed files with 196 additions and 200 deletions

View File

@@ -1,6 +1,7 @@
import BLOG from '@/blog.config'
import Link from 'next/link'
import CONFIG_SIMPLE from '../config_simple'
import TwikooCommentCount from '@/components/TwikooCommenCount'
export const BlogItem = props => {
const { post } = props
@@ -18,6 +19,7 @@ export const BlogItem = props => {
<div className="mb-4 text-sm text-gray-700 dark:text-gray-300">
<span> <i className="fa-regular fa-user"></i> <a href={CONFIG_SIMPLE.AUTHOR_LINK}>{BLOG.AUTHOR}</a></span>
<span> - <i className="fa-regular fa-clock"></i> {post.date?.start_date || post.createdTime}</span>
<span> - <TwikooCommentCount post={post}/></span>
{post.category && <span> - <i className="fa-regular fa-folder"></i> <a href={`/category/${post.category}`} className="hover:text-red-400 transition-all duration-200">{post.category}</a></span>}
{post.tags && post.tags?.length > 0 && post.tags.map(t => <span key={t}> / <Link href={`/tag/${t}`}><span className=' hover:text-red-400 transition-all duration-200'>{t}</span></Link></span>)}
</div>