- Go + Gin + html/template 服务端渲染 - 主页:Google 风格搜索框 + 导航卡片 - 后台:卡片 CRUD、搜索引擎配置、主页背景/标题配置 - 图片上传:支持 jpg/jpeg/png/gif,自动压缩,缩略图参数 ?thumb=1 - 安全:登录日志、修改密码、IP 自动封禁、IP 白名单 - 访问统计:主页访问/卡片点击/搜索追踪、实时流量、IP 统计 - SQLite 存储(modernc.org/sqlite,纯 Go) - 内存 Session + bcrypt 密码哈希
22 lines
844 B
HTML
22 lines
844 B
HTML
{{define "admin/login.html"}}
|
|
{{template "header" .}}
|
|
<div class="login-container">
|
|
<div class="login-card">
|
|
<h1 class="login-title">管理后台登录</h1>
|
|
{{if .Error}}<div class="login-error">{{.Error}}</div>{{end}}
|
|
<form method="POST" action="/admin/login" class="login-form">
|
|
<div class="form-group">
|
|
<label for="username">用户名</label>
|
|
<input type="text" id="username" name="username" required autofocus>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password">密码</label>
|
|
<input type="password" id="password" name="password" required>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-block">登录</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{template "footer" .}}
|
|
{{end}}
|