mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
重新排版优化
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import TagItem from '@/components/TagItem'
|
||||
import TagItemMini from '@/components/TagItemMini'
|
||||
|
||||
const BlogPost = ({ post }) => {
|
||||
return (
|
||||
<article key={post.id}
|
||||
className='inline-block border dark:border-gray-600 my-2 shadow-card w-full md:max-w-md bg-white dark:bg-gray-700 dark:hover:bg-gray-600 overflow-hidden'>
|
||||
className='inline-block border dark:border-gray-600 my-2 w-full md:max-w-md bg-white dark:bg-gray-700 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'>
|
||||
@@ -14,15 +14,14 @@ const BlogPost = ({ post }) => {
|
||||
|
||||
<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-100 hover:underline'>
|
||||
className='block my-3 text-2xl leading-tight font-bold text-black dark:text-gray-100 hover:underline'>
|
||||
{post.title}
|
||||
</a>
|
||||
<div className='flex flex-nowrap'>
|
||||
{post.tags.map(tag => (<TagItemMini key={tag} tag={tag} />))}
|
||||
<span className='mt-2 mx-2 text-gray-500 dark:text-gray-300 text-sm leading-4'>{post.date.start_date}</span>
|
||||
</div>
|
||||
<p className='mt-2 text-gray-500 dark:text-gray-300 text-sm'>{post.summary}</p>
|
||||
<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