diff --git a/web/app/controllers/subdomain/blog/archive.php b/web/app/controllers/subdomain/blog/archive.php
index 279f1e6..051eb5b 100644
--- a/web/app/controllers/subdomain/blog/archive.php
+++ b/web/app/controllers/subdomain/blog/archive.php
@@ -4,6 +4,8 @@
if (!Auth::check()) {
become403Page(UOJLocale::get('need login'));
}
+
+ $REQUIRE_LIB['bootstrap5'] = '';
$blogs_cond = "poster = '".UOJContext::userid()."'";
if (!UOJContext::hasBlogPermission()) {
@@ -24,7 +26,7 @@
'table_name' => 'blogs',
'cond' => $display_blogs_cond,
'tail' => 'order by post_time desc',
- 'page_len' => 10
+ 'page_len' => 15
));
$all_tags = DB::selectAll("select distinct tag from blogs_tags where blog_id in (select id from blogs where $blogs_cond)");
@@ -35,14 +37,101 @@
+
+
+ isEmpty()): ?>
+
此人很懒,什么博客也没留下。
+
+
+
+
+
+
+ 标题 |
+ 发表时间 |
+ 评价 |
+
+
+
+
+ get() as $blog): ?>
+
+
+
+ = getBlogLink($blog['id']) ?>
+
+
+
+ |
+ = $blog['post_time'] ?> |
+ = getClickZanBlock('B', $blog['id'], $blog['zan']) ?> |
+
+
+
+
+
+
+
+
+
+ isEmpty()): ?>
+
+ 没有找到包含 “= HTML::escape($blog_tag_required) ?>” 标签的博客:
+
+
+
+ 共找到 = $blogs_pag->n_rows ?> 篇包含 “= HTML::escape($blog_tag_required) ?>” 标签的博客:
+
+
+
+
+
+
+ 标题 |
+ 发表时间 |
+ 评价 |
+
+
+
+ get() as $blog): ?>
+
+
+ = getBlogLink($blog['id']) ?>
+
+
+
+ |
+ = $blog['post_time'] ?> |
+ = getClickZanBlock('B', $blog['id'], $blog['zan']) ?> |
+
+
+
+
+
+
+
+
+
+
+ = $blogs_pag->pagination() ?>
+
+
-
-
-
- isEmpty()): ?>
-
此人很懒,什么博客也没留下。
-
- get() as $blog): ?>
- true)) ?>
-
-
共 = $blogs_pag->n_rows ?> 篇博客
-
-
- isEmpty()): ?>
-
- 没有找到包含 “= HTML::escape($blog_tag_required) ?>” 标签的博客:
-
-
-
- 共找到 = $blogs_pag->n_rows ?> 篇包含 “= HTML::escape($blog_tag_required) ?>” 标签的博客:
-
- get() as $blog): ?>
- true)) ?>
-
-
-
-
- = $blogs_pag->pagination() ?>
-
diff --git a/web/app/controllers/subdomain/blog/index.php b/web/app/controllers/subdomain/blog/index.php
index d96b76d..8191943 100644
--- a/web/app/controllers/subdomain/blog/index.php
+++ b/web/app/controllers/subdomain/blog/index.php
@@ -3,17 +3,19 @@
become403Page(UOJLocale::get('need login'));
}
+ if (!isset($_COOKIE['bootstrap4'])) {
+ $REQUIRE_LIB['bootstrap5'] = '';
+ }
+
$blogs_pag = new Paginator(array(
'col_names' => array('*'),
'table_name' => 'blogs',
'cond' => "poster = '".UOJContext::userid()."' and is_hidden = 0",
- 'tail' => 'order by post_time desc limit 5',
- 'echo_full' => true
+ 'tail' => 'order by post_time desc',
+ 'page_len' => 5
));
- if (!isset($_COOKIE['bootstrap4'])) {
- $REQUIRE_LIB['bootstrap5'] = '';
- }
+ $all_tags = DB::selectAll("select distinct tag from blogs_tags where blog_id in (select id from blogs where $blogs_cond)");
$REQUIRE_LIB['mathjax'] = '';
if (isset($REQUIRE_LIB['bootstrap5'])) {
@@ -25,7 +27,13 @@
-
+
isEmpty()): ?>
此人很懒,什么博客也没留下。
@@ -33,9 +41,54 @@
true)) ?>
+
+ = $blogs_pag->pagination(); ?>
+
-
-
+
+
+
+
+
+
diff --git a/web/app/controllers/user_info.php b/web/app/controllers/user_info.php
index 3db6e7d..f202b47 100644
--- a/web/app/controllers/user_info.php
+++ b/web/app/controllers/user_info.php
@@ -156,7 +156,7 @@
-
+
= UOJLocale::get('accepted problems').': '.UOJLocale::get('n problems in total', count($ac_problems))?>
diff --git a/web/app/libs/uoj-html-lib.php b/web/app/libs/uoj-html-lib.php
index a121516..d11d38e 100644
--- a/web/app/libs/uoj-html-lib.php
+++ b/web/app/libs/uoj-html-lib.php
@@ -1315,10 +1315,10 @@ function echoBlogTag($tag) {
global $REQUIRE_LIB;
if (isset($REQUIRE_LIB['bootstrap5'])) {
- echo '
';
+ echo '';
echo '';
} else {
- echo '';
+ echo '';
echo '';
}
echo HTML::escape($tag), '';
diff --git a/web/app/models/UOJBlogEditor.php b/web/app/models/UOJBlogEditor.php
index d2c07af..85fa565 100644
--- a/web/app/models/UOJBlogEditor.php
+++ b/web/app/models/UOJBlogEditor.php
@@ -203,6 +203,8 @@ EOD
}
public function handleSave() {
+ global $REQUIRE_LIB;
+
$save = $this->save;
$this->receivePostData();
$ret = $save($this->post_data);
@@ -213,8 +215,19 @@ EOD
if (isset($_POST['need_preview'])) {
ob_start();
if ($this->type == 'blog') {
- echoUOJPageHeader('博客预览', array('ShowPageHeader' => false, 'REQUIRE_LIB' => array('mathjax' => '', 'shjs' => '')));
- echo '';
+ $req_lib = array('mathjax' => '');
+
+ if (isset($REQUIRE_LIB['bootstrap5'])) {
+ $req_lib['bootstrap5'] = '';
+ $req_lib['hljs'] = '';
+ } else {
+ $req_lib['shjs'] = '';
+ }
+
+ echoUOJPageHeader('博客预览', array('ShowPageHeader' => false, 'REQUIRE_LIB' => $req_lib));
+ if (!isset($REQUIRE_LIB['bootstrap5'])) {
+ echo '';
+ }
echo '';
echo $this->post_data['content'];
echo '';
diff --git a/web/app/views/blog-nav.php b/web/app/views/blog-nav.php
index 5245576..07e6d42 100644
--- a/web/app/views/blog-nav.php
+++ b/web/app/views/blog-nav.php
@@ -34,7 +34,7 @@ mb-4" role="navigation">
- 日志
+ 归档