mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Making chat / new comments section sticky top and fitting to your
viewport - Fixes #97. #98
This commit is contained in:
parent
8a57fd420a
commit
b80ec3fe96
@ -56,7 +56,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
|
|||||||
<form onSubmit={linkEvent(this, this.handleCommentSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleCommentSubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} placeholder="Comment here" required disabled={this.props.disabled}/>
|
<textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} required disabled={this.props.disabled} rows={2} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -130,8 +130,9 @@ export class Post extends Component<any, PostState> {
|
|||||||
|
|
||||||
newComments() {
|
newComments() {
|
||||||
return (
|
return (
|
||||||
<div class="sticky-top">
|
<div class="container-fluid sticky-top new-comments">
|
||||||
<h5>New Comments</h5>
|
<h5>Chat</h5>
|
||||||
|
<CommentForm postId={this.state.post.id} disabled={this.state.post.locked} />
|
||||||
{this.state.comments.map(comment =>
|
{this.state.comments.map(comment =>
|
||||||
<CommentNodes
|
<CommentNodes
|
||||||
nodes={[{comment: comment}]}
|
nodes={[{comment: comment}]}
|
||||||
|
@ -87,3 +87,7 @@ blockquote {
|
|||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.new-comments {
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user