style(cards): normalize card list layout and padding across pages
This commit is contained in:
@@ -76,7 +76,7 @@ export default function CommunityPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<div className="flex flex-col gap-4">
|
||||
{filteredPosts.map((post) =>
|
||||
(() => {
|
||||
const linkedOrder = post.linkedOrderId
|
||||
@@ -87,9 +87,9 @@ export default function CommunityPage() {
|
||||
: null
|
||||
|
||||
return (
|
||||
<Link key={post.id} href={`/post/${post.id}`}>
|
||||
<Card className="hover:shadow-md transition-shadow">
|
||||
<CardHeader className="pb-3">
|
||||
<Link key={post.id} href={`/post/${post.id}`} className="block">
|
||||
<Card className="hover:shadow-md transition-shadow gap-4">
|
||||
<CardHeader>
|
||||
<div className="flex items-center gap-3">
|
||||
<Avatar className="h-9 w-9">
|
||||
<AvatarImage src={post.author.avatar} />
|
||||
@@ -109,7 +109,7 @@ export default function CommunityPage() {
|
||||
</div>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="pb-3">
|
||||
<CardContent>
|
||||
<h3 className="font-semibold mb-1">{post.title}</h3>
|
||||
<p className="text-sm text-muted-foreground line-clamp-2">{post.content}</p>
|
||||
{post.tags.length > 0 && (
|
||||
@@ -141,7 +141,7 @@ export default function CommunityPage() {
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
<CardFooter className="pt-0 text-sm text-muted-foreground gap-4">
|
||||
<CardFooter className="text-sm text-muted-foreground gap-4">
|
||||
<span className="flex items-center gap-1">
|
||||
<Heart
|
||||
className={`h-4 w-4 ${post.liked ? "fill-red-500 text-red-500" : ""}`}
|
||||
|
||||
Reference in New Issue
Block a user