From 74e502a853bf1649645220a1473e8052843b6b6b Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 29 Sep 2022 22:02:56 +0800 Subject: [PATCH] refactor: blog_detail page with bs5 --- web/app/controllers/subdomain/blog/blog.php | 78 +++++++++++++++--- web/app/libs/uoj-html-lib.php | 5 ++ web/app/views/blog-preview.php | 77 ++++++++++++++++-- web/css/uoj-bs5.css | 88 +++++++++++++++++++++ web/js/uoj.js | 4 +- 5 files changed, 233 insertions(+), 19 deletions(-) diff --git a/web/app/controllers/subdomain/blog/blog.php b/web/app/controllers/subdomain/blog/blog.php index 5a34317..83fc606 100644 --- a/web/app/controllers/subdomain/blog/blog.php +++ b/web/app/controllers/subdomain/blog/blog.php @@ -11,6 +11,10 @@ if ($blog['is_hidden'] && !UOJContext::hasBlogPermission()) { become403Page(); } + + if (!isset($_COOKIE['bootstrap4'])) { + $REQUIRE_LIB['bootstrap5'] = ''; + } $comment_form = new UOJForm('comment'); $comment_form->addVTextArea('comment', '内容', '', @@ -57,7 +61,6 @@ $comment_form->succ_href = getLongTablePageRawUri($page); }; $comment_form->ctrl_enter_submit = true; - $comment_form->runAtServer(); $reply_form = new UOJForm('reply'); @@ -143,11 +146,22 @@ ?> isset($_GET['page']) && $_GET['page'] != 1)) ?> -

评论

+

+ 评论 + + + + + +

isEmpty()): ?>
暂无评论
@@ -164,19 +178,63 @@ $replies_json = json_encode($replies); ?>
-
-
- +
+ -
+
-
+
- +
@@ -190,7 +248,7 @@ pagination() ?>

发表评论

-

可以用@mike来提到mike这个用户,mike会被高亮显示。如果你真的想打“@”这个字符,请用“@@”。

+

可以用 @mike 来提到 mike 这个用户,mike 会被高亮显示。如果你真的想打“@”这个字符,请用“@@”。

printHTML() ?>