mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 07:26:47 +00:00
feature: 剥离主题目录
This commit is contained in:
26
themes/NEXT/TagIndexLayout.js
Normal file
26
themes/NEXT/TagIndexLayout.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import BLOG from '@/blog.config'
|
||||
import BaseLayout from './BaseLayout'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faTags } from '@fortawesome/free-solid-svg-icons'
|
||||
import TagItem from './components/TagItem'
|
||||
|
||||
const TagIndexLayout = ({ tags, categories, postCount, latestPosts }) => {
|
||||
const { locale } = useGlobal()
|
||||
const meta = {
|
||||
title: `${locale.COMMON.TAGS} | ${BLOG.title}`,
|
||||
description: BLOG.description,
|
||||
type: 'website'
|
||||
}
|
||||
return <BaseLayout meta={meta} categories={categories} postCount={postCount} latestPosts={latestPosts}>
|
||||
<div className='bg-white dark:bg-gray-700 px-10 py-10 shadow'>
|
||||
<div className='dark:text-gray-200 mb-5'><FontAwesomeIcon icon={faTags} className='mr-4'/>{locale.COMMON.TAGS}:</div>
|
||||
<div id='tags-list' className='duration-200 flex flex-wrap'>
|
||||
{ tags.map(tag => {
|
||||
return <div key={tag.name} className='p-2'><TagItem key={tag.name} tag={tag} /></div>
|
||||
}) }
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
}
|
||||
export default TagIndexLayout
|
||||
Reference in New Issue
Block a user