@php $pageTitle = '个人中心 - '.$siteName; $user = auth()->user(); @endphp
@include('partials.head')
<body>
@include('partials.header')
<div class="container main-layout">
    <main class="content">
        <h1 class="list-title">个人中心</h1>
        <div class="profile-box">
            <p><strong>昵称：</strong>{{ $user->name }}</p>
            <p><strong>邮箱：</strong>{{ $user->email }}</p>
            @if($user->url)<p><strong>主页：</strong><a href="{{ $user->url }}" target="_blank" rel="noopener nofollow">{{ $user->url }}</a></p>@endif
            <p><strong>注册时间：</strong>{{ $user->created_at?->format('Y-m-d') }}</p>
            <p><strong>登录次数：</strong>{{ $user->logincount }}</p>
            <p><strong>角色：</strong>{{ $user->getRoleNames()->implode(', ') ?: '会员' }}</p>
            <p><strong>我的文章：</strong>{{ $user->posts()->count() }} 篇</p>
            <p><strong>我的评论：</strong>{{ $user->comments()->count() }} 条</p>
        </div>
        <p><a href="{{ route('home') }}">&laquo; 返回首页</a></p>
    </main>
    @include('partials.sidebar')
</div>
@include('partials.footer')
@stack('theme:body_end')
</body>
</html>
