summaryrefslogtreecommitdiff
path: root/web/_views/template/posts.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-03-30 16:36:54 -0400
committerFreya Murphy <freya@freyacat.org>2024-03-30 16:36:54 -0400
commit1f647374a8cdf3bc5c2d29ff8be277b027925c8c (patch)
tree9fdf42d250edb941de13ecd1aab9185ba2b30b00 /web/_views/template/posts.php
parentrename views to _views (diff)
downloadxssbook2-1f647374a8cdf3bc5c2d29ff8be277b027925c8c.tar.gz
xssbook2-1f647374a8cdf3bc5c2d29ff8be277b027925c8c.tar.bz2
xssbook2-1f647374a8cdf3bc5c2d29ff8be277b027925c8c.zip
post comments, refactor post loading, hide load more btn
Diffstat (limited to 'web/_views/template/posts.php')
-rw-r--r--web/_views/template/posts.php23
1 files changed, 23 insertions, 0 deletions
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 @@
+<div id="post-container">
+<?php
+ $pdata = $this->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,
+ )
+ );
+ }
+?>
+</div>