|
3 | 3 | {{$notificationUnreadCount = call .NotificationUnreadCount}}
|
4 | 4 | {{end}}
|
5 | 5 |
|
6 |
| -<nav id="navbar" class="ui secondary stackable menu" aria-label="{{.locale.Tr "aria.navbar"}}"> |
7 |
| - <div class="item"> |
| 6 | +<nav id="navbar" aria-label="{{.locale.Tr "aria.navbar"}}"> |
| 7 | + <div class="navbar-left ui secondary menu"> |
8 | 8 | <!-- the logo -->
|
9 |
| - <a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}"> |
| 9 | + <a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}"> |
10 | 10 | <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
|
11 | 11 | </a>
|
12 | 12 |
|
13 | 13 | <!-- 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 -->
|
14 |
| - <div class="ui secondary menu navbar-mobile-right gt-gap-2"> |
| 14 | + <div class="ui secondary menu item navbar-mobile-right gt-gap-2"> |
15 | 15 | {{if .IsSigned}}
|
16 |
| - <a class="item gt-mx-0 gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> |
| 16 | + <a class="item mobile-right-item gt-mr-2 gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> |
17 | 17 | <div class="gt-relative">
|
18 | 18 | {{svg "octicon-bell"}}
|
19 | 19 | <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
20 | 20 | </div>
|
21 | 21 | </a>
|
22 | 22 | {{end}}
|
23 |
| - <button class="item ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button> |
| 23 | + <button class="item mobile-right-item ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button> |
24 | 24 | </div>
|
25 |
| - </div> |
26 | 25 |
|
27 |
| - <!-- navbar links --> |
28 |
| - {{if and .IsSigned .MustChangePassword}} |
29 |
| - {{/* No links */}} |
30 |
| - {{else if .IsSigned}} |
31 |
| - {{if not .UnitIssuesGlobalDisabled}} |
32 |
| - <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a> |
33 |
| - {{end}} |
34 |
| - {{if not .UnitPullsGlobalDisabled}} |
35 |
| - <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a> |
36 |
| - {{end}} |
37 |
| - {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} |
38 |
| - {{if .ShowMilestonesDashboardPage}} |
39 |
| - <a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a> |
| 26 | + |
| 27 | + <!-- navbar links non-mobile --> |
| 28 | + {{if and .IsSigned .MustChangePassword}} |
| 29 | + {{/* No links */}} |
| 30 | + {{else if .IsSigned}} |
| 31 | + {{if not .UnitIssuesGlobalDisabled}} |
| 32 | + <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a> |
40 | 33 | {{end}}
|
| 34 | + {{if not .UnitPullsGlobalDisabled}} |
| 35 | + <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a> |
| 36 | + {{end}} |
| 37 | + {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} |
| 38 | + {{if .ShowMilestonesDashboardPage}} |
| 39 | + <a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a> |
| 40 | + {{end}} |
| 41 | + {{end}} |
| 42 | + <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> |
| 43 | + {{else if .IsLandingPageOrganizations}} |
| 44 | + <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a> |
| 45 | + {{else}} |
| 46 | + <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> |
41 | 47 | {{end}}
|
42 |
| - <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> |
43 |
| - {{else if .IsLandingPageOrganizations}} |
44 |
| - <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a> |
45 |
| - {{else}} |
46 |
| - <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> |
47 |
| - {{end}} |
48 | 48 |
|
49 |
| - {{template "custom/extra_links" .}} |
| 49 | + {{template "custom/extra_links" .}} |
50 | 50 |
|
51 |
| - {{if not .IsSigned}} |
52 |
| - <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a> |
53 |
| - {{end}} |
| 51 | + {{if not .IsSigned}} |
| 52 | + <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a> |
| 53 | + {{end}} |
| 54 | + </div> |
54 | 55 |
|
55 | 56 | <!-- the full dropdown menus -->
|
56 |
| - <div class="right menu"> |
| 57 | + <div class="navbar-right ui secondary menu"> |
57 | 58 | {{if and .IsSigned .MustChangePassword}}
|
58 | 59 | <div class="ui dropdown jump item" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
59 | 60 | <span class="text gt-df gt-ac">
|
60 | 61 | {{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
61 |
| - <span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span> |
| 62 | + <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span> |
62 | 63 | <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
63 | 64 | </span>
|
64 | 65 | <div class="menu user-menu">
|
|
75 | 76 | </div><!-- end dropdown avatar menu -->
|
76 | 77 | {{else if .IsSigned}}
|
77 | 78 | {{if EnableTimetracking}}
|
78 |
| - <a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}"> |
| 79 | + <a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}"> |
79 | 80 | <div class="gt-relative">
|
80 | 81 | {{svg "octicon-stopwatch"}}
|
81 | 82 | <span class="header-stopwatch-dot"></span>
|
82 | 83 | </div>
|
83 |
| - <span class="mobile-only gt-ml-2">{{.locale.Tr "active_stopwatch"}}</span> |
| 84 | + <span class="mobile-only gt-ml-3">{{.locale.Tr "active_stopwatch"}}</span> |
84 | 85 | </a>
|
85 |
| - <div class="active-stopwatch-popup tippy-target gt-p-3"> |
| 86 | + <div class="active-stopwatch-popup item tippy-target gt-p-3"> |
86 | 87 | <div class="gt-df gt-ac">
|
87 | 88 | <a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
88 | 89 | {{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
|
111 | 112 | </div>
|
112 | 113 | {{end}}
|
113 | 114 |
|
114 |
| - <a href="{{AppSubUrl}}/notifications" class="item not-mobile gt-mx-0" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> |
| 115 | + <a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> |
115 | 116 | <div class="gt-relative">
|
116 | 117 | {{svg "octicon-bell"}}
|
117 | 118 | <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
|
144 | 145 | <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
145 | 146 | <span class="text gt-df gt-ac">
|
146 | 147 | {{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
147 |
| - <span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span> |
| 148 | + <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span> |
148 | 149 | <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
149 | 150 | </span>
|
150 | 151 | <div class="menu user-menu">
|
|
0 commit comments