allow comments scroll

This commit is contained in:
mrilyew 2024-11-02 12:13:17 +03:00
parent 8fc47ff6cd
commit 389f0b4bb4
2 changed files with 6 additions and 4 deletions

View file

@ -9,9 +9,11 @@
</div> </div>
{if sizeof($comments) > 0} {if sizeof($comments) > 0}
{foreach $comments as $comment} <div class='scroll_container'>
<div class='scroll_node' n:foreach="$comments as $comment">
{include "comment.xml", comment => $comment} {include "comment.xml", comment => $comment}
{/foreach} </div>
</div>
<div style="margin-top: 11px;"> <div style="margin-top: 11px;">
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]} {include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
</div> </div>

View file

@ -1,4 +1,4 @@
u(".comment-reply").on("click", function(e) { u(document).on("click", ".comment-reply", function(e) {
let comment = u(e.target).closest(".post"); let comment = u(e.target).closest(".post");
let authorId = comment.data("owner-id"); let authorId = comment.data("owner-id");
let authorNm = u(".post-author > a > b", comment.first()).text().trim(); let authorNm = u(".post-author > a > b", comment.first()).text().trim();