Skip to content

Commit 68c9f1a

Browse files
GiteaBotdelvhlafrikslunny
authored
Use <nav> instead of <div> in the global navbar (#23125) (#23533)
Backport #23125 by @delvh Furthermore improved/deleted some comments in the template. The appearance did not change. Co-authored-by: delvh <[email protected]> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 301de3a commit 68c9f1a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

templates/base/head_navbar.tmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="ui container" id="navbar" role="navigation" aria-label="{{.locale.Tr "aria.navbar"}}">
1+
<nav class="ui container" id="navbar" aria-label="{{.locale.Tr "aria.navbar"}}">
22
{{$notificationUnreadCount := 0}}
33
{{if .IsSigned}}
44
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
@@ -150,7 +150,7 @@
150150
</div><!-- end content create new menu -->
151151
</div><!-- end dropdown menu create new -->
152152

153-
<div class="ui dropdown jump item tooltip gt-mx-0" tabindex="-1" data-content="{{.locale.Tr "user_profile_and_more"}}">
153+
<div class="ui dropdown jump item tooltip gt-mx-0" data-content="{{.locale.Tr "user_profile_and_more"}}">
154154
<span class="text">
155155
{{avatar $.Context .SignedUser 24 "tiny"}}
156156
<span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span>
@@ -190,14 +190,14 @@
190190

191191
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
192192
{{svg "octicon-server"}}
193-
{{.locale.Tr "admin_panel"}}<!-- Admin Panel -->
193+
{{.locale.Tr "admin_panel"}}
194194
</a>
195195
{{end}}
196196

197197
<div class="divider"></div>
198198
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
199199
{{svg "octicon-sign-out"}}
200-
{{.locale.Tr "sign_out"}}<!-- Sign Out -->
200+
{{.locale.Tr "sign_out"}}
201201
</a>
202202
</div><!-- end content avatar menu -->
203203
</div><!-- end dropdown avatar menu -->
@@ -213,6 +213,6 @@
213213
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
214214
{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}}
215215
</a>
216-
</div><!-- end anonymous right menu -->
216+
</div><!-- end anonymous user right menu -->
217217
{{end}}
218-
</div>
218+
</nav>

0 commit comments

Comments
 (0)