Better offsets

This commit is contained in:
Dessalines 2019-08-17 19:31:32 -07:00
parent 0331c80c8b
commit 32dbb9ec4b
3 changed files with 6 additions and 2 deletions

View file

@ -61,7 +61,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
let node = this.props.node; let node = this.props.node;
return ( return (
<div className={`comment ${node.comment.parent_id && !this.props.noIndent ? 'ml-4' : ''}`}> <div className={`comment ${node.comment.parent_id && !this.props.noIndent ? 'ml-4' : ''}`}>
<div className={`mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}> <div className={`vote-bar mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}>
<div className={`pointer ${node.comment.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentLike)}> <div className={`pointer ${node.comment.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(node, this.handleCommentLike)}>
<svg class="pointer icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg> <svg class="pointer icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg>
</div> </div>

View file

@ -59,7 +59,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
let post = this.props.post; let post = this.props.post;
return ( return (
<div class="listing"> <div class="listing">
<div className={`mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}> <div className={`vote-bar mr-1 float-left small text-center ${this.props.viewOnly && 'no-click'}`}>
<div className={`pointer ${post.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(this, this.handlePostLike)}> <div className={`pointer ${post.my_vote == 1 ? 'text-info' : 'text-muted'}`} onClick={linkEvent(this, this.handlePostLike)}>
<svg class="pointer icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg> <svg class="pointer icon upvote"><use xlinkHref="#icon-arrow-up"></use></svg>
</div> </div>

View file

@ -67,6 +67,10 @@ body, .text-white, .navbar-brand, .badge-light, .btn-secondary {
margin-bottom: 10px; margin-bottom: 10px;
} }
.vote-bar {
margin-top: -3px;
}
.icon { .icon {
display: inline-flex; display: inline-flex;
width: 1em; width: 1em;