refactor: ranklist with bs5
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-24 11:55:34 +08:00
parent b25f4cc7f9
commit 79d4c3832c
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
4 changed files with 11 additions and 4 deletions

View File

@ -154,7 +154,7 @@ EOD;
? array('card', 'mb-3') ? array('card', 'mb-3')
: array('table-responsive'); : array('table-responsive');
$table_classes = isset($REQUIRE_LIB['bootstrap5']) $table_classes = isset($REQUIRE_LIB['bootstrap5'])
? array('table', 'uoj-problem-list-table', 'mb-0') ? array('table', 'uoj-table', 'mb-0')
: array('table', 'table-bordered', 'table-hover', 'table-striped'); : array('table', 'table-bordered', 'table-hover', 'table-striped');
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('problems')) ?> <?php echoUOJPageHeader(UOJLocale::get('problems')) ?>

View File

@ -13,7 +13,15 @@
} else { } else {
become404Page(); become404Page();
} }
if (!isset($_COOKIE['bootstrap4'])) {
$REQUIRE_LIB['bootstrap5'] = '';
$config['div_classes'] = array('card', 'mb-3');
$config['table_classes'] = array('table', 'uoj-table', 'mb-0', 'text-center');
}
?> ?>
<?php echoUOJPageHeader($title) ?> <?php echoUOJPageHeader($title) ?>
<h1 class="h2"><?= $title ?></h1>
<?php echoRanklist($config) ?> <?php echoRanklist($config) ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -115,7 +115,7 @@ d-inline-block
'table_config' => (isset($REQUIRE_LIB['bootstrap5']) 'table_config' => (isset($REQUIRE_LIB['bootstrap5'])
? array( ? array(
'div_classes' => array('card', 'mb-3'), 'div_classes' => array('card', 'mb-3'),
'table_classes' => array('table', 'mb-0', 'uoj-submissions-table', 'text-center') 'table_classes' => array('table', 'mb-0', 'uoj-table', 'text-center')
) )
: array() : array()
), ),

View File

@ -43,8 +43,7 @@ label {
float: right; float: right;
} }
.uoj-problem-list-table > tbody > tr:last-child, .uoj-table > tbody > tr:last-child {
.uoj-submissions-table > tbody > tr:last-child {
border-bottom-color: transparent; border-bottom-color: transparent;
} }