diff --git a/resources/assets/js/components/page-comments.js b/resources/assets/js/components/page-comments.js index c86b90d2c..0c8b32b7c 100644 --- a/resources/assets/js/components/page-comments.js +++ b/resources/assets/js/components/page-comments.js @@ -54,7 +54,7 @@ class PageComments { commentElem.querySelector('[comment-edit-container]').style.display = 'block'; let textArea = commentElem.querySelector('[comment-edit-container] textarea'); let lineCount = textArea.value.split('\n').length; - textArea.style.height = (lineCount * 20) + 'px'; + textArea.style.height = ((lineCount * 20) + 40) + 'px'; this.editingComment = commentElem; } diff --git a/resources/assets/sass/_components.scss b/resources/assets/sass/_components.scss index 09b7c5f02..044b8ec10 100644 --- a/resources/assets/sass/_components.scss +++ b/resources/assets/sass/_components.scss @@ -604,27 +604,26 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { } .comment-box { - clear: left; border: 1px solid #DDD; - margin-bottom: $-s; - border-radius: 3px; + border-radius: 4px; + background-color: #FFF; .content { - padding: $-s; font-size: 0.666em; p, ul, ol { font-size: $fs-m; margin: .5em 0; } } - .reply-row { - padding: $-xs $-s; + .actions { + opacity: 0; + transition: opacity ease-in-out 120ms; + } + &:hover .actions { + opacity: 1; } } .comment-box .header { - padding: $-xs $-s; - background-color: #f8f8f8; - border-bottom: 1px solid #DDD; .meta { img, a, span { display: inline-block; diff --git a/resources/views/comments/comment.blade.php b/resources/views/comments/comment.blade.php index 9f955f691..2993425bb 100644 --- a/resources/views/comments/comment.blade.php +++ b/resources/views/comments/comment.blade.php @@ -1,55 +1,52 @@ -
-
- -
- @if(userCan('comment-update', $comment)) - - @endif - @if(userCan('comment-create-all')) - - @endif - @if(userCan('comment-delete', $comment)) - - - @endif -
- -
- #{{$comment->local_id}} -    - @if ($comment->createdBy) - {{ $comment->createdBy->name }} -   - {{ $comment->createdBy->name }} - @else - {{ trans('common.deleted_user') }} - @endif - - {{ trans('entities.comment_created', ['createDiff' => $comment->created]) }} - - @if($comment->isUpdated()) - +
+
+
+
+ #{{$comment->local_id}} +    + @if ($comment->createdBy) + {{ $comment->createdBy->name }} +   + {{ $comment->createdBy->name }} + @else + {{ trans('common.deleted_user') }} + @endif + {{ trans('entities.comment_created', ['createDiff' => $comment->created]) }} + @if($comment->isUpdated()) + •  {{ trans('entities.comment_updated', ['updateDiff' => $comment->updated, 'username' => $comment->updatedBy? $comment->updatedBy->name : trans('common.deleted_user')]) }} - @endif + @endif +
+
+ @if(userCan('comment-update', $comment)) + + @endif + @if(userCan('comment-create-all')) + + @endif + @if(userCan('comment-delete', $comment)) + + @endif +
@if ($comment->parent_id) -
+
{!! trans('entities.comment_in_reply_to', ['commentId' => '#'.$comment->parent_id.'']) !!}
@endif -
+
@@ -57,10 +54,10 @@
@if(userCan('comment-update', $comment)) -