Files
jiang13-forum/templates/install.tmpl
freefire fde5f628ec feat: opaque session、安装/发帖 SSR 与最小 Admin 后台
浏览器登录改为 DB sessions(可吊销);敏感词与 OIDC PEM 入 settings;
落地安装向导、注册发帖与 /admin 仪表盘/板块/审核/设置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 05:44:16 +08:00

38 lines
1.4 KiB
Cheetah

{{define "install"}}
{{template "base/head" .}}
<main class="j13-main j13-main--solo j13-install">
<h1>安装姜十三论坛</h1>
<p class="j13-muted">首次运行配置站点与管理员账号。</p>
{{template "base/alert" .}}
<form method="post" action="/install" class="j13-form">
<input type="hidden" name="_csrf" value="{{.CSRF}}"/>
<fieldset>
<legend>站点</legend>
<label>站点名称
<input name="site_name" required value="{{.SiteName}}" maxlength="64"/>
</label>
</fieldset>
<fieldset>
<legend>管理员</legend>
<label>用户名
<input name="admin_username" required autocomplete="username" value="{{.AdminUsername}}" pattern="[a-zA-Z0-9_]{3,32}"/>
</label>
<label>邮箱
<input type="email" name="admin_email" required autocomplete="email" value="{{.AdminEmail}}"/>
</label>
<label>昵称
<input name="admin_nickname" value="{{.AdminNickname}}" maxlength="32"/>
</label>
<label>密码
<input type="password" name="admin_password" required autocomplete="new-password" minlength="6"/>
</label>
<label>确认密码
<input type="password" name="admin_password2" required autocomplete="new-password" minlength="6"/>
</label>
</fieldset>
<button type="submit">安装</button>
</form>
</main>
{{template "base/footer" .}}
{{end}}