mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 13:48:41 +00:00
refactor: announcements page with bs5
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
922b5bbeb1
commit
2cfed336f1
@ -7,6 +7,10 @@
|
|||||||
become403Page();
|
become403Page();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($_COOKIE['bootstrap4'])) {
|
||||||
|
$REQUIRE_LIB['bootstrap5'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
requirePHPLib('form');
|
requirePHPLib('form');
|
||||||
|
|
||||||
function echoBlogCell($blog) {
|
function echoBlogCell($blog) {
|
||||||
@ -44,8 +48,37 @@ EOD;
|
|||||||
'table_classes' => ['table', 'table-hover'],
|
'table_classes' => ['table', 'table-hover'],
|
||||||
'page_len' => 40
|
'page_len' => 40
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (isset($REQUIRE_LIB['bootstrap5'])) {
|
||||||
|
$config['div_classes'] = ['card', 'my-3'];
|
||||||
|
$config['table_classes'] = ['table', 'uoj-table', 'mb-0'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<?php echoUOJPageHeader(UOJLocale::get('announcements')) ?>
|
<?php echoUOJPageHeader(UOJLocale::get('announcements')) ?>
|
||||||
<h3>公告</h3>
|
|
||||||
|
<?php if (isset($REQUIRE_LIB['bootstrap5'])): ?>
|
||||||
|
<div class="row">
|
||||||
|
<!-- left col -->
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<h1 class="h2">
|
||||||
|
<?= UOJLocale::get('announcements') ?>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<?php echoLongTable(array('blogs.id', 'poster', 'title', 'post_time', 'zan', 'level'), 'important_blogs, blogs', 'is_hidden = 0 and important_blogs.blog_id = blogs.id', 'order by level desc, important_blogs.blog_id desc', $header, 'echoBlogCell', $config); ?>
|
<?php echoLongTable(array('blogs.id', 'poster', 'title', 'post_time', 'zan', 'level'), 'important_blogs, blogs', 'is_hidden = 0 and important_blogs.blog_id = blogs.id', 'order by level desc, important_blogs.blog_id desc', $header, 'echoBlogCell', $config); ?>
|
||||||
|
|
||||||
|
<?php if (isset($REQUIRE_LIB['bootstrap5'])): ?>
|
||||||
|
</div>
|
||||||
|
<!-- end left col -->
|
||||||
|
|
||||||
|
<!-- right col -->
|
||||||
|
<aside class="col mt-3 mt-lg-0">
|
||||||
|
<?php uojIncludeView('sidebar', array()) ?>
|
||||||
|
</aside>
|
||||||
|
<!-- end right col -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<?php echoUOJPageFooter() ?>
|
<?php echoUOJPageFooter() ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user