mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
improve postCard
& postPage
for mobile
This commit is contained in:
parent
ccd020d4b3
commit
9c4bde5d5a
@ -3,9 +3,12 @@ import * as antd from "antd"
|
|||||||
|
|
||||||
import Post from "models/post"
|
import Post from "models/post"
|
||||||
import { PostCard, CommentsCard } from "components"
|
import { PostCard, CommentsCard } from "components"
|
||||||
|
import { FloatingPanel } from "antd-mobile"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
|
const floatingPanelAnchors = [160, 72 + 119, window.innerHeight * 0.8]
|
||||||
|
|
||||||
export default (props) => {
|
export default (props) => {
|
||||||
const post_id = props.match.params.post_id
|
const post_id = props.match.params.post_id
|
||||||
|
|
||||||
@ -35,5 +38,9 @@ export default (props) => {
|
|||||||
|
|
||||||
return <div className="postPage">
|
return <div className="postPage">
|
||||||
<PostCard data={data} fullmode />
|
<PostCard data={data} fullmode />
|
||||||
|
|
||||||
|
<FloatingPanel anchors={floatingPanelAnchors}>
|
||||||
|
<CommentsCard post_id={post_id} />
|
||||||
|
</FloatingPanel>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
@ -19,11 +19,33 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.commentsWrapper {
|
height: 90vh;
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
bottom: 0;
|
.postCard {
|
||||||
left: 0;
|
&.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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user