Skip to content

Commit

Permalink
style: 样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghao1993 committed Sep 4, 2024
1 parent 4d3b805 commit 292c571
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/Article/ArticleItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function ArticleItem(data: { articleInfo: Post }) {
return (
<div className="border rounded-lg">
<div className="p-4">
{/* title */}
<Link
href={`/blog/${articleInfo.key}`}
className="horizontal-underline horizontal-underline-active "
Expand All @@ -27,21 +26,21 @@ export default function ArticleItem(data: { articleInfo: Post }) {
{data.articleInfo.description}
</p>
<div className="py-1 rounded-full text-xs font-medium m-4 flex">
<div>
<div className="flex flex-wrap items-center">
{data.articleInfo.categories &&
data.articleInfo.categories.split(",").map((item) => (
<Link
key={item}
href={`blog/category/${item}`}
className="px-2 mr-1 rounded-lg bg-primary-500 text-white"
className="px-2 mr-1 rounded-lg bg-primary-500 text-white min-w-10"
>
{item}
</Link>
))}
</div>

<Divider type="vertical" />
<div>
<div className="flex flex-wrap space-y-2 items-baseline">
{data.articleInfo.tags &&
data.articleInfo.tags.split(",").map((item) => (
<Link
Expand Down

0 comments on commit 292c571

Please sign in to comment.