{{template "layout/header.html" .}}
<body>

{{template "layout/nav.html" .}}

<div class="home-layout">
    <main class="hero">
        <div class="container">
            <h1>Meta<span>Lab</span></h1>
            <p class="hero-tagline">下一代开发者社区</p>
            {{if .IsLoggedIn}}
            <p class="hero-desc">欢迎回来，{{.Username}}</p>
            {{else}}
            <p class="hero-desc">一个为构建者准备的纯粹空间</p>
            {{end}}
        </div>
    </main>

    <aside class="sidebar">
        <div class="sidebar-card user-card">
            {{if .IsLoggedIn}}
            <div class="user-card-avatar">{{slice .Username 0 1}}</div>
            <h3 class="user-card-name">{{.Username}}</h3>
            <p class="user-card-desc">欢迎加入 MetaLab</p>
            <a href="/settings/profile" class="user-card-link">个人设置</a>
            {{else}}
            <div class="user-card-avatar">
                <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="28" height="28"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7"/></svg>
            </div>
            <h3 class="user-card-name">未登录</h3>
            <p class="user-card-desc">登录后解锁社区功能</p>
            <a href="/auth/login" class="user-card-btn">登录</a>
            {{end}}
        </div>
    </aside>
</div>

{{template "layout/footer.html" .}}

<script src="/static/js/common.js"></script>
</body>
</html>
