Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Fix: Post style #926

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/web/src/scenes/Home/components/post/Post.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
height: auto;
max-width: 260px;
max-height: 170px;
min-height: 170px;
top: 50%;
transform: translateY(-50%);
position: relative;
Expand Down Expand Up @@ -92,7 +93,6 @@

.home-post-interaction {
position: relative;
margin-top: 110px;
margin-right: 20px;
}

Expand Down
10 changes: 6 additions & 4 deletions src/main/web/src/scenes/Home/components/post/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const Post: React.FC<PostModel> = (props: PostModel) => {
setMarginLeft(tags ? '110px' : '0');
setMarginTop(postImage ? '140px' : '5px');
} else {
setWidth(postImage ? '330px' : '600px');
setWidth(postImage ? '360px' : '600px');
setMarginLeft(postImage ? (imageWidth ? `${imageWidth + 20}px` : '280px') : '10px');
setMarginTop('0');
}
Expand Down Expand Up @@ -211,21 +211,23 @@ export const Post: React.FC<PostModel> = (props: PostModel) => {
&nbsp;· {formattedTime}
</div>
</div>
<div className="home-post-interaction">
<div className="home-post-interaction"
style={{marginTop: `${parseInt(marginTop as string) + 110}px`}}>
<Interaction
likes={likes}
userLiked={userLiked}
heartClass={heartClass}
comments={comments}
handleLike={() => handleLike(id, "post", likes, setLikes, setUserLiked, setHeartClass)}
id={id}
isHomepage={true}/>
isHomepage={true}
/>
</div>
</div>

{menuOpen && (
<div className="post-menu-container">
<PostMenu
<PostMenu
handleShareClick={handleShareClick}
handleSaveClick={handleSaveClick}
handleUnsaveClick={handleUnsaveClick}
Expand Down
2 changes: 2 additions & 0 deletions src/main/web/src/scenes/Post/PostDetail.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
height: auto;
max-height: 250px;
max-width: 420px;
min-height: 230px;
position: relative;
border-radius: 10px;
object-fit: contain;
}

.post-detail-infos {
Expand Down
Loading