mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 15:09:31 +00:00
feature:
标签加入颜色
This commit is contained in:
@@ -3,7 +3,7 @@ import TagItemMini from '@/components/TagItemMini'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
|
||||
const BlogPostCard = ({ post }) => {
|
||||
const BlogPostCard = ({ post, tags }) => {
|
||||
return (
|
||||
<div key={post.id}
|
||||
className='animate__animated animate__fadeIn animate__faster xl:flex shadow-card border dark:border-gray-600 mb-6 w-full bg-white bg-opacity-80 dark:bg-gray-800 dark:hover:bg-gray-700 overflow-hidden'>
|
||||
@@ -25,12 +25,14 @@ const BlogPostCard = ({ post }) => {
|
||||
<div className='flex md:flex-nowrap flex-wrap md:justify-start justify-between pt-5'>
|
||||
<div className='flex whitespace-nowrap'>
|
||||
<Link href={`/category/${post.category}`}>
|
||||
<div className='cursor-pointer dark:text-gray-200 text-gray-500 text-sm py-1.5 mr-1 underline hover:scale-105 transform duration-200'><i
|
||||
className='fa fa-folder-open-o mr-1' />{post.category}</div>
|
||||
<div
|
||||
className='cursor-pointer dark:text-gray-200 text-gray-500 text-sm py-1.5 mr-1 underline hover:scale-105 transform duration-200'>
|
||||
<i
|
||||
className='fa fa-folder-open-o mr-1' />{post.category}</div>
|
||||
</Link>
|
||||
<span className='mt-2 mx-2 text-gray-500 dark:text-gray-300 text-sm leading-4'>{post.date.start_date}</span>
|
||||
</div>
|
||||
<div className='flex ml-1'> {post.tags.map(tag => (<TagItemMini key={tag} tag={tag} />))}</div>
|
||||
<div className='flex ml-1'> {post.tagItems.map(tag => (<TagItemMini key={tag.name} tag={tag} />))}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user