新增Logo;新增bio配置项

This commit is contained in:
tangly1024
2022-01-04 14:54:37 +08:00
parent 3cd8a3ca80
commit 7bfe188a7e
9 changed files with 39 additions and 29 deletions

View File

@@ -7,6 +7,7 @@ import { faAngleDoubleRight, faArchive, faTags, faThList } from '@fortawesome/fr
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import Link from 'next/link'
import React from 'react'
import Logo from './Logo'
/**
* 侧边栏
@@ -22,22 +23,15 @@ import React from 'react'
*/
const SideBar = ({ title, tags, currentTag, post, posts, categories, currentCategory, currentSearch }) => {
const { locale } = useGlobal()
return <aside id='sidebar' className='pt-5 bg-white dark:bg-gray-900 w-80 z-10 dark:border-gray-500 border-gray-200 scroll-hidden h-full'>
return <aside id='sidebar' className='bg-white dark:bg-gray-900 w-80 z-10 dark:border-gray-500 border-gray-200 scroll-hidden h-full'>
<div className={(!post ? 'sticky top-0' : '') + ' bg-white dark:bg-gray-900 pb-4'}>
<InfoCard />
{/* 最新文章 */}
{posts && (
<section className='mt-4'>
<div className='text-sm pb-4 px-5 flex flex-nowrap justify-between'>
<div className='font-light text-gray-600 dark:text-gray-200'><FontAwesomeIcon icon={faArchive} className='mr-2' />{locale.COMMON.LATEST_POSTS}</div>
</div>
<LatestPostsGroup posts={posts} />
</section>
)}
<section className='py-5'>
<InfoCard />
</section>
<Logo/>
{/* 分类 */}
{categories && (
<section className='mt-8'>
@@ -55,7 +49,7 @@ const SideBar = ({ title, tags, currentTag, post, posts, categories, currentCate
{/* 标签云 */}
{tags && (
<section className='mt-8'>
<section className='mt-4'>
<div className='text-sm py-2 px-5 flex flex-nowrap justify-between font-light dark:text-gray-200'>
<div className='text-gray-600 dark:text-gray-200'><FontAwesomeIcon icon={faTags} className='mr-2'/>{locale.COMMON.TAGS}</div>
<Link href='/tag' passHref>
@@ -69,6 +63,16 @@ const SideBar = ({ title, tags, currentTag, post, posts, categories, currentCate
</div>
</section>
)}
{/* 最新文章 */}
{posts && (
<section className='mt-8'>
<div className='text-sm pb-4 px-5 flex flex-nowrap justify-between'>
<div className='font-light text-gray-600 dark:text-gray-200'><FontAwesomeIcon icon={faArchive} className='mr-2' />{locale.COMMON.LATEST_POSTS}</div>
</div>
<LatestPostsGroup posts={posts} />
</section>
)}
</div>
<section className='bg-white dark:bg-gray-900'>