FIX: Комментарии (каталог)
+ упростим CSS
This commit is contained in:
parent
5d61d8827f
commit
cd75d483d8
|
@ -5,7 +5,7 @@ namespace App\Controllers\Item;
|
|||
use Hleb\Constructor\Handlers\Request;
|
||||
use App\Controllers\Controller;
|
||||
use App\Services\Сheck\ItemPresence;
|
||||
use App\Services\Tree\buildTree;
|
||||
use App\Services\Tree\BuildTree;
|
||||
use App\Models\Item\{WebModel, ReplyModel, UserAreaModel};
|
||||
use App\Models\{PostModel, SubscriptionModel};
|
||||
use Meta, UserData, Img;
|
||||
|
@ -58,7 +58,7 @@ class DetailedController extends Controller
|
|||
}
|
||||
|
||||
$flat = ReplyModel::get($item['item_id'], $this->user);
|
||||
$tree = !empty($flat) ? buildTree::index(0, $flat, 'reply') : false;
|
||||
$tree = !empty($flat) ? BuildTree::index(0, $flat, 'reply') : false;
|
||||
|
||||
// Featured Content
|
||||
// Рекомендованный контент
|
||||
|
|
|
@ -1 +1 @@
|
|||
main{width:calc(100% - 220px)}@media (max-width:1050px){main{width:100%}.wrap{padding-left:.5rem;padding-right:.5rem}}
|
||||
main{width:calc(100% - 220px)}.box-answer{line-height:1.3;padding:5px;height:48px;width:54px;text-align:center;border-radius:3px;text-transform:lowercase;margin-top:5px}@media (max-width:1050px){main{width:100%}.wrap{padding-left:.5rem;padding-right:.5rem}}
|
File diff suppressed because one or more lines are too long
|
@ -236,7 +236,7 @@ $blog = $data['blog'][0] ?? null;
|
|||
|
||||
<?php if ($post['post_content_img']) : ?>
|
||||
<div class="box br-lightgray img-preview">
|
||||
<img class="w-100 br-rd5" src="<?= Img::PATH['posts_cover'] . $post['post_content_img']; ?>" alt="<?= $post['post_title']; ?>">
|
||||
<img class="w-100" src="<?= Img::PATH['posts_cover'] . $post['post_content_img']; ?>" alt="<?= $post['post_title']; ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -247,11 +247,11 @@ $blog = $data['blog'][0] ?? null;
|
|||
<div class="mb15 hidden flex gap text-sm">
|
||||
<a class="gray" href="<?= post_slug($rec_post['post_id'], $rec_post['post_slug']); ?>">
|
||||
<?php if ($rec_post['post_answers_count'] > 0) : ?>
|
||||
<div class="p5-10 bg-green br-rd3 white center">
|
||||
<div class="box-small bg-green">
|
||||
<?= $rec_post['post_answers_count'] ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="p5-10 bg-lightgray br-rd3 gray center">0</div>
|
||||
<div class="box-small bg-lightgray">0</div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<a class="black" href="<?= post_slug($rec_post['post_id'], $rec_post['post_slug']); ?>">
|
||||
|
|
|
@ -129,10 +129,6 @@ img {
|
|||
li.br-top-zebra + li { border-top: 1px solid var(--gray-100); }
|
||||
li.br-li-bottom-no:last-child { border-bottom: 1px solid transparent; }
|
||||
|
||||
.br-rd3 { border-radius: 3px; }
|
||||
.br-rd5 { border-radius: 5px; }
|
||||
.br-rd-50 { border-radius: 50%; }
|
||||
|
||||
.w-auto { width: auto; }
|
||||
.w-20 { width: 20%; }
|
||||
.w-30 { width: 30%; }
|
||||
|
|
|
@ -246,6 +246,13 @@ details[open] > summary {
|
|||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.box-small {
|
||||
border-radius: 3px;
|
||||
color: var(--white);
|
||||
text-align: center;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.box-flex {
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
|
@ -339,14 +346,6 @@ article iframe {
|
|||
|
||||
video { max-width: 560px; }
|
||||
|
||||
.box-answer {
|
||||
line-height: 1.3;
|
||||
padding: 5px;
|
||||
height: 48px;
|
||||
width: 54px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.qa-comment {
|
||||
font-size: 0.875rem;
|
||||
padding: 0.24rem 0;
|
||||
|
|
|
@ -13,13 +13,13 @@ use Hleb\Constructor\Handlers\Request; ?>
|
|||
<?php $post_url = post_slug($post['post_id'], $post['post_slug']); ?>
|
||||
<li class="list-post br-top-zebra article_<?= $post['post_id']; ?>">
|
||||
<div class="flex mr15">
|
||||
<div class="box-answer block bg-lightgray gray mt5 br-rd3 mb-none lowercase mr15">
|
||||
<div class="box-answer block bg-lightgray gray mb-none mr15">
|
||||
<?= $post['post_votes']; ?>
|
||||
<div class="text-xs"> <?= Html::numWord($post['post_votes'], __('app.num_up'), false); ?></div>
|
||||
</div>
|
||||
<?php $bg = $post['post_feature'] == 0 ? ' bg-green' : ' bg-blue'; ?>
|
||||
<?php $bg_url = $post['post_url_domain'] == NULL ? '' : ' bg-blue'; ?>
|
||||
<div class="box-answer 11 mt5 br-rd3 lowercase <?= $bg; ?> <?= $bg_url; ?>">
|
||||
<div class="box-answer<?= $bg; ?><?= $bg_url; ?>">
|
||||
<a class="block white" href="<?= $post_url; ?>#comment">
|
||||
<?php $anw = $post['post_answers_count'] + $post['post_comments_count'];
|
||||
echo $anw; ?>
|
||||
|
|
|
@ -6,6 +6,17 @@
|
|||
|
||||
main { width: calc(100% - 220px); }
|
||||
|
||||
.box-answer {
|
||||
line-height: 1.3;
|
||||
padding: 5px;
|
||||
height: 48px;
|
||||
width: 54px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
text-transform: lowercase;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@media (max-width: 1050px) {
|
||||
main { width: 100%; }
|
||||
.wrap {
|
||||
|
|
Loading…
Reference in a new issue