diff --git a/web/app/controllers/subdomain/blog/self_reviews.php b/web/app/controllers/subdomain/blog/self_reviews.php index 22e44c6..f6e64eb 100644 --- a/web/app/controllers/subdomain/blog/self_reviews.php +++ b/web/app/controllers/subdomain/blog/self_reviews.php @@ -9,26 +9,28 @@ requirePHPLib('form'); - $username = UOJContext::user()['username']; + $username = UOJContext::userid(); + $REQUIRE_LIB['bootstrap5'] = ''; $REQUIRE_LIB['mathjax'] = ''; ?> -

+

的所有赛后总结 -

+ 'contests_registrants', 'page_len' => 10, - 'table_classes' => array('table', 'table-bordered', 'table-text-center', 'table-vertical-middle'), + 'div_classes' => ['card', 'card-default', 'table-responsive'], + 'table_classes' => ['table', 'table-bordered', 'text-center', 'align-middle', 'uoj-table', 'mb-0'], ); $header_row = ''; @@ -48,7 +50,7 @@ $n_contest_problems = count($contest_problems); $result = ''; - $dom_sanitize_config = DOM_SANITIZE_CONFIG; + $purifier = HTML::pruifier(); for ($i = 0; $i < $n_contest_problems; $i++) { $problem_id = $contest_problems[$i]['problem_id']; @@ -63,20 +65,14 @@ $problem_review_id = "review-$contest_id-$i"; $result .= '' . chr(ord('A') + $i) . '. ' . $problem['title'] . ''; - $result .= '
'; + $result .= '' . $purifier->purify($problem_self_review != null ? $problem_self_review['content'] : '') . ''; $esc_problem_self_review = rawurlencode($problem_self_review != null ? $problem_self_review['content'] : ''); - $result .= ''; if ($i == 0) { $contest_review_id = "review-$contest_id-overall"; $contest_self_review = DB::selectFirst("select content from contests_reviews where contest_id = $contest_id and problem_id = -1 and poster = '$username'"); $esc_contest_self_review = rawurlencode($contest_self_review != null ? $contest_self_review['content'] : ''); - $result .= '
'; - $result .= ''; + $result .= '' . $purifier->purify($problem_self_review != null ? $problem_self_review['content'] : '') . ''; } $result .= ''; @@ -87,5 +83,5 @@ echoLongTable($col_names, $from, $cond, $tail, $header_row, $print_row, $config); ?> - + diff --git a/web/css/uoj-bs5.css b/web/css/uoj-bs5.css index 43b7dae..b579c3f 100644 --- a/web/css/uoj-bs5.css +++ b/web/css/uoj-bs5.css @@ -51,6 +51,16 @@ label { border-bottom-color: transparent; } +.uoj-table > thead > tr:first-child { + border-top-color: transparent; +} + +.uoj-table > thead > tr, +.uoj-table > tbody > tr { + border-left-color: transparent; + border-right-color: transparent; +} + .uoj-click-zan-block { display: inline-block; min-width: 100px;