feat: 分类系统 + 标签系统 — Phase 4 完成
分类:Model/Repo/Service/Controller + 管理后台树形页面 + 首页导航栏
标签:Model/Repo/Service/Controller + /tags/{slug} 落地页 + 写文章页输入
Post 加 CategoryID,Create/Update 支持分类和标签
SQL 迁移含 categories/tags/post_tags 表及预设未分类
This commit is contained in:
@ -64,6 +64,19 @@
|
||||
<span class="meta-label"></span>
|
||||
<label class="meta-checkbox"><input type="checkbox" id="reprintProhibited"> 未经作者许可,禁止转载</label>
|
||||
</div>
|
||||
<div class="meta-row">
|
||||
<span class="meta-label">分类</span>
|
||||
<select id="categoryId" style="width:auto">
|
||||
<option value="">(未分类)</option>
|
||||
{{range .Categories}}
|
||||
<option value="{{.ID}}" {{if and $.Post $.Post.CategoryID}}{{if eq .ID (derefUint $.Post.CategoryID)}}selected{{end}}{{end}}>{{.Name}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="meta-row">
|
||||
<span class="meta-label">标签</span>
|
||||
<input type="text" id="tagInput" placeholder="逗号分隔,最多 10 个" style="width:300px">
|
||||
</div>
|
||||
<div class="meta-row">
|
||||
<span class="meta-label">声明</span>
|
||||
<select id="declaration" style="width:auto">
|
||||
|
||||
Reference in New Issue
Block a user