样式微调

This commit is contained in:
tangly1024
2021-11-08 13:30:23 +08:00
parent e8392ee033
commit 3845a113cf
3 changed files with 6 additions and 4 deletions

View File

@@ -5,11 +5,11 @@ import React from 'react'
const BlogPostCard = ({ post }) => {
return (
<div key={post.id} className='2xl:flex animate__animated animate__fadeIn animate__faster shadow-2xl border dark:border-gray-600 my-2 w-full 2xl:max-w-2xl bg-white bg-opacity-80 dark:bg-gray-800 dark:hover:bg-gray-700 overflow-hidden'>
<div key={post.id} className='animate__animated animate__fadeIn animate__faster shadow-xl border dark:border-gray-600 my-2 w-full 2xl:max-w-3xl bg-white bg-opacity-80 dark:bg-gray-800 dark:hover:bg-gray-700 overflow-hidden'>
{/* 封面图 */}
{post.page_cover && post.page_cover.length > 1 && (
<Link href={`${BLOG.path}/article/${post.slug}`} className='md:flex-shrink-0 md:w-52 md:h-52 rounded-lg'>
<img className='w-full 2xl:w-80 2xl:h-full object-cover cursor-pointer transform hover:scale-110 duration-500' src={post.page_cover} alt={post.title} />
<Link href={`${BLOG.path}/article/${post.slug}`}>
<img className='w-full 2xl:h-60 object-cover cursor-pointer transform hover:scale-110 duration-500' src={post.page_cover} alt={post.title} />
</Link>
)}

View File

@@ -51,7 +51,7 @@ const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory,
if (!postsToShow || postsToShow.length === 0) {
return <BlogPostListEmpty currentSearch={currentSearch}/>
} else {
return <div id='post-list-wrapper' className='mt-20 mx-2 pt-10 md:mx-20' ref={targetRef}>
return <div id='post-list-wrapper' className='mt-20 mx-2 md:mx-20' ref={targetRef}>
{currentCategory && (
<div className='w-full p-1 bg-gray-100 dark:bg-gray-700'>

View File

@@ -44,6 +44,8 @@ const Search = ({ posts, tags, meta, categories }) => {
<BaseLayout meta={meta} tags={tags} totalPosts={posts} currentSearch={searchKey} categories={categories}>
<div className='flex-grow bg-gray-200 dark:bg-black shadow-inner'>
<TagsBar tags={tags} />
{/* 标签栏留白 */}
<div className='my-6 md:pt-0'/>
<BlogPostListScroll posts={filteredPosts} tags={tags} currentSearch={searchKey} />
</div>
</BaseLayout>