Compare commits

...

3 Commits

Author SHA1 Message Date
48824e6fc7
fix(list): remote problem
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-24 15:38:45 +08:00
2cc9cd86a1
fix(problem/statistics): title 2023-02-24 15:34:18 +08:00
d9a913f03a
fix: 5394bbb2f7 2023-02-24 15:31:11 +08:00
5 changed files with 17 additions and 15 deletions

View File

@ -25,7 +25,7 @@ function echoBlog($info) {
echo '<div>', UOJUser::getLink($poster), '</div>'; echo '<div>', UOJUser::getLink($poster), '</div>';
echo '<div class="hstack gap-2 flex-wrap small text-muted">'; echo '<div class="hstack gap-2 flex-wrap small text-muted">';
echo '<span>', '<i class="bi bi-chat-dots"></i> ', $blog->getReplyCnt(), ' </span>'; echo '<span>', '<i class="bi bi-chat-dots"></i> ', $blog->getReplyCnt(), ' </span>';
echo '<span>', '<i class="bi bi-hand-thumbs-up"></i> ', $blog->info['zan'], ' </span>'; echo '<span>', '<i class="bi bi-hand-thumbs-up"></i> ', $blog->getDisplayZanCnt(), ' </span>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';

View File

@ -19,7 +19,7 @@ function getProblemTR($info) {
$html .= ' <span class="badge text-white bg-info align-middle">' . UOJLocale::get('problems::my problem') . '</span> '; $html .= ' <span class="badge text-white bg-info align-middle">' . UOJLocale::get('problems::my problem') . '</span> ';
} }
if ($info['type'] == 'remote') { if ($info['type'] == 'remote') {
HTML::tag('a', ['class' => 'badge text-bg-success align-middle', 'href' => '/problems/remote'], '远端评测题'); $html .= ' ' . HTML::tag('a', ['class' => 'badge text-bg-success align-middle', 'href' => '/problems/remote'], '远端评测题');
} }
if ($info['is_hidden']) { if ($info['is_hidden']) {
$html .= ' <span class="badge text-bg-danger align-middle"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> '; $html .= ' <span class="badge text-bg-danger align-middle"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> ';

View File

@ -54,9 +54,15 @@ for ($i = count($data) - 1; $i > 0; $i--) {
} }
$submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size'; $submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size';
if (UOJContest::cur()) {
$PageTitle = UOJProblem::cur()->getTitle(['with' => 'letter', 'simplify' => true]);
} else {
$PageTitle = UOJProblem::cur()->getTitle(['with' => 'id']);
}
?> ?>
<?php echoUOJPageHeader(HTML::stripTags(UOJProblem::info('title')) . ' - ' . UOJLocale::get('problems::statistics')) ?> <?php echoUOJPageHeader($PageTitle . ' - ' . UOJLocale::get('problems::statistics')) ?>
<div class="row"> <div class="row">
<!-- left col --> <!-- left col -->

View File

@ -122,6 +122,14 @@ class UOJBlog {
} }
} }
public function getDisplayZanCnt() {
$display_zan = $this->info['zan'] > 0 ? "+{$this->info['zan']}" : $this->info['zan'];
if ($this->info['zan'] < 0) $display_zan = '-';
return $display_zan;
}
public function queryNewestComment() { public function queryNewestComment() {
return DB::selectFirst([ return DB::selectFirst([
"select * from blogs_comments", "select * from blogs_comments",

View File

@ -619,15 +619,3 @@ form.form-horizontal {
[data-bs-theme='dark'] .uoj-username-brown { [data-bs-theme='dark'] .uoj-username-brown {
color: #996f1c; color: #996f1c;
} }
/* Dark: Table Colors */
[data-bs-theme='dark'] .table-success {
--bs-table-bg: #d1e7ddb9;
--bs-table-border-color: #bcd0c7b9;
}
[data-bs-theme='dark'] .table-warning {
--bs-table-bg: #fff3cdb9;
--bs-table-border-color: #e6dbb9b9;
}