theme v1
This commit is contained in:
@@ -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><!-- /用户设置面板 -->
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user