ユーザープロフィール機能の追加

This commit is contained in:
2025-12-12 00:50:11 +09:00
parent 4085b77f6a
commit 72f3f5d39b
5 changed files with 112 additions and 6 deletions

View File

@@ -59,7 +59,7 @@
{@ if (AUTH_ENABLED) @}
<div>
{@ if (isset($user) && isset($user->id) && $user->id > 0) @}
お帰りなしゃ~い、{{{ namecolor($user) }}} (<a href="/logout">ログアウト</a>)
お帰りなしゃ~い、<a style="text-decoration: none;" href="/profile/{{ $user->username }}">{{{ namecolor($user) }}}</a> (<a href="/logout">ログアウト</a>)
{@ else @}
<a href="/login">ログイン</a>
{@ if (AUTH_REGISTER_ENABLED) @}

19
view/profile.maron Normal file
View File

@@ -0,0 +1,19 @@
{@ include(common/header) @}
<h1 class="paragraph">{{{ $u->name }}}</h1>
<p class="paragraph">
<table>
<tbody>
<tr>
<td rowspan="3"><img src="{{ $u->avatar }}" alt="{{ $u->altName }}" style="max-width: 100px; max-height: 100px; width: 100%; height: 100%;" /></td>
<td>登録日:{{ $u->regDate }}</td>
</tr>
<tr>
<td>ロール:{{ $u->role }}</td>
</tr>
<tr>
<td>性別:{{ $u->gender }}</td>
</tr>
</tbody>
</table>
</p>
{@ include(common/footer) @}