<header>
    <div class="container nav-container">
        <a href="/" class="logo">Meta<span>Lab</span></a>
        <button class="mobile-menu-btn" id="mobileMenuBtn">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
        </button>
        <ul class="nav-links" id="navLinks">
            <li><a href="/">首页</a></li>
            <li><a href="/posts">帖子</a></li>
            {{if .IsLoggedIn}}
            <li>
                <a href="/messages" class="nav-messages" id="messagesBell" title="消息中心">
                    <svg class="nav-bell-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
                    <span class="nav-bell-badge" id="msgBadge" style="display:none">0</span>
                </a>
            </li>
            <li><a href="/space" class="nav-user">{{.Username}}</a></li>
            <li><a href="/settings/profile" class="nav-settings">设置</a></li>
            <li><a href="javascript:void(0)" class="nav-logout" id="logoutBtn">退出</a></li>
            {{else}}
            <li><a href="/auth/login" class="nav-login">登录</a></li>
            {{end}}
        </ul>
    </div>
</header>
{{if .IsMaintenance}}
<div class="maintenance-banner">
    <span class="maintenance-banner-icon">&#9881;</span>
    {{if .IsOwner}}
    <span>社区正处于维护状态</span>
    {{else}}
    <span>社区正在维护中，仅站长可访问</span>
    {{end}}
</div>
{{end}}
