diff --git a/src/components/home/HomeFeed.tsx b/src/components/home/HomeFeed.tsx index 16d10d37..b50c4c67 100644 --- a/src/components/home/HomeFeed.tsx +++ b/src/components/home/HomeFeed.tsx @@ -64,11 +64,72 @@ const PostCard = ({ cover={post.metadata?.content.cover} title={post.metadata?.content?.title} /> -
-
+
+
+ {comment && ( +
+ + {comment} +
+ )} +

+ {post.metadata?.content?.title} +

+ {!comment && ( +
+ {keyword + ? reactStringReplace( + post.metadata?.content?.summary || "", + keyword, + (match, i) => ( + + {match} + + ), + ) + : post.metadata?.content?.summary} + {post.metadata?.content?.summary && "..."} +
+ )} +
+ {(!!post.metadata?.content?.tags?.[1] || + post.stat?.viewDetailCount) && ( +
+ {!!post.metadata?.content?.tags?.[1] && ( + + { + e.preventDefault() + router.push(`/tag/${post.metadata?.content?.tags?.[1]}`) + }} + > + #{post.metadata?.content?.tags?.[1]} + + + )} + {!!post.stat?.viewDetailCount && ( + + + {post.stat?.viewDetailCount} + + )} +
+ )} +
{ e.preventDefault() window.open( @@ -78,15 +139,15 @@ const PostCard = ({ ) }} > - + - + {character?.metadata?.content?.name || character?.handle} @@ -109,70 +170,6 @@ const PostCard = ({ })}
- {comment && ( -
- - {comment} -
- )} -

- {post.metadata?.content?.title} -

- {(!!post.metadata?.content?.tags?.filter( - (tag) => tag !== "post" && tag !== "page", - ).length || - post.stat?.viewDetailCount) && ( -
- - {post.metadata?.content?.tags - ?.filter((tag) => tag !== "post" && tag !== "page") - .map((tag, index) => ( - { - e.preventDefault() - router.push(`/tag/${tag}`) - }} - > - #{tag} - - ))} - - {post.stat?.viewDetailCount && ( - - - {post.stat?.viewDetailCount} - - )} -
- )} - {!comment && ( -
- {keyword - ? reactStringReplace( - post.metadata?.content?.summary || "", - keyword, - (match, i) => ( - - {match} - - ), - ) - : post.metadata?.content?.summary} - {post.metadata?.content?.summary && "..."} -
- )}
)