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