mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 15:09:34 +00:00
🏄 瀑布流
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import TagItem from '@/components/TagItem'
|
||||
|
||||
const BlogPost = ({ post }) => {
|
||||
return (
|
||||
<article key={post.id}
|
||||
className='md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 hover:shadow-2xl rounded-3xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600 overflow-hidden'>
|
||||
className='inline-block my-2 md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 rounded-3xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600 overflow-hidden'>
|
||||
{/* 封面图 */}
|
||||
{post.page_cover && post.page_cover.length > 1 && (
|
||||
<a href={`${BLOG.path}/article/${post.slug}`} className='md:flex-shrink-0 md:w-52 md:h-52 rounded-lg'>
|
||||
@@ -11,13 +12,18 @@ const BlogPost = ({ post }) => {
|
||||
</a>
|
||||
)}
|
||||
|
||||
<main className='px-8 py-2'>
|
||||
<div className='px-8 py-6'>
|
||||
<a href={`${BLOG.path}/article/${post.slug}`}
|
||||
className='block my-3 text-2xl leading-tight font-semibold text-black dark:text-gray-200 hover:underline'>
|
||||
{post.title}
|
||||
</a>
|
||||
<p className='mt-2 text-gray-500 dark:text-gray-400 text-sm'>{post.summary}</p>
|
||||
</main>
|
||||
<div className='flex flex-nowrap leading-8 py-2'>
|
||||
{post.tags.map(tag => (
|
||||
<TagItem key={tag} tag={tag} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user