三列排版
This commit is contained in:
tangly1024
2021-12-20 15:39:05 +08:00
parent 44121bf50b
commit 44df05243c
20 changed files with 230 additions and 136 deletions

View File

@@ -8,7 +8,7 @@ import TagItemMini from './TagItemMini'
const BlogPostCard = ({ post, tags }) => {
return (
<div key={post.id} className='flex md:flex-row flex-col-reverse justify-between hover:shadow-2xl shadow-md mb-8 duration-300 rounded-xl
<div key={post.id} className='flex 2xl:flex-row flex-col-reverse justify-between hover:shadow-2xl shadow-md mb-8 duration-300 rounded-xl
w-full mx-2 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-600'>
<div className='p-8 flex flex-col justify-between w-full'>
@@ -41,8 +41,8 @@ const BlogPostCard = ({ post, tags }) => {
{post?.page_cover && (
<Link href={`${BLOG.path}/article/${post.slug}`} passHref>
<div className='h-60 w-full md:max-w-sm relative rounded-t-xl md:rounded-t-none md:rounded-r-xl md:h-full duration-200 cursor-pointer transform overflow-hidden'>
<Image className='hover:scale-105 transform duration-500 rounded-t-xl md:rounded-t-none md:rounded-r-xl' src={post?.page_cover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' />
<div className='h-60 w-full 2xl:max-w-sm relative rounded-t-xl 2xl:rounded-t-none 2xl:rounded-r-xl 2xl:h-full duration-200 cursor-pointer transform overflow-hidden'>
<Image className='hover:scale-105 transform duration-500 rounded-t-xl 2xl:rounded-t-none 2xl:rounded-r-xl' src={post?.page_cover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' />
</div>
</Link>
)}