fix: 修复管理后台样式丢失 + CSP inline style 违规

- 评论管理页:创建 comments.css,controller 传递 ExtraCSS/ExtraJS,模板移除所有 inline style,JS 改用 CSS 类
- 修复 comments.js 加载顺序:通过 ExtraJS 在 common.js 之后加载,解决 api is not defined
- base.html:SVG inline style 移至 common.css
- dashboard/index.html:3 处 inline style 替换为 CSS 类
- audit/index.html:modal 移除冗余 style="display:none"
- fund_logs/logs:label inline style 移至 energy.css
- common.css 新增多个 CSS 规则
- energy.css 新增 .filter-bar label 规则
This commit is contained in:
2026-06-02 21:37:52 +08:00
parent 983f539268
commit 543325105c
11 changed files with 174 additions and 20 deletions

View File

@ -14,7 +14,7 @@
<div class="stat-info">
<div class="stat-label">帖子总数</div>
<div class="stat-value">{{.PostTotal}}</div>
<div class="stat-desc">已发布 {{.PostApproved}}<span class="stat-badge badge-warn" style="margin-left: 12px;">待审核 {{.PostPending}}</span></div>
<div class="stat-desc">已发布 {{.PostApproved}}<span class="stat-badge badge-warn">待审核 {{.PostPending}}</span></div>
</div>
</div>
<div class="stat-card">
@ -23,8 +23,8 @@
</div>
</div>
<div class="stats-grid" style="margin-top: 1rem;">
<div class="stat-card" style="grid-column: span 2;">
<div class="stats-grid mt-grid">
<div class="stat-card span-2">
<div class="stat-icon {{if .StoreDegraded}}stat-red{{else if eq .StoreType "redis"}}stat-green{{else}}stat-blue{{end}}">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>
</div>