magzine主题雏形

This commit is contained in:
tangly1024.com
2024-09-12 19:14:57 +08:00
parent d31acf80b3
commit 4ca437b93f
40 changed files with 2362 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
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 text-xl py-8'>
<i className='mr-2 fas fa-tag' />
{locale.COMMON.TAGS}:{tag}
</div>
)
} else if (category) {
return (
<div className='flex items-center text-xl py-8'>
<i className='mr-2 fas fa-th' />
{locale.COMMON.CATEGORY}:{category}
</div>
)
} else {
return <></>
}
}