refactor(web/ranklist): two-column layout

This commit is contained in:
Baoshuo Ren 2022-10-19 11:58:16 +08:00
parent e76c6524d4
commit b21e6c3500
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -1,4 +1,6 @@
<?php <?php
requireLib('bootstrap5');
if (!Auth::check() && UOJConfig::$data['switch']['force-login']) { if (!Auth::check() && UOJConfig::$data['switch']['force-login']) {
redirectToLogin(); redirectToLogin();
} }
@ -8,7 +10,7 @@
} }
$config = [ $config = [
'page_len' => 100, 'page_len' => 50,
'div_classes' => ['card', 'mb-3'], 'div_classes' => ['card', 'mb-3'],
'table_classes' => ['table', 'uoj-table', 'mb-0', 'text-center'], 'table_classes' => ['table', 'uoj-table', 'mb-0', 'text-center'],
]; ];
@ -19,10 +21,25 @@
} else { } else {
become404Page(); become404Page();
} }
requireLib('bootstrap5');
?> ?>
<?php echoUOJPageHeader($title) ?> <?php echoUOJPageHeader($title) ?>
<div class="row">
<!-- left col -->
<div class="col-lg-9">
<h1 class="h2"><?= $title ?></h1> <h1 class="h2"><?= $title ?></h1>
<?php echoRanklist($config) ?> <?php echoRanklist($config) ?>
</div>
<!-- end left col -->
<!-- right col -->
<aside class="col-lg-3 mt-3 mt-lg-0">
<?php uojIncludeView('sidebar', array()) ?>
</aside>
<!-- end right col -->
</div>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>