From 3a82baec9d793edf81ac2b151b0f4d4159641375 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 1 Apr 2024 11:09:25 -0400 Subject: login and register, liking on homepage --- src/web/_views/template/post.php | 86 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/web/_views/template/post.php (limited to 'src/web/_views/template/post.php') diff --git a/src/web/_views/template/post.php b/src/web/_views/template/post.php new file mode 100644 index 0000000..83a72bf --- /dev/null +++ b/src/web/_views/template/post.php @@ -0,0 +1,86 @@ + + +
+
+ view('template/pfp', array('user' => $user))?> +
+ + +
+
+

+ +

+main->user(); + $liked = $post['like_id'] ? 'btn-blue' : ''; + $post_attrs = array( + 'postId' => $post['id'] + ); + if ($post['like_id'] !== NULL) { + $post_attrs['likeId'] = $post['like_id']; + } +?> + +
+
+ + +
+
+ +
+ $post['id']); + $cdata = $this->comments(); + + $loaded = $cdata['loaded']; + $max = $cdata['max']; + $page_size = $cdata['page_size']; + $total = $post['comment_count']; + + if ($loaded >= $page_size && $page_size < $total) { + ilang('action_load_comments', + class: 'action-load-comments btn btn-line mt', + attrs: array( + 'postId' => $post['id'], + 'loaded' => $loaded, + 'pageSize' => $page_size, + 'commentCount' => $total, + 'commentMax' => $max, + ) + ); + } + + ?> +
+ +
+ view('template/pfp', array('user' => $user))?> +
+ + +
+
+ +
+ + -- cgit v1.2.3-freya