FIX: Скролл в ленте

+ UX: высота редактора в посте.
This commit is contained in:
Evg 2023-11-10 05:05:22 +03:00
parent 87bf2b0183
commit 5d61d8827f
3 changed files with 5 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<span class="middle"><?= $text; ?></span>
</div>
<?php else : ?>
<div class="box center gray-600">
<div id="no_content" class="box center gray-600">
<svg class="icons icon-max"><use xlink:href="/assets/svg/icons.svg#<?= $icon; ?>"></use></svg>
<div><?= $text; ?></div>
</div>

View file

@ -173,7 +173,7 @@ $blog = $data['blog'][0] ?? null;
<form action="<?= url('content.create', ['type' => 'answer']); ?>" accept-charset="UTF-8" method="post">
<?= csrf_field() ?>
<?= insert('/_block/form/editor', ['height' => '250px', 'type' => 'answer', 'id' => $post['post_id']]); ?>
<?= insert('/_block/form/editor', ['height' => '170px', 'type' => 'answer', 'id' => $post['post_id']]); ?>
<div class="clear mt5">
<input type="hidden" name="post_id" value="<?= $post['post_id']; ?>">

View file

@ -76,6 +76,9 @@
function getPosts(path) {
fetch(path)
.then(res => res.text()).then((res) => {
if (getById("no_content")) {
return;
}
scroll.insertAdjacentHTML("beforeend", res);
postPage += 1;
})