Import 1.19.3 head_navbar.tmpl
This commit is contained in:
parent
54ac5a8b42
commit
b4c4e5a2de
@ -1,24 +1,26 @@
|
|||||||
<div class="ui container" id="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}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item brand" style="justify-content: space-between;">
|
<div class="item brand gt-sb">
|
||||||
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
|
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
|
||||||
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/gitea-sm.png" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
|
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
|
||||||
</a>
|
</a>
|
||||||
|
<div class="gt-df gt-ac">
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
<a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only" data-content='{{.locale.Tr "notifications"}}'>
|
<a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only gt-mr-4 gt-mt-3" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
||||||
<span class="text black">
|
<span class="fitted item">
|
||||||
<span class="fitted">{{svg "octicon-bell"}}</span>
|
{{svg "octicon-bell"}}
|
||||||
<span class="ui red label mini{{if not $notificationUnreadCount}} hidden{{end}} notification_count">
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">
|
||||||
{{$notificationUnreadCount}}
|
{{$notificationUnreadCount}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
|
<button class="ui icon button mobile-only" id="navbar-expand-toggle">
|
||||||
<i class="sidebar icon"></i>
|
{{svg "octicon-three-bars"}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -47,7 +49,7 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="ui icon input">
|
<div class="ui icon input">
|
||||||
<input class="searchbox" type="text" placeholder="{{.locale.Tr "search_project"}}">
|
<input class="searchbox" type="text" placeholder="{{.locale.Tr "search_project"}}">
|
||||||
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
|
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
*/}}
|
*/}}
|
||||||
@ -57,7 +59,7 @@
|
|||||||
<div class="right stackable menu">
|
<div class="right stackable menu">
|
||||||
<div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{avatar .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>
|
||||||
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||||
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
||||||
@ -77,21 +79,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{{else if .IsSigned}}
|
{{else if .IsSigned}}
|
||||||
<div class="right stackable menu">
|
<div class="right stackable menu">
|
||||||
<a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}">
|
{{if EnableTimetracking}}
|
||||||
<span class="text">
|
<a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
<span class="fitted item">
|
<span class="fitted gt-relative">
|
||||||
{{svg "octicon-stopwatch"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="red" style="position:absolute; right:-0.6em; top:-0.6em;">{{svg "octicon-dot-fill"}}</span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</span>
|
|
||||||
<span class="sr-mobile-only">{{.locale.Tr "active_stopwatch"}}</span>
|
<span class="sr-mobile-only">{{.locale.Tr "active_stopwatch"}}</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="active-stopwatch-popup tippy-target">
|
<div class="active-stopwatch-popup tippy-target">
|
||||||
<div class="df ac">
|
<div class="gt-df gt-ac">
|
||||||
<a class="stopwatch-link df ac" href="{{.ActiveStopwatch.IssueLink}}">
|
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{svg "octicon-issue-opened" 16 "mr-3"}}
|
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
||||||
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
||||||
<span class="ui primary label stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
<span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -115,17 +116,18 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile gt-mx-0" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
||||||
<span class="text">
|
<span class="fitted item">
|
||||||
<span class="fitted">{{svg "octicon-bell"}}</span>
|
{{svg "octicon-bell"}}
|
||||||
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">
|
||||||
{{$notificationUnreadCount}}
|
{{$notificationUnreadCount}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ui dropdown jump item tooltip" data-content="{{.locale.Tr "create_new"}}">
|
<div class="ui dropdown jump item tooltip gt-mx-0" data-content="{{.locale.Tr "create_new"}}">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<span class="fitted">{{svg "octicon-plus"}}</span>
|
<span class="fitted">{{svg "octicon-plus"}}</span>
|
||||||
<span class="sr-mobile-only">{{.locale.Tr "create_new"}}</span>
|
<span class="sr-mobile-only">{{.locale.Tr "create_new"}}</span>
|
||||||
@ -148,9 +150,9 @@
|
|||||||
</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" 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 .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>
|
||||||
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||||
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
|
||||||
@ -188,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 -->
|
||||||
@ -211,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>
|
||||||
|
Loading…
Reference in New Issue
Block a user