Files
jiang13-forum/templates/compose.tmpl
freefire 204e7fdb32 feat: SSR 内容门控与积分钱包/签到抽奖
闭合积分解锁经济闭环:锁定壳与 unlock,以及 profile 钱包流水与每日签到/抽奖 PRG。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 06:20:12 +08:00

43 lines
2.1 KiB
Cheetah
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "compose"}}
{{template "base/head" .}}
{{template "base/navbar" .}}
{{if .Flash}}<div class="j13-flash" role="status">{{.Flash}}</div>{{end}}
<main class="j13-main j13-main--solo j13-compose">
<h1>{{if .IsEdit}}编辑帖子{{else}}发帖{{end}}</h1>
{{template "base/alert" .}}
<form method="post" action="{{.FormAction}}" class="j13-form" id="compose-form" data-csrf="{{.CSRF}}" data-upload="/compose/upload">
<input type="hidden" name="_csrf" value="{{.CSRF}}"/>
<label>板块
<select name="board_id" required>
<option value="">请选择</option>
{{range .Boards}}
<option value="{{.ID}}" {{if eq $.BoardID .ID}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
</label>
<label>标题
<input name="title" required maxlength="{{.TitleMax}}" value="{{.Title}}"/>
</label>
<label>标签
<input name="tags" maxlength="{{.TagsMax}}" value="{{.Tags}}" placeholder="逗号分隔,可选"/>
</label>
<label>正文
<textarea name="content" id="compose-content" rows="16" required maxlength="{{.ContentMax}}" placeholder="支持纯文本;图片上传后插入 Markdown 图片语法">{{.Content}}</textarea>
</label>
<div class="j13-compose__tools">
<label class="j13-btn-secondary j13-filebtn">
插入图片
<input type="file" id="compose-image" accept="image/*" hidden/>
</label>
<button type="button" class="j13-btn-secondary" id="compose-gate-login" data-gate="login">登录可见</button>
<button type="button" class="j13-btn-secondary" id="compose-gate-reply" data-gate="reply">回复可见</button>
<button type="button" class="j13-btn-secondary" id="compose-gate-points" data-gate="points">积分可见</button>
<span class="j13-muted" id="compose-upload-status"></span>
</div>
<p class="j13-muted">门控选中正文后点按钮包裹积分可见会询问价格19999。含门控时正文以 HTML 提交。</p>
<button type="submit">{{if .IsEdit}}保存{{else}}发布{{end}}</button>
</form>
</main>
{{template "base/footer" .}}
{{end}}