Files
MeshSate/app/templates/_nav.html

17 lines
1.2 KiB
HTML
Raw Normal View History

{# ============================================================================
统一导航栏 —— 所有控制台页面 include 本文件,保证样式与选中态完全一致
用法:{% set nav_active = 'overview' %} {% include "_nav.html" %}
============================================================================ #}
<nav>
<span class="logo"><img src="/static/logo.png" class="logo-img" alt="MeshSafe"> MeshSafe</span>
<a href="/console/" class="{{ 'active' if nav_active == 'overview' else '' }}">概览</a>
<a href="/console/policy" class="{{ 'active' if nav_active == 'policy' else '' }}">策略配置</a>
<a href="/console/tasks" class="{{ 'active' if nav_active == 'tasks' else '' }}">任务历史</a>
<a href="/console/test" class="{{ 'active' if nav_active == 'test' else '' }}">测试靶场</a>
<a href="/console/diagnostics" class="{{ 'active' if nav_active == 'diagnostics' else '' }}">🔧 诊断</a>
<a href="/console/about" class="{{ 'active' if nav_active == 'about' else '' }}">关于 MeshSafe</a>
<div class="spacer"></div>
<span class="user">{{ user.username }} ({{ user.role }})</span>
<a href="/console/logout">退出</a>
</nav>