summaryrefslogtreecommitdiffstats
path: root/templates/user/settings/appearance.tmpl
blob: 777b89c750eceb24aabfba248cae6103384b6b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{{template "base/head" .}}
<div class="page-content user settings sshkeys">
	{{template "user/settings/navbar" .}}
	<div class="ui container">
		{{template "base/alert" .}}

		<!-- Theme -->
		<h4 class="ui top attached header">
			{{.i18n.Tr "settings.manage_themes"}}
		</h4>
		<div class="ui attached segment">
			<div class="ui email list">
				<div class="item">
					{{.i18n.Tr "settings.theme_desc"}}
				</div>

			<form class="ui form" action="{{.Link}}/theme" method="post">
				{{.CsrfTokenHtml}}
					<div class="field">
						<label for="ui">{{.i18n.Tr "settings.ui"}}</label>
						<div class="ui selection dropdown" id="ui">
							<input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
							{{svg "octicon-triangle-down" 14 "dropdown icon"}}
							<div class="text">
								{{range $i,$a := .AllThemes}}
									{{if eq $.SignedUser.Theme $a}}{{$a}}{{end}}
								{{end}}
							</div>

							<div class="menu">
							{{range $i,$a := .AllThemes}}
								<div class="item{{if eq $.SignedUser.Theme $a}} active selected{{end}}" data-value="{{$a}}">
									{{$a}}
								</div>
							{{end}}
							</div>
						</div>
					</div>

				<div class="field">
					<button class="ui green button">{{$.i18n.Tr "settings.update_theme"}}</button>
				</div>
			</form>
			</div>
		</div>

		<!-- Language -->
		<h4 class="ui top attached header">
			{{.i18n.Tr "settings.language"}}
		</h4>
		<div class="ui attached segment">
			<form class="ui form" action="{{.Link}}/language" method="post">
				{{.CsrfTokenHtml}}
				<div class="field">
					<div class="ui language selection dropdown" id="language">
						<input name="language" type="hidden" value="{{.SignedUser.Language}}">
						{{svg "octicon-triangle-down" 14 "dropdown icon"}}
						<div class="text">{{range .AllLangs}}{{if eq $.SignedUser.Language .Lang}}{{.Name}}{{end}}{{end}}</div>
						<div class="menu">
						{{range .AllLangs}}
							<div class="item{{if eq $.SignedUser.Language .Lang}} active selected{{end}}" data-value="{{.Lang}}">{{.Name}}</div>
						{{end}}
						</div>
					</div>
				</div>
				<div class="field">
					<button class="ui green button">{{$.i18n.Tr "settings.update_language"}}</button>
				</div>
			</form>
		</div>
	</div>
</div>

{{template "base/footer" .}}