feat: move user_self_reviews into blog
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-22 09:41:21 +08:00
parent d3e99b0217
commit 31a8db965b
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
4 changed files with 6 additions and 7 deletions

View File

@ -36,6 +36,7 @@ call_user_func(function() { // to prevent variable scope leak
Route::any("$prefix/", '/subdomain/blog/index.php');
Route::any("$prefix/archive", '/subdomain/blog/archive.php');
Route::any("$prefix/aboutme", '/subdomain/blog/aboutme.php');
Route::any("$prefix/self_reviews", '/subdomain/blog/self_reviews.php');
Route::any("$prefix/click-zan", '/click_zan.php');
Route::any("$prefix/post/{id}", '/subdomain/blog/blog.php');
Route::any("$prefix/slide/{id}", '/subdomain/blog/slide.php');

View File

@ -9,17 +9,14 @@
requirePHPLib('form');
$username = $_GET['username'];
$username = UOJContext::user()['username'];
if (!validateUsername($username) || !($user = queryUser($username))) {
become404Page();
}
?>
<?php echoUOJPageHeader(UOJLocale::get('contests::contest self reviews')) ?>
<h2 style="margin-top: 24px">
<?= $username == $myUser['username'] ? '我' : $username . ' ' ?>的所有赛后总结
<?= $username ?> 的所有赛后总结
</h2>
<?php

View File

@ -85,7 +85,7 @@
<?php endif ?>
<a type="button" class="btn btn-success btn-sm" href="<?= HTML::blog_url($user['username'], '/') ?>"><span class="glyphicon glyphicon-arrow-right"></span> <?= UOJLocale::get('visit his blog', $username) ?></a>
<a type="button" class="btn btn-success btn-sm" href="<?= HTML::url('/user/self_reviews/' . $user['username']) ?>"><span class="glyphicon glyphicon-arrow-right"></span> 查看 <?= $username ?> 的所有赛后总结</a>
<a type="button" class="btn btn-success btn-sm" href="<?= HTML::blog_url($user['username'], '/self_reviews') ?>"><span class="glyphicon glyphicon-arrow-right"></span> 查看 <?= $username ?> 的所有赛后总结</a>
<div class="top-buffer-lg"></div>
<div class="list-group">

View File

@ -7,6 +7,7 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="nav-item"><a class="nav-link" href="<?= HTML::blog_url(UOJContext::userid(), '/archive')?>"><span class="glyphicon glyphicon-inbox"></span> 日志</a></li>
<li class="nav-item"><a class="nav-link" href="<?= HTML::blog_url(UOJContext::userid(), '/self_reviews')?>"><span class="glyphicon glyphicon-sunglasses"></span> 赛后总结</a></li>
<li class="nav-item"><a class="nav-link" href="<?= HTML::blog_url(UOJContext::userid(), '/aboutme')?>"><span class="glyphicon glyphicon-user"></span> 关于我</a></li>
<li class="nav-item"><a class="nav-link" href="<?= HTML::url('/') ?>"><span class="glyphicon glyphicon-link"></span> <?= UOJConfig::$data['profile']['oj-name-short'] ?></a></li>
</ul>
@ -15,4 +16,4 @@
<script type="text/javascript">
var uojBlogUrl = '<?= HTML::blog_url(UOJContext::userid(), '')?>';
var zan_link = uojBlogUrl;
</script>
</script>