Skip to content

Commit 91e5e05

Browse files
committed
UX: Внешний вид комментариев
1 parent b462f24 commit 91e5e05

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

public/assets/css/style.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/default/content/comments/comment.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
<a class="block" href="<?= post_slug($comment['post_id'], $comment['post_slug']); ?>#comment_<?= $comment['comment_id']; ?>">
1818
<?= $comment['post_title']; ?>
1919
</a>
20-
<div class="ind-first-p max-w780"><?= markdown($comment['comment_content']); ?></div>
20+
<div class="comment-text"><?= markdown($comment['comment_content']); ?></div>
2121
</div>
2222
<?php endforeach; ?>

resources/views/default/content/post/format-discussion.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function internalRender($container, $nodes, $post, $level = 0)
9191
</div>
9292
<?= insert('/content/comments/menu', ['post' => $post, 'comment' => $node, 'type' => 'discussion']); ?>
9393
</div>
94-
<div class="comment-text ind-first-p">
94+
<div class="comment-text">
9595
<?= markdown($node['comment_content'], 'text'); ?>
9696
</div>
9797
</div>

resources/views/default/content/post/format-qa.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php if (!empty($data['comments'])) : ?>
22
<div class="indent-body">
3-
<h2 class="lowercase m0 text-2xl">
3+
<h2 class="lowercase text-2xl">
44
<?= Html::numWord($post['post_comments_count'], __('app.num_comment'), true); ?>
55
</h2>
66

@@ -28,7 +28,7 @@ function internalRender($container, $nodes, $post, $level = 0, $type = 'comment'
2828

2929
<?= insert('/content/comments/menu', ['post' => $post, 'comment' => $node, 'type' => 'qa', 'level' => $indent]); ?>
3030

31-
<div class="max-w780 ind-first-p ml5<?php if ($level == 1) : ?> text-sm<?php endif; ?>">
31+
<div class="comment-text ml5<?php if ($level == 1) : ?> text-sm<?php endif; ?>">
3232
<?= markdown($node['comment_content'], 'text'); ?>
3333
</div>
3434
<div class="comment-footer justify-between">

resources/views/default/content/post/post-view.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
</aside>
245245
<script nonce="<?= config('main', 'nonce'); ?>">
246246
document.addEventListener('DOMContentLoaded', () => {
247-
mediumZoom(document.querySelectorAll('.post img:not(.emoji, .gif), .content-body img:not(.emoji, .gif), .comment-body .ind-first-p img:not(.emoji, .gif)'));
247+
mediumZoom(document.querySelectorAll('.post img:not(.emoji, .gif), .content-body img:not(.emoji, .gif)'));
248248

249249
// Добавим цитирование
250250
function get_text() {

resources/views/default/css/parts/_components.css

+8-5
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ h5 {
218218
}
219219

220220
.box-logo {
221-
width: 222px;
221+
width: 242px;
222222
align-items: center;
223223
display: flex;
224224
gap: 0.5rem;
@@ -432,7 +432,7 @@ a:hover>img {
432432
display: flex;
433433
gap: 1rem;
434434
font-size: .875rem;
435-
margin: 10px 0 0 5px;
435+
margin-left: 5px;
436436
}
437437

438438
.comment,
@@ -518,9 +518,12 @@ li .comment-folder-button:checked~ol.comments li {
518518
background-color: var(--red-200);
519519
}
520520

521-
.ind-first-p p {
522-
margin: 0.5em 0;
523-
max-width: 780px;
521+
.comment-text p {
522+
margin: 0.1em 0 1em 0;
523+
}
524+
525+
.comment-text blockquote p {
526+
margin: 0.6em 0 0.6em 0;
524527
}
525528

526529
article iframe {

resources/views/default/css/parts/_menu.css

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.menu__left {
88
width: 210px;
99
padding-right: 20px;
10+
margin-right: 20px;
1011
}
1112

1213
.menuno .menu__left {

0 commit comments

Comments
 (0)