微调样式

This commit is contained in:
tangly1024
2021-10-15 09:26:26 +08:00
parent 14699b63ae
commit fb4b93d5f1
3 changed files with 12 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ const BLOG = {
darkBackground: '#111827', // use hex value, don't forget '#' darkBackground: '#111827', // use hex value, don't forget '#'
path: '', // leave this empty unless you want to deploy in a folder path: '', // leave this empty unless you want to deploy in a folder
since: 2020, // if leave this empty, current year will be used. since: 2020, // if leave this empty, current year will be used.
postsPerPage: 6, // post counts per page postsPerPage: 8, // post counts per page
sortByDate: false, sortByDate: false,
showAbout: true, // WIP showAbout: true, // WIP
showArchive: true, // WIP showArchive: true, // WIP

View File

@@ -5,19 +5,23 @@ import TagList from '@/components/TagList'
const SideBar = ({ tags, currentTag, post }) => { const SideBar = ({ tags, currentTag, post }) => {
return <aside className='z-10 dark:border-gray-500 border-gray-200 bg-white hidden md:block'> return <aside className='z-10 dark:border-gray-500 border-gray-200 bg-white hidden md:block'>
<div className='dark:bg-gray-800 border-r dark:border-gray-700 h-full scroll-hidden left-0 duration-500 ease-in-out min-h-screen'> <div
className='dark:bg-gray-800 border-r dark:border-gray-700 h-full scroll-hidden left-0 duration-500 ease-in-out min-h-screen'>
<div id='sidebar' className='hidden md:block sticky top-20 duration-500'> <div id='sidebar' className='hidden md:block sticky top-20 duration-500'>
<InfoCard/> <div className='hidden xl:block'>
<hr className='dark:border-gray-700'/> <InfoCard />
<hr className='dark:border-gray-700' />
</div>
<div className={post ? 'hidden xl:block' : 'block'}> <div className={post ? 'hidden xl:block' : 'block'}>
<MenuButtonGroup allowCollapse={true}/> <MenuButtonGroup allowCollapse={true} />
</div> </div>
{tags && ( {tags && (
<div> <div>
{/* 标签云 */} {/* 标签云 */}
<hr className='dark:border-gray-700'/> <hr className='dark:border-gray-700' />
<section className='py-3 px-5 text-gray-600 dark:text-gray-400 dark:hover:bg-black duration-100 flex flex-nowrap align-middle'> <section
className='py-3 px-5 text-gray-600 dark:text-gray-400 dark:hover:bg-black duration-100 flex flex-nowrap align-middle'>
<div className='my-auto w-5 text-xl justify-center flex'> <div className='my-auto w-5 text-xl justify-center flex'>
<i className='fa fa-tags' /> <i className='fa fa-tags' />
</div> </div>

View File

@@ -71,7 +71,7 @@ const IndexLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
<div className=''> <div className=''>
{/* 文章列表 */} {/* 文章列表 */}
<div className='grid xl:grid-cols-3 md:grid-cols-2 grid-cols-1 gap-3'> <div className='grid 2xl:grid-cols-4 xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2 grid-cols-1 gap-3'>
{!postsToShow.length && ( {!postsToShow.length && (
<p className='text-gray-500 dark:text-gray-300'>No posts found.</p> <p className='text-gray-500 dark:text-gray-300'>No posts found.</p>
)} )}