improve postCard & postPage for mobile

This commit is contained in:
SrGooglo 2022-11-24 15:17:25 +00:00
parent ccd020d4b3
commit 9c4bde5d5a
2 changed files with 33 additions and 4 deletions

View File

@ -3,9 +3,12 @@ import * as antd from "antd"
import Post from "models/post"
import { PostCard, CommentsCard } from "components"
import { FloatingPanel } from "antd-mobile"
import "./index.less"
const floatingPanelAnchors = [160, 72 + 119, window.innerHeight * 0.8]
export default (props) => {
const post_id = props.match.params.post_id
@ -35,5 +38,9 @@ export default (props) => {
return <div className="postPage">
<PostCard data={data} fullmode />
<FloatingPanel anchors={floatingPanelAnchors}>
<CommentsCard post_id={post_id} />
</FloatingPanel>
</div>
}

View File

@ -19,11 +19,33 @@
display: flex;
flex-direction: column;
.commentsWrapper {
position: absolute;
height: 90vh;
bottom: 0;
left: 0;
.postCard {
&.fullmode {
.wrapper {
height: 76vh;
.post_content {
.post_attachments {
height: 60vh;
overflow: hidden;
.carousel-root {
.carousel {
min-height: 200px;
>div {
display: flex;
align-items: center;
height: 100%;
}
}
}
}
}
}
}
}
}