mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use <nav> instead of <div> in the global navbar (#23125)
				
					
				
			Furthermore improved/deleted some comments in the template. The appearance did not change. --------- Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -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}}
 | 
						{{$notificationUnreadCount := 0}}
 | 
				
			||||||
	{{if .IsSigned}}
 | 
						{{if .IsSigned}}
 | 
				
			||||||
		{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
 | 
							{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
 | 
				
			||||||
@@ -150,7 +150,7 @@
 | 
				
			|||||||
				</div><!-- end content create new menu -->
 | 
									</div><!-- end content create new menu -->
 | 
				
			||||||
			</div><!-- end dropdown menu create new -->
 | 
								</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">
 | 
									<span class="text">
 | 
				
			||||||
					{{avatar $.Context .SignedUser 24 "tiny"}}
 | 
										{{avatar $.Context .SignedUser 24 "tiny"}}
 | 
				
			||||||
					<span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span>
 | 
										<span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span>
 | 
				
			||||||
@@ -190,14 +190,14 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
						<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
 | 
											<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
 | 
				
			||||||
							{{svg "octicon-server"}}
 | 
												{{svg "octicon-server"}}
 | 
				
			||||||
							{{.locale.Tr "admin_panel"}}<!-- Admin Panel -->
 | 
												{{.locale.Tr "admin_panel"}}
 | 
				
			||||||
						</a>
 | 
											</a>
 | 
				
			||||||
					{{end}}
 | 
										{{end}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					<div class="divider"></div>
 | 
										<div class="divider"></div>
 | 
				
			||||||
					<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
 | 
										<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
 | 
				
			||||||
						{{svg "octicon-sign-out"}}
 | 
											{{svg "octicon-sign-out"}}
 | 
				
			||||||
						{{.locale.Tr "sign_out"}}<!-- Sign Out -->
 | 
											{{.locale.Tr "sign_out"}}
 | 
				
			||||||
					</a>
 | 
										</a>
 | 
				
			||||||
				</div><!-- end content avatar menu -->
 | 
									</div><!-- end content avatar menu -->
 | 
				
			||||||
			</div><!-- end dropdown avatar menu -->
 | 
								</div><!-- end dropdown avatar menu -->
 | 
				
			||||||
@@ -213,6 +213,6 @@
 | 
				
			|||||||
			<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
 | 
								<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"}}
 | 
									{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}}
 | 
				
			||||||
			</a>
 | 
								</a>
 | 
				
			||||||
		</div><!-- end anonymous right menu -->
 | 
							</div><!-- end anonymous user right menu -->
 | 
				
			||||||
	{{end}}
 | 
						{{end}}
 | 
				
			||||||
</div>
 | 
					</nav>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user