Skip to content

Commit b373900

Browse files
committed
better colorblindness support prompt
1 parent 36347f3 commit b373900

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

options/locale/locale_en-US.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ manage_themes = Select default theme
763763
manage_openid = Manage OpenID Addresses
764764
email_desc = Your primary email address will be used for notifications, password recovery and, provided that it is not hidden, web-based Git operations.
765765
theme_desc = This will be your default theme across the site.
766+
theme_colorblindness_help = Colorblindness Theme Support
767+
theme_colorblindness_prompt = Gitea just gets some themes with basic colorblindness support, which only have a few colors defined. The work is still in progress. More improvements could be done by defining more colors in the theme CSS files.
766768
primary = Primary
767769
activated = Activated
768770
requires_activation = Requires activation

templates/user/settings/appearance.tmpl

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings sshkeys")}}
1+
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings")}}
22
<div class="user-setting-content">
33

44
<!-- Theme -->
55
<h4 class="ui top attached header">
66
{{ctx.Locale.Tr "settings.manage_themes"}}
77
</h4>
88
<div class="ui attached segment">
9-
<div class="ui email list">
10-
<div class="item">
9+
<form class="ui form" action="{{.Link}}/theme" method="post">
10+
{{.CsrfTokenHtml}}
11+
<div class="field">
1112
{{ctx.Locale.Tr "settings.theme_desc"}}
13+
<a class="muted" target="_blank" href="https://github.com/go-gitea/gitea/blob/main/web_src/css/themes/" data-tooltip-content="{{ctx.Locale.Tr "settings.theme_colorblindness_prompt"}}">
14+
{{svg "octicon-question"}} {{ctx.Locale.Tr "settings.theme_colorblindness_help"}}
15+
</a>
1216
</div>
13-
<form class="ui form" action="{{.Link}}/theme" method="post">
14-
{{.CsrfTokenHtml}}
15-
<div class="field">
16-
<label for="ui">{{ctx.Locale.Tr "settings.ui"}}</label>
17-
<select name="theme" class="ui dropdown">
18-
{{range $theme := .AllThemes}}
19-
<option value="{{$theme}}" {{Iif (eq $.SignedUser.Theme $theme) "selected"}}>{{$theme}}</option>
20-
{{end}}
21-
</select>
22-
</div>
23-
<div class="field">
24-
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>
25-
</div>
26-
</form>
27-
</div>
17+
<div class="field">
18+
<label>{{ctx.Locale.Tr "settings.ui"}}</label>
19+
<select name="theme" class="ui dropdown">
20+
{{range $theme := .AllThemes}}
21+
<option value="{{$theme}}" {{Iif (eq $.SignedUser.Theme $theme) "selected"}}>{{$theme}}</option>
22+
{{end}}
23+
</select>
24+
</div>
25+
<div class="field">
26+
<button class="ui primary button">{{ctx.Locale.Tr "settings.update_theme"}}</button>
27+
</div>
28+
</form>
2829
</div>
2930

3031
<!-- Language -->

0 commit comments

Comments
 (0)