Files
mailgo/internal/web/templates/login.html
T
dsh f281121a4d feat: 前端移动端响应式适配(≤767px)
- 左侧文件夹栏在小屏下变为底部导航条:收件箱/草稿箱/已发送/管理后台 + 居中「写信」悬浮圆钮(带未读角标)
- 顶栏紧凑化:列表页搜索框自动下移为通栏第二行
- 邮件列表:隐藏正文摘要、缩小头像/时间列、行高加大便于触控,删除按钮常显
- 阅读页/写信页/设置页:内边距与字号收紧,配额条适配
- 管理后台:侧栏改为横向换行导航,表格横向滚动,统计卡两列排布
- 全部模板 viewport 增加 viewport-fit=cover(iOS 安全区),底部导航支持 env(safe-area-inset-bottom)
- settings.html 内联样式改为 .settings-main 类以便响应式覆盖
2026-08-17 13:21:19 -04:00

59 lines
2.5 KiB
HTML

{{define "login"}}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>登录 - MailGo 邮箱</title>
{{template "styles" .}}
</head>
<body class="login-page">
<div class="login-card">
<div class="login-logo">
<span class="logo-icon" style="width:44px;height:44px;font-size:22px;border-radius:12px;"></span>
<span style="font-size:26px;font-weight:700;color:var(--primary);">MailGo<em style="font-style:normal;font-weight:400;font-size:15px;color:var(--text-2);margin-left:4px;">邮箱</em></span>
</div>
<div class="login-sub">登录您的邮箱账户</div>
{{if .error}}<div class="alert alert-error">{{.error}}</div>{{end}}
<form method="POST" action="/login">
<div class="form-group">
<label>邮箱地址</label>
<input type="email" name="email" required autofocus placeholder="user@example.com" style="padding:11px 14px;border-radius:8px;">
</div>
<div class="form-group">
<label>密码</label>
<input type="password" name="password" required placeholder="请输入密码" style="padding:11px 14px;border-radius:8px;">
</div>
<button type="submit" class="btn btn-primary" style="width:100%;padding:11px 16px;font-size:15px;border-radius:8px;">登 录</button>
</form>
{{if or .oauth2Enabled .ldapEnabled}}
<div class="divider"></div>
{{end}}
{{if .ldapEnabled}}
<form method="POST" action="/login/ldap" style="margin-bottom:10px;">
<div class="form-group">
<label>LDAP 用户名</label>
<input type="text" name="username" placeholder="LDAP 用户名">
</div>
<div class="form-group">
<label>LDAP 密码</label>
<input type="password" name="password" placeholder="LDAP 密码">
</div>
<button type="submit" class="btn" style="width:100%;background:#7b5cd6;color:#fff;">LDAP 登录</button>
</form>
{{end}}
{{if .oauth2Enabled}}
<a href="/auth/oauth2" class="btn btn-primary" style="width:100%;text-align:center;display:block;margin-top:4px;">
{{if eq .oauth2Provider "google"}}Google{{else if eq .oauth2Provider "github"}}GitHub{{else}}OAuth2{{end}} 登录
</a>
{{end}}
</div>
</body>
</html>
{{end}}