<nav class="navbar navbar-expand bg-light navbar-light sticky-top px-4 py-0">
    <a href="index1.html" class="navbar-brand d-flex d-lg-none me-4">
        <h2 class="text-primary mb-0"><i class="fa fa-hashtag"></i></h2>
    </a>
    
    <a href="#" class="sidebar-toggler flex-shrink-0">
        <i class="fa fa-bars"></i>
    </a>
    
    <div class="navbar-nav align-items-center ms-auto">
    
        <div class="nav-item dropdown">
            <a href="/" target="_blank" class="nav-link">
                <i class="fa fa-home me-lg-2"></i>
                <span class="d-none d-lg-inline-flex">首页</span>
            </a>
        </div>
    
        <div class="nav-item dropdown">
            <a href="javascript:;" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
                <img class="rounded-circle me-lg-2" 
                    src="{{ avatarUrl(user.Avatar) }}" 
                    alt="{{ user.Nickname }}" 
                    style="width: 40px; height: 40px;">
                <span class="d-none d-lg-inline-flex">{{ user.Nickname }}</span>
            </a>
            
            <div class="dropdown-menu dropdown-menu-end bg-light border-0 rounded-0 rounded-bottom m-0">
                <a href='{{ adminUrl("profile") }}' class="dropdown-item">
                    <i class="fa fa-user me-1"></i>
                    我的信息
                </a>
                {{if isAdmin}}
                <a href='{{ adminUrl("setting") }}' class="dropdown-item">
                    <i class="fa fa-cog me-1"></i>
                    网站设置
                </a>
                {{end}}
                <a href="javascript:;" 
                    class="dropdown-item js-logout-btn"
                    data-url='{{ adminUrl("logout") }}'
                >
                    <i class="fa fa-sign-out-alt me-1"></i>
                    退出
                </a>
            </div>
        </div>
    </div>
</nav>