From 1f647374a8cdf3bc5c2d29ff8be277b027925c8c Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 30 Mar 2024 16:36:54 -0400 Subject: post comments, refactor post loading, hide load more btn --- web/_views/template/posts.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 web/_views/template/posts.php (limited to 'web/_views/template/posts.php') diff --git a/web/_views/template/posts.php b/web/_views/template/posts.php new file mode 100644 index 0000000..f57a25f --- /dev/null +++ b/web/_views/template/posts.php @@ -0,0 +1,23 @@ +
+posts(); + + $loaded = $pdata['loaded']; + $page_size = $pdata['page_size']; + $total = $pdata['total']; + $max = $pdata['max']; + + if ($loaded >= $page_size && $page_size < $total) { + ilang('action_load_posts', + id: 'action-load-posts', + class: 'btn btn-line mb', + attrs: array( + 'loaded' => $loaded, + 'pageSize' => $page_size, + 'postCount' => $total, + 'postMax' => $max, + ) + ); + } +?> +
-- cgit v1.2.3-freya