matery/medium refactor

This commit is contained in:
tangly1024
2023-07-04 22:27:45 +08:00
parent ffc6db74cb
commit 64a747af0d
33 changed files with 917 additions and 988 deletions

View File

@@ -0,0 +1,19 @@
import { useGlobal } from '@/lib/global'
/**
* 文章列表上方嵌入
* @param {*} props
* @returns
*/
export default function BlogPostBar(props) {
const { tag, category } = props
const { locale } = useGlobal()
if (tag) {
return <div className='flex items-center py-8'><div className='text-xl'><i className='mr-2 fas fa-tag' />{locale.COMMON.TAGS}:</div>{tag}</div>
} else if (category) {
<div className='flex items-center py-8'><div className='text-xl'><i className='mr-2 fas fa-th' />{locale.COMMON.CATEGORY}:</div>{category}</div>
} else {
return <></>
}
}