mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 08:31:55 +08:00
feat(admin): Implement admin layout and login page template
- Add responsive admin layout with navigation menu - Convert login page to use layout template system - Integrate Tailwind CSS and DaisyUI for styling - Add authentication check script in layout
This commit is contained in:
parent
47d2326815
commit
53b16f44fb
@ -1 +1,36 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" data-theme="light">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>代理服务管理后台</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.css" rel="stylesheet">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="min-h-screen bg-base-200">
|
||||
<div class="navbar bg-base-100 shadow-lg mb-4">
|
||||
<div class="flex-1">
|
||||
<a href="/admin/metrics" class="btn btn-ghost normal-case text-xl">代理服务管理</a>
|
||||
</div>
|
||||
<div class="flex-none">
|
||||
<ul class="menu menu-horizontal px-1">
|
||||
<li><a href="/admin/metrics">监控面板</a></li>
|
||||
<li><a href="/admin/config">配置管理</a></li>
|
||||
<li><a onclick="logout()" class="cursor-pointer">退出登录</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container mx-auto px-4">
|
||||
{{template "Content" .}}
|
||||
</div>
|
||||
|
||||
<script src="/web/static/js/auth.js"></script>
|
||||
<script>
|
||||
// 检查是否已登录(除了登录页面)
|
||||
if (!window.location.pathname.includes('/login')) {
|
||||
checkAuth();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,13 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>管理员登录</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.css" rel="stylesheet">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="min-h-screen bg-base-200 flex items-center justify-center">
|
||||
{{define "Content"}}
|
||||
<div class="flex items-center justify-center min-h-[80vh]">
|
||||
<div class="card w-96 bg-base-100 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title justify-center text-2xl font-bold mb-6">管理员登录</h2>
|
||||
@ -23,6 +15,5 @@
|
||||
<div id="message" class="alert mt-4" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/web/static/js/auth.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{{end}}
|
Loading…
x
Reference in New Issue
Block a user