This commit is contained in:
tamakyi
2026-10-19 15:23:11 +08:00
parent 86dc8384bc
commit e9fba8b9ed
84 changed files with 34468 additions and 5386 deletions
+28
View File
@@ -788,6 +788,34 @@
<span class="tb-account-note">{{t .LangCode "admin.deactivateHint" | safe}}</span>
</div>
</section>
<!-- 主题外观:只改配色 / 图案 / 整页背景,不涉及布局;仅提问箱相关页面生效 -->
{{ if .Themes }}
<section class="tb-pcard">
<h3 class="tb-pcard-title">{{t .LangCode "profile.theme.title"}}</h3>
<form method="post" action="/user/profile/theme">
{{ .CSRFTokenHTML }}
<p class="tb-theme-hint">{{t .LangCode "profile.theme.hint"}}</p>
<div class="tb-theme-grid">
<label class="tb-theme-opt">
<input class="uk-radio" type="radio" name="theme" value=""{{ if eq .CurrentTheme "" }} checked{{ end }}>
<span class="tb-theme-swatch" style="background: linear-gradient(135deg, var(--tb-surface-2) 0 55%, var(--tb-border) 55% 100%)"></span>
<span class="tb-theme-name">{{t .LangCode "profile.theme.followDefault"}}</span>
</label>
{{ range .Themes }}
<label class="tb-theme-opt">
<input class="uk-radio" type="radio" name="theme" value="{{ .Slug }}"{{ if eq $.CurrentTheme .Slug }} checked{{ end }}>
<span class="tb-theme-swatch"{{ if .Swatch }} style="background: {{ .Swatch }}"{{ end }}></span>
<span class="tb-theme-name">{{ t $.LangCode (printf "theme.name.%s" .Slug) }}</span>
</label>
{{ end }}
</div>
<div class="tb-card-save">
<button type="submit" class="uk-button uk-button-primary">{{t .LangCode "profile.theme.save"}}</button>
</div>
</form>
</section>
{{ end }}
</div><!-- /用户设置面板 -->