zz001 commited on
Commit
05489b7
1 Parent(s): 569e829

Update head_navbar new.tmpl

Browse files
Files changed (1) hide show
  1. head_navbar new.tmpl +310 -305
head_navbar new.tmpl CHANGED
@@ -1,306 +1,311 @@
1
- {{$notificationUnreadCount := 0}}
2
- {{if and .IsSigned .NotificationUnreadCount}}
3
- {{$notificationUnreadCount = call .NotificationUnreadCount}}
4
- {{end}}
5
-
6
- <nav id="navbar" aria-label="{{ctx.Locale.Tr " aria.navbar"}}">
7
- <div class="navbar-left ui secondary menu">
8
- <!-- the logo -->
9
- <a class="item-non" id="navbar-logo" href="{{AppSubUrl}}/"
10
- aria-label="{{if .IsSigned}}{{ctx.Locale.Tr " dashboard"}}{{else}}{{ctx.Locale.Tr "home" }}{{end}}">
11
- <img width="183" height="31" src="{{AssetUrlPrefix}}/img/logo3.png" alt="{{ctx.Locale.Tr " logo"}}"
12
- aria-hidden="true">
13
- </a>
14
- <!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
15
- <div class="ui secondary menu item navbar-mobile-right" style="min-width:40px;width:40px;">
16
- <button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle"
17
- style="min-width: 80px;color:white;">{{svg "octicon-three-bars"}}</button>
18
- </div>
19
-
20
- <!-- navbar links non-mobile -->
21
- <div class="nav-countent">
22
- <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">
23
- {{ctx.Locale.Tr "explore"}}
24
- <span class="img">
25
- <img src="{{AssetUrlPrefix}}/img/icon/models.png" width="24" height="24">
26
- </span>
27
- </a>
28
- {{template "custom/extra_links" .}}
29
- <a class="item{{if .PageIsDataset}} active{{end}}" rel="noopener noreferrer"
30
- href="{{AppSubUrl}}/explore/datasets">
31
- {{ctx.Locale.Tr "datasets"}}
32
- <span class="img">
33
- <img src="{{AssetUrlPrefix}}/img/icon/database.png" width="24" height="24">
34
- </span>
35
- </a>
36
-
37
- <a class="item{{if .PageIsSpace}} active{{end}}" rel="noopener noreferrer"
38
- href="{{AppSubUrl}}/explore/spaces">
39
- {{ctx.Locale.Tr "spaces"}}
40
- <span class="img">
41
- <img src="{{AssetUrlPrefix}}/img/icon/spaces.png" width="24" height="24">
42
- </span>
43
- </a>
44
-
45
- <a class="item{{if .PageIsBlockchain}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
46
- "blcokchain"}}
47
- <span class="img">
48
- <img src="{{AssetUrlPrefix}}/img/icon/blockchain.png" width="24" height="24" />
49
- </span>
50
- </a>
51
-
52
- <a class="item{{if .PageIsDocs}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr "docs"}}
53
- <span class="img">
54
- <img src="{{AssetUrlPrefix}}/img/icon/docs.png" width="24" height="24" />
55
- </span>
56
- </a>
57
-
58
- <a class="item{{if .PageIsPricing}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
59
- "pricing"}}
60
- <span class="img">
61
- <img src="{{AssetUrlPrefix}}/img/icon/pricing.png" width="24" height="24" />
62
- </span>
63
- </a>
64
-
65
- <a class="item{{if .PageIsOther}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
66
- "other"}}
67
- <span class="img">
68
- <img src="{{AssetUrlPrefix}}/img/icon/other.png" width="24" height="24" />
69
- </span>
70
- </a>
71
- </div>
72
- </div>
73
- <!-- 20231207 update 添加了全球化 item和导航栏的冲突 所以提出来了-->
74
- <!-- the full dropdown menus -->
75
- <div class="navbar-right ui secondary menu">
76
- <!-- 搜索图片-->
77
- <span class="img-container"></span>
78
- <a class="item search_img {{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="/">
79
- <img class="links" width="100%" height="100%" src="{{AssetUrlPrefix}}/img/suod.png" alt="{{ctx.Locale.Tr "
80
- sousuo"}}" aria-hidden="true">
81
- </a>
82
- <!-- 全球化 begin-->
83
- <div class="item right-links" role="group" aria-label="{{ctx.Locale.Tr " aria.footer.links"}}">
84
- <div class="ui dropdown upward language">
85
- <!--{{if eq ctx.Locale.Lang "en-US"}}
86
- <span class="img" style="display:none;"><img src="{{AssetUrlPrefix}}/img/flags/ENG.png"></span>
87
- {{else if eq ctx.Locale.Lang "zh-CN"}}
88
- <span class="img" style="display:none;"><img src="{{AssetUrlPrefix}}/img/flags/CN.png"></span>
89
- {{end}}-->
90
- <span class="flex-text-inline">{{ctx.Locale.LangName}}</span>
91
- <div class="menu language-menu">
92
- {{range .AllLangs}}
93
- <a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}"
94
- class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}"
95
- style="width: auto; text-align: center;">
96
- {{if eq .Lang "en-US"}}
97
- <span><img src="{{AssetUrlPrefix}}/img/flags/ENG.png"></span>
98
- {{else if eq .Lang "zh-CN"}}
99
- <span><img src="{{AssetUrlPrefix}}/img/flags/CN.png"></span>
100
- {{end}}
101
- {{.Name}}
102
- {{if eq ctx.Locale.Lang .Lang}}
103
- <!--<span><img src="{{AssetUrlPrefix}}/img/flags/active.png"></span>-->
104
- {{end}}
105
- </a>
106
- {{end}}
107
- </div>
108
- </div>
109
- </div>
110
- <!-- 全球化 end -->
111
- {{if and .IsSigned .MustChangePassword}}
112
- <div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr " user_profile_and_more"}}">
113
- <span class="text gt-df gt-ac">
114
- {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
115
- <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
116
- <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
117
- </span>
118
- <div class="menu user-menu">
119
- <div class="ui header">
120
- {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
121
- </div>
122
-
123
- <!-- <div class="divider"></div> -->
124
- <div class="pd">
125
- <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
126
- {{svg "octicon-sign-out"}}
127
- {{ctx.Locale.Tr "sign_out"}}
128
- </a>
129
- </div>
130
- </div><!-- end content avatar menu -->
131
- </div><!-- end dropdown avatar menu -->
132
- {{else if .IsSigned}}
133
- {{if EnableTimetracking}}
134
- <div class="active-stopwatch-popup item tippy-target gt-p-3">
135
- <div class="gt-df gt-ac">
136
- <a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
137
- {{svg "octicon-issue-opened" 16 "gt-mr-3"}}
138
- <span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
139
- <span class="ui primary label stopwatch-time gt-my-0 gt-mx-4"
140
- data-seconds="{{.ActiveStopwatch.Seconds}}">
141
- {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
142
- </span>
143
- </a>
144
- <form class="stopwatch-commit" method="post"
145
- action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
146
- {{.CsrfTokenHtml}}
147
- <button type="submit" class="ui button mini compact basic icon"
148
- data-tooltip-content="{{ctx.Locale.Tr " repo.issues.stop_tracking"}}">{{svg
149
- "octicon-square-fill"}}</button>
150
- </form>
151
- <form class="stopwatch-cancel" method="post"
152
- action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
153
- {{.CsrfTokenHtml}}
154
- <button type="submit" class="ui button mini compact basic icon"
155
- data-tooltip-content="{{ctx.Locale.Tr " repo.issues.cancel_tracking"}}">{{svg
156
- "octicon-trash"}}</button>
157
- </form>
158
- </div>
159
- </div>
160
- {{end}}
161
-
162
-
163
- <!-- <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">-->
164
- <!-- <span class="text">-->
165
- <!-- {{svg "octicon-plus"}}-->
166
- <!-- <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>-->
167
- <!-- <span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>-->
168
- <!-- </span>-->
169
- <!-- <div class="menu">-->
170
- <!-- <a class="item" href="{{AppSubUrl}}/repo/create">-->
171
- <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}-->
172
- <!-- </a>-->
173
- <!-- -->
174
- <!-- <a class="item" href="{{AppSubUrl}}/create/dataset">-->
175
- <!-- {{svg "octicon-plus"}} creat/dataset-->
176
- <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
177
- <!-- </a>-->
178
- <!-- <a class="item" href="{{AppSubUrl}}/create/space">-->
179
- <!-- {{svg "octicon-plus"}} creat/space-->
180
- <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
181
- <!-- </a>-->
182
- <!-- <a class="item" href="{{AppSubUrl}}/create/collection">-->
183
- <!-- {{svg "octicon-plus"}} create/collection-->
184
- <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
185
- <!-- </a>-->
186
- <!-- -->
187
- <!-- {{if .SignedUser.CanCreateOrganization}}-->
188
- <!-- <a class="item" href="{{AppSubUrl}}/org/create">-->
189
- <!-- {{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}-->
190
- <!-- </a>-->
191
- <!-- {{end}}-->
192
- <!-- &lt;!&ndash; {{if not .DisableMigrations}}-->
193
- <!-- <a class="item" href="{{AppSubUrl}}/repo/migrate">-->
194
- <!-- {{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}-->
195
- <!-- </a>-->
196
- <!-- {{end}} &ndash;&gt;-->
197
- <!-- </div>&lt;!&ndash; end content create new menu &ndash;&gt;-->
198
- <!-- </div>&lt;!&ndash; end dropdown menu create new &ndash;&gt;-->
199
-
200
- <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "
201
- user_profile_and_more"}}">
202
- <span class="text gt-df gt-ac">
203
- {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
204
- <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
205
- <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
206
- </span>
207
- <div class="menu user-menu">
208
- <div class="ui header">
209
- {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
210
- </div>
211
-
212
- <!-- <div class="divider"></div> -->
213
- <div class="pd">
214
- <a class="item" href="{{.SignedUser.HomeLink}}">
215
- {{svg "octicon-person"}}
216
- {{ctx.Locale.Tr "your_profile"}}
217
- </a>
218
- {{if not .DisableStars}}
219
- <a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
220
- {{svg "octicon-star"}}
221
- {{ctx.Locale.Tr "your_starred"}}
222
- </a>
223
- {{end}}
224
- </div>
225
-
226
- <!-- <div class="divider"></div> -->
227
- <div class="pd">
228
- <a class="item" href="{{AppSubUrl}}/repo/create">
229
- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
230
- </a>
231
-
232
- <a class="item" href="{{AppSubUrl}}/repo/create/dataset">
233
- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_dataset"}}
234
- <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
235
- </a>
236
- <a class="item" href="{{AppSubUrl}}/repo/create/space">
237
- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_space"}}
238
- <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
239
- </a>
240
- <a class="item" href="{{AppSubUrl}}/repo/create/collection">
241
- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_collection"}}
242
- <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
243
- </a>
244
-
245
- {{if .SignedUser.CanCreateOrganization}}
246
- <a class="item" href="{{AppSubUrl}}/org/create">
247
- {{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
248
- </a>
249
- {{end}}
250
- <a class="item" href="{{.SignedUser.HomeLink}}">
251
- {{svg "octicon-person"}}
252
- {{ctx.Locale.Tr "your_profile"}}
253
- </a>
254
- {{if not .DisableStars}}
255
- <a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
256
- {{svg "octicon-star"}}
257
- {{ctx.Locale.Tr "your_starred"}}
258
- </a>
259
- {{end}}
260
-
261
- <a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
262
- {{svg "octicon-bell"}}
263
- {{ctx.Locale.Tr "notification.subscriptions"}}
264
- </a>
265
- <a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
266
- {{svg "octicon-tools"}}
267
- {{ctx.Locale.Tr "your_settings"}}
268
- </a>
269
- <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
270
- {{svg "octicon-question"}}
271
- {{ctx.Locale.Tr "help"}}
272
- </a>
273
- </div>
274
-
275
-
276
- {{if .IsAdmin}}
277
- <div class="pd">
278
- <a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
279
- {{svg "octicon-server"}}
280
- {{ctx.Locale.Tr "admin_panel"}}
281
- </a>
282
- </div>
283
- {{end}}
284
-
285
- <!-- <div class="divider"></div> -->
286
- <div class="pd">
287
- <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
288
- {{svg "octicon-sign-out"}}
289
- {{ctx.Locale.Tr "sign_out"}}
290
- </a>
291
- </div>
292
- </div><!-- end content avatar menu -->
293
- </div><!-- end dropdown avatar menu -->
294
- {{else}}
295
- {{if .ShowRegistrationButton}}
296
- <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
297
- {{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
298
- </a>
299
- {{end}}
300
- <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow"
301
- href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
302
- {{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
303
- </a>
304
- {{end}}
305
- </div><!-- end full right menu -->
 
 
 
 
 
306
  </nav>
 
1
+ {{$notificationUnreadCount := 0}}
2
+ {{if and .IsSigned .NotificationUnreadCount}}
3
+ {{$notificationUnreadCount = call .NotificationUnreadCount}}
4
+ {{end}}
5
+
6
+ ---
7
+ list:1-12345
8
+ grass:2.xxx
9
+ ---
10
+
11
+ <nav id="navbar" aria-label="{{ctx.Locale.Tr " aria.navbar"}}">
12
+ <div class="navbar-left ui secondary menu">
13
+ <!-- the logo -->
14
+ <a class="item-non" id="navbar-logo" href="{{AppSubUrl}}/"
15
+ aria-label="{{if .IsSigned}}{{ctx.Locale.Tr " dashboard"}}{{else}}{{ctx.Locale.Tr "home" }}{{end}}">
16
+ <img width="183" height="31" src="{{AssetUrlPrefix}}/img/logo3.png" alt="{{ctx.Locale.Tr " logo"}}"
17
+ aria-hidden="true">
18
+ </a>
19
+
20
+
21
+ <div class="ui secondary menu item navbar-mobile-right" style="min-width:40px;width:40px;">
22
+ <button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle"
23
+ style="min-width: 80px;color:white;">{{svg "octicon-three-bars"}}</button>
24
+ </div>
25
+
26
+ <div class="nav-countent">
27
+ <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">
28
+ {{ctx.Locale.Tr "explore"}}
29
+ <span class="img">
30
+ <img src="{{AssetUrlPrefix}}/img/icon/models.png" width="24" height="24">
31
+ </span>
32
+ </a>
33
+ {{template "custom/extra_links" .}}
34
+ <a class="item{{if .PageIsDataset}} active{{end}}" rel="noopener noreferrer"
35
+ href="{{AppSubUrl}}/explore/datasets">
36
+ {{ctx.Locale.Tr "datasets"}}
37
+ <span class="img">
38
+ <img src="{{AssetUrlPrefix}}/img/icon/database.png" width="24" height="24">
39
+ </span>
40
+ </a>
41
+
42
+ <a class="item{{if .PageIsSpace}} active{{end}}" rel="noopener noreferrer"
43
+ href="{{AppSubUrl}}/explore/spaces">
44
+ {{ctx.Locale.Tr "spaces"}}
45
+ <span class="img">
46
+ <img src="{{AssetUrlPrefix}}/img/icon/spaces.png" width="24" height="24">
47
+ </span>
48
+ </a>
49
+
50
+ <a class="item{{if .PageIsBlockchain}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
51
+ "blcokchain"}}
52
+ <span class="img">
53
+ <img src="{{AssetUrlPrefix}}/img/icon/blockchain.png" width="24" height="24" />
54
+ </span>
55
+ </a>
56
+
57
+ <a class="item{{if .PageIsDocs}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr "docs"}}
58
+ <span class="img">
59
+ <img src="{{AssetUrlPrefix}}/img/icon/docs.png" width="24" height="24" />
60
+ </span>
61
+ </a>
62
+
63
+ <a class="item{{if .PageIsPricing}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
64
+ "pricing"}}
65
+ <span class="img">
66
+ <img src="{{AssetUrlPrefix}}/img/icon/pricing.png" width="24" height="24" />
67
+ </span>
68
+ </a>
69
+
70
+ <a class="item{{if .PageIsOther}} active{{end}}" rel="noopener noreferrer" href="/">{{ctx.Locale.Tr
71
+ "other"}}
72
+ <span class="img">
73
+ <img src="{{AssetUrlPrefix}}/img/icon/other.png" width="24" height="24" />
74
+ </span>
75
+ </a>
76
+ </div>
77
+ </div>
78
+ <!-- 20231207 update 添加了全球化 item和导航栏的冲突 所以提出来了-->
79
+ <!-- the full dropdown menus -->
80
+ <div class="navbar-right ui secondary menu">
81
+ <!-- 搜索图片-->
82
+ <span class="img-container"></span>
83
+ <a class="item search_img {{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="/">
84
+ <img class="links" width="100%" height="100%" src="{{AssetUrlPrefix}}/img/suod.png" alt="{{ctx.Locale.Tr "
85
+ sousuo"}}" aria-hidden="true">
86
+ </a>
87
+ <!-- 全球化 begin-->
88
+ <div class="item right-links" role="group" aria-label="{{ctx.Locale.Tr " aria.footer.links"}}">
89
+ <div class="ui dropdown upward language">
90
+ <!--{{if eq ctx.Locale.Lang "en-US"}}
91
+ <span class="img" style="display:none;"><img src="{{AssetUrlPrefix}}/img/flags/ENG.png"></span>
92
+ {{else if eq ctx.Locale.Lang "zh-CN"}}
93
+ <span class="img" style="display:none;"><img src="{{AssetUrlPrefix}}/img/flags/CN.png"></span>
94
+ {{end}}-->
95
+ <span class="flex-text-inline">{{ctx.Locale.LangName}}</span>
96
+ <div class="menu language-menu">
97
+ {{range .AllLangs}}
98
+ <a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}"
99
+ class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}"
100
+ style="width: auto; text-align: center;">
101
+ {{if eq .Lang "en-US"}}
102
+ <span><img src="{{AssetUrlPrefix}}/img/flags/ENG.png"></span>
103
+ {{else if eq .Lang "zh-CN"}}
104
+ <span><img src="{{AssetUrlPrefix}}/img/flags/CN.png"></span>
105
+ {{end}}
106
+ {{.Name}}
107
+ {{if eq ctx.Locale.Lang .Lang}}
108
+ <!--<span><img src="{{AssetUrlPrefix}}/img/flags/active.png"></span>-->
109
+ {{end}}
110
+ </a>
111
+ {{end}}
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <!-- 全球化 end -->
116
+ {{if and .IsSigned .MustChangePassword}}
117
+ <div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr " user_profile_and_more"}}">
118
+ <span class="text gt-df gt-ac">
119
+ {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
120
+ <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
121
+ <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
122
+ </span>
123
+ <div class="menu user-menu">
124
+ <div class="ui header">
125
+ {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
126
+ </div>
127
+
128
+ <!-- <div class="divider"></div> -->
129
+ <div class="pd">
130
+ <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
131
+ {{svg "octicon-sign-out"}}
132
+ {{ctx.Locale.Tr "sign_out"}}
133
+ </a>
134
+ </div>
135
+ </div><!-- end content avatar menu -->
136
+ </div><!-- end dropdown avatar menu -->
137
+ {{else if .IsSigned}}
138
+ {{if EnableTimetracking}}
139
+ <div class="active-stopwatch-popup item tippy-target gt-p-3">
140
+ <div class="gt-df gt-ac">
141
+ <a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
142
+ {{svg "octicon-issue-opened" 16 "gt-mr-3"}}
143
+ <span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
144
+ <span class="ui primary label stopwatch-time gt-my-0 gt-mx-4"
145
+ data-seconds="{{.ActiveStopwatch.Seconds}}">
146
+ {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
147
+ </span>
148
+ </a>
149
+ <form class="stopwatch-commit" method="post"
150
+ action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
151
+ {{.CsrfTokenHtml}}
152
+ <button type="submit" class="ui button mini compact basic icon"
153
+ data-tooltip-content="{{ctx.Locale.Tr " repo.issues.stop_tracking"}}">{{svg
154
+ "octicon-square-fill"}}</button>
155
+ </form>
156
+ <form class="stopwatch-cancel" method="post"
157
+ action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
158
+ {{.CsrfTokenHtml}}
159
+ <button type="submit" class="ui button mini compact basic icon"
160
+ data-tooltip-content="{{ctx.Locale.Tr " repo.issues.cancel_tracking"}}">{{svg
161
+ "octicon-trash"}}</button>
162
+ </form>
163
+ </div>
164
+ </div>
165
+ {{end}}
166
+
167
+
168
+ <!-- <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">-->
169
+ <!-- <span class="text">-->
170
+ <!-- {{svg "octicon-plus"}}-->
171
+ <!-- <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>-->
172
+ <!-- <span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>-->
173
+ <!-- </span>-->
174
+ <!-- <div class="menu">-->
175
+ <!-- <a class="item" href="{{AppSubUrl}}/repo/create">-->
176
+ <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}-->
177
+ <!-- </a>-->
178
+ <!-- -->
179
+ <!-- <a class="item" href="{{AppSubUrl}}/create/dataset">-->
180
+ <!-- {{svg "octicon-plus"}} creat/dataset-->
181
+ <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
182
+ <!-- </a>-->
183
+ <!-- <a class="item" href="{{AppSubUrl}}/create/space">-->
184
+ <!-- {{svg "octicon-plus"}} creat/space-->
185
+ <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
186
+ <!-- </a>-->
187
+ <!-- <a class="item" href="{{AppSubUrl}}/create/collection">-->
188
+ <!-- {{svg "octicon-plus"}} create/collection-->
189
+ <!-- &lt;!&ndash; {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} &ndash;&gt;-->
190
+ <!-- </a>-->
191
+ <!-- -->
192
+ <!-- {{if .SignedUser.CanCreateOrganization}}-->
193
+ <!-- <a class="item" href="{{AppSubUrl}}/org/create">-->
194
+ <!-- {{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}-->
195
+ <!-- </a>-->
196
+ <!-- {{end}}-->
197
+ <!-- &lt;!&ndash; {{if not .DisableMigrations}}-->
198
+ <!-- <a class="item" href="{{AppSubUrl}}/repo/migrate">-->
199
+ <!-- {{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}-->
200
+ <!-- </a>-->
201
+ <!-- {{end}} &ndash;&gt;-->
202
+ <!-- </div>&lt;!&ndash; end content create new menu &ndash;&gt;-->
203
+ <!-- </div>&lt;!&ndash; end dropdown menu create new &ndash;&gt;-->
204
+
205
+ <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "
206
+ user_profile_and_more"}}">
207
+ <span class="text gt-df gt-ac">
208
+ {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
209
+ <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
210
+ <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
211
+ </span>
212
+ <div class="menu user-menu">
213
+ <div class="ui header">
214
+ {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
215
+ </div>
216
+
217
+ <!-- <div class="divider"></div> -->
218
+ <div class="pd">
219
+ <a class="item" href="{{.SignedUser.HomeLink}}">
220
+ {{svg "octicon-person"}}
221
+ {{ctx.Locale.Tr "your_profile"}}
222
+ </a>
223
+ {{if not .DisableStars}}
224
+ <a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
225
+ {{svg "octicon-star"}}
226
+ {{ctx.Locale.Tr "your_starred"}}
227
+ </a>
228
+ {{end}}
229
+ </div>
230
+
231
+ <!-- <div class="divider"></div> -->
232
+ <div class="pd">
233
+ <a class="item" href="{{AppSubUrl}}/repo/create">
234
+ {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
235
+ </a>
236
+
237
+ <a class="item" href="{{AppSubUrl}}/repo/create/dataset">
238
+ {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_dataset"}}
239
+ <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
240
+ </a>
241
+ <a class="item" href="{{AppSubUrl}}/repo/create/space">
242
+ {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_space"}}
243
+ <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
244
+ </a>
245
+ <a class="item" href="{{AppSubUrl}}/repo/create/collection">
246
+ {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_collection"}}
247
+ <!-- {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}} -->
248
+ </a>
249
+
250
+ {{if .SignedUser.CanCreateOrganization}}
251
+ <a class="item" href="{{AppSubUrl}}/org/create">
252
+ {{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
253
+ </a>
254
+ {{end}}
255
+ <a class="item" href="{{.SignedUser.HomeLink}}">
256
+ {{svg "octicon-person"}}
257
+ {{ctx.Locale.Tr "your_profile"}}
258
+ </a>
259
+ {{if not .DisableStars}}
260
+ <a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
261
+ {{svg "octicon-star"}}
262
+ {{ctx.Locale.Tr "your_starred"}}
263
+ </a>
264
+ {{end}}
265
+
266
+ <a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
267
+ {{svg "octicon-bell"}}
268
+ {{ctx.Locale.Tr "notification.subscriptions"}}
269
+ </a>
270
+ <a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
271
+ {{svg "octicon-tools"}}
272
+ {{ctx.Locale.Tr "your_settings"}}
273
+ </a>
274
+ <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
275
+ {{svg "octicon-question"}}
276
+ {{ctx.Locale.Tr "help"}}
277
+ </a>
278
+ </div>
279
+
280
+
281
+ {{if .IsAdmin}}
282
+ <div class="pd">
283
+ <a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
284
+ {{svg "octicon-server"}}
285
+ {{ctx.Locale.Tr "admin_panel"}}
286
+ </a>
287
+ </div>
288
+ {{end}}
289
+
290
+ <!-- <div class="divider"></div> -->
291
+ <div class="pd">
292
+ <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
293
+ {{svg "octicon-sign-out"}}
294
+ {{ctx.Locale.Tr "sign_out"}}
295
+ </a>
296
+ </div>
297
+ </div><!-- end content avatar menu -->
298
+ </div><!-- end dropdown avatar menu -->
299
+ {{else}}
300
+ {{if .ShowRegistrationButton}}
301
+ <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
302
+ {{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
303
+ </a>
304
+ {{end}}
305
+ <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow"
306
+ href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
307
+ {{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
308
+ </a>
309
+ {{end}}
310
+ </div><!-- end full right menu -->
311
  </nav>