mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-23 01:18:41 +00:00
c49b69aa86
Let's welcome brand new look made by Bootstrap 4! Not only website but also our logo is being flat now. The new logo uses blue as main color, to be different from original. For us, it also shows the project has up to a new stage. We hope that the project will get better and better. BREAKING CHANGE: The path for users to place their images is renamed. Logos are saved as new names too. Users should move "pictures" to "images". Any modifications should suit the Bootstrap 4's standard.
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
requirePHPLib('form');
|
|
|
|
function echoBlogCell($blog) {
|
|
echo '<tr>';
|
|
echo '<td>' . getBlogLink($blog['id']) . '</td>';
|
|
echo '<td>' . getUserLink($blog['poster']) . '</td>';
|
|
echo '<td>' . $blog['post_time'] . '</td>';
|
|
echo '</tr>';
|
|
}
|
|
$header = <<<EOD
|
|
<tr>
|
|
<th width="60%">标题</th>
|
|
<th width="20%">发表者</th>
|
|
<th width="20%">发表日期</th>
|
|
</tr>
|
|
EOD;
|
|
$config = array();
|
|
$config['table_classes'] = array('table', 'table-hover');
|
|
?>
|
|
<?php echoUOJPageHeader(UOJLocale::get('blogs')) ?>
|
|
<?php if (Auth::check()): ?>
|
|
<div class="float-right">
|
|
<div class="btn-group">
|
|
<a href="<?= HTML::blog_url(Auth::id(), '/') ?>" class="btn btn-secondary btn-sm">我的博客首页</a>
|
|
<a href="<?= HTML::blog_url(Auth::id(), '/post/new/write')?>" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-edit"></span> 写新博客</a>
|
|
</div>
|
|
</div>
|
|
<?php endif ?>
|
|
<h3>博客总览</h3>
|
|
<?php echoLongTable(array('id', 'poster', 'title', 'post_time', 'zan'), 'blogs', 'is_hidden = 0', 'order by post_time desc', $header, 'echoBlogCell', $config); ?>
|
|
<?php echoUOJPageFooter() ?>
|