1
1
mirror of https://github.com/go-gitea/gitea synced 2025-12-07 05:18:29 +00:00

Support selecting theme on the footer (#35741)

Fixes: https://github.com/go-gitea/gitea/pull/27576
This commit is contained in:
wxiaoguang
2025-10-28 18:25:00 +08:00
committed by GitHub
parent cddff73bbd
commit 6b5563c54a
33 changed files with 254 additions and 59 deletions

View File

@@ -16,11 +16,19 @@
</div>
<div class="field">
<label>{{ctx.Locale.Tr "settings.ui"}}</label>
<select name="theme" class="ui dropdown">
{{range $theme := .AllThemes}}
<option value="{{$theme.InternalName}}" {{Iif (eq $.SignedUser.Theme $theme.InternalName) "selected"}}>{{$theme.DisplayName}}</option>
{{end}}
</select>
<div class="ui selection dropdown">
<input type="hidden" name="theme" value="{{$.SignedUser.Theme}}">
<div class="text"></div> {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu flex-items-menu">
{{range $theme := .AllThemes}}
{{$extraIconName := $theme.GetExtraIconName}}
<div class="item" data-value="{{$theme.InternalName}}">
{{$theme.DisplayName}} {{svg $extraIconName}}
<div class="description">{{$theme.GetDescription}}</div>
</div>
{{end}}
</div>
</div>
</div>
<div class="field">
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>