{{define "base"}}<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{block "title" .}}控制台{{end}} · Pangolin 管理后台</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header class="topbar">
  <span class="brand">Pangolin 管理后台</span>
  <nav>
    <a href="/" class="{{if eq .Active "dashboard"}}on{{end}}">概览</a>
    <a href="/codes" class="{{if eq .Active "codes"}}on{{end}}">码批次</a>
    <a href="/nodes" class="{{if eq .Active "nodes"}}on{{end}}">节点</a>
    <a href="/audit" class="{{if eq .Active "audit"}}on{{end}}">审计</a>
  </nav>
  <span class="who">
    {{.Username}}
    <form method="post" action="/logout" class="inline">
      <input type="hidden" name="csrf_token" value="{{.CSRF}}">
      <button class="link" type="submit">退出</button>
    </form>
  </span>
</header>
{{if .Flash}}<div class="flash">{{.Flash}}</div>{{end}}
<main>
{{block "content" .}}{{end}}
</main>
</body>
</html>{{end}}
