From 5a2ba9c2e7605bb788bc406184547d22c6436867 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Dec 2024 11:13:27 -0500 Subject: v2.1.0, refactor w/ crimson --- src/web/_views/_template/comment.php | 12 +++++ src/web/_views/_template/error.php | 12 +++++ src/web/_views/_template/modal.php | 14 ++++++ src/web/_views/_template/post.php | 86 ++++++++++++++++++++++++++++++++++++ src/web/_views/_template/posts.php | 32 ++++++++++++++ src/web/_views/_template/toast.php | 22 +++++++++ 6 files changed, 178 insertions(+) create mode 100644 src/web/_views/_template/comment.php create mode 100644 src/web/_views/_template/error.php create mode 100644 src/web/_views/_template/modal.php create mode 100644 src/web/_views/_template/post.php create mode 100644 src/web/_views/_template/posts.php create mode 100644 src/web/_views/_template/toast.php (limited to 'src/web/_views/_template') diff --git a/src/web/_views/_template/comment.php b/src/web/_views/_template/comment.php new file mode 100644 index 0000000..b947ff6 --- /dev/null +++ b/src/web/_views/_template/comment.php @@ -0,0 +1,12 @@ + + +
+ +
+
+ format_name($user)?> + format_date($comment['created'])?> +
+ +
+
diff --git a/src/web/_views/_template/error.php b/src/web/_views/_template/error.php new file mode 100644 index 0000000..2e02cb1 --- /dev/null +++ b/src/web/_views/_template/error.php @@ -0,0 +1,12 @@ + + + + <?=$code . ' - ' . $msg?> + + +
+

+
+
+ + diff --git a/src/web/_views/_template/modal.php b/src/web/_views/_template/modal.php new file mode 100644 index 0000000..8e4545d --- /dev/null +++ b/src/web/_views/_template/modal.php @@ -0,0 +1,14 @@ + + + diff --git a/src/web/_views/_template/post.php b/src/web/_views/_template/post.php new file mode 100644 index 0000000..f7f5de2 --- /dev/null +++ b/src/web/_views/_template/post.php @@ -0,0 +1,86 @@ + + +
+
+ +
+ + format_date($post['created'])?> +
+
+

+ +

+ $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) { + echo ilang('action_load_comments', + class: 'action-load-comments btn btn-blend mt', + attrs: array( + 'postId' => $post['id'], + 'loaded' => $loaded, + 'pageSize' => $page_size, + 'commentCount' => $total, + 'commentMax' => $max, + ) + ); + } + + ?> +
+ +
+ +
+ + +
+
+ +
+ + diff --git a/src/web/_views/_template/posts.php b/src/web/_views/_template/posts.php new file mode 100644 index 0000000..4202e67 --- /dev/null +++ b/src/web/_views/_template/posts.php @@ -0,0 +1,32 @@ +
+posts(); + + $loaded = $pdata['loaded']; + $page_size = $pdata['page_size']; + $total = $pdata['total']; + $max = $pdata['max']; + $filterUid = $pdata['filter_uid']; +?> + +
+ + +
+ += $page_size && $page_size < $total) { + echo ilang('action_load_posts', + id: 'action-load-posts', + class: 'btn btn-blend grow mb mt', + attrs: array( + 'loaded' => $loaded, + 'pageSize' => $page_size, + 'postCount' => $total, + 'postMax' => $max, + 'userId' => $filterUid ? json_encode($filterUid) : '' + ) + ); + } +?> +
diff --git a/src/web/_views/_template/toast.php b/src/web/_views/_template/toast.php new file mode 100644 index 0000000..902955c --- /dev/null +++ b/src/web/_views/_template/toast.php @@ -0,0 +1,22 @@ + + + +
+ + +
-- cgit v1.2.3-freya