Skip to content

Commit

Permalink
Use <nav> instead of <div> in the global navbar (#23125) (#23533)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
4 people authored Mar 17, 2023
1 parent 301de3a commit 68c9f1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ui container" id="navbar" role="navigation" aria-label="{{.locale.Tr "aria.navbar"}}">
<nav class="ui container" id="navbar" aria-label="{{.locale.Tr "aria.navbar"}}">
{{$notificationUnreadCount := 0}}
{{if .IsSigned}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
Expand Down Expand Up @@ -150,7 +150,7 @@
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->

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

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

<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out"}}
{{.locale.Tr "sign_out"}}<!-- Sign Out -->
{{.locale.Tr "sign_out"}}
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
Expand All @@ -213,6 +213,6 @@
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->
</div><!-- end anonymous user right menu -->
{{end}}
</div>
</nav>

0 comments on commit 68c9f1a

Please sign in to comment.