mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 03:48:41 +00:00
chore: remove card wrapping rank list
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
581cc68616
commit
dfb317211e
@ -134,16 +134,15 @@ UOJGroup::cur()->userCanView(Auth::user(), ['ensure' => true]);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-default mb-3">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title h3">
|
||||
<?= UOJLocale::get('top solver') ?>
|
||||
</h2>
|
||||
<?php UOJRanklist::printHTML([
|
||||
'page_len' => 15,
|
||||
'group_id' => UOJGroup::info('id'),
|
||||
]) ?>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header bg-transparent">
|
||||
<h2 class="h3 mb-0"><?= UOJLocale::get('top solver') ?></h2>
|
||||
</div>
|
||||
<?php UOJRanklist::printHTML([
|
||||
'page_len' => 15,
|
||||
'group_id' => UOJGroup::info('id'),
|
||||
'flush' => true,
|
||||
]) ?>
|
||||
</div>
|
||||
<!-- end left col -->
|
||||
</div>
|
||||
|
@ -60,15 +60,15 @@ $friend_links = DB::selectAll([
|
||||
</div>
|
||||
</div>
|
||||
<?php if (Auth::check()) : ?>
|
||||
<div class="mt-4 card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title mb-2"><?= UOJLocale::get('top solver') ?></h4>
|
||||
<?php UOJRanklist::printHTML(['top10' => true]) ?>
|
||||
<div class="text-center mt-2">
|
||||
<a href="/solverlist" class="text-decoration-none">
|
||||
<?= UOJLocale::get('view all') ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card mt-4">
|
||||
<div class="card-header bg-transparent">
|
||||
<h4 class="mb-0"><?= UOJLocale::get('top solver') ?></h4>
|
||||
</div>
|
||||
<?php UOJRanklist::printHTML(['top10' => true, 'flush' => true]) ?>
|
||||
<div class="card-footer bg-transparent text-center">
|
||||
<a href="/solverlist">
|
||||
<?= UOJLocale::get('view all') ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
@ -5,10 +5,13 @@ class UOJRanklist {
|
||||
$cfg += [
|
||||
'top10' => false,
|
||||
'card' => false,
|
||||
'flush' => false,
|
||||
'group_id' => null,
|
||||
'page_len' => 50,
|
||||
];
|
||||
|
||||
$cfg['flush'] |= $cfg['card'];
|
||||
|
||||
$conds = [];
|
||||
|
||||
if ($cfg['group_id']) {
|
||||
@ -86,6 +89,9 @@ class UOJRanklist {
|
||||
|
||||
if ($cfg['card']) {
|
||||
echo '<div class="card my-3">';
|
||||
}
|
||||
|
||||
if ($cfg['flush']) {
|
||||
echo '<div class="list-group list-group-flush">';
|
||||
} else {
|
||||
echo '<div class="list-group">';
|
||||
@ -104,7 +110,18 @@ class UOJRanklist {
|
||||
if ($cfg['card']) {
|
||||
echo '</div>';
|
||||
}
|
||||
echo $pag->pagination();
|
||||
|
||||
if ($pag->n_pages > 1) {
|
||||
if ($cfg['flush']) {
|
||||
echo '<div class="list-group-item">';
|
||||
}
|
||||
|
||||
echo $pag->pagination();
|
||||
|
||||
if ($cfg['flush']) {
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user