|
142 | 142 |
|
143 | 143 | {{if not .PageIsInstall}} |
144 | 144 | <div class="ui top secondary stackable main menu following bar light"> |
145 | | - <div class="ui container" id="navbar"> |
146 | | - <div class="item brand" style="justify-content: space-between;"> |
147 | | - <a href="{{AppSubUrl}}/"> |
148 | | - <img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png"> |
149 | | - </a> |
150 | | - <div class="ui basic icon button mobile-only" id="navbar-expand-toggle"> |
151 | | - <i class="sidebar icon"></i> |
152 | | - </div> |
153 | | - </div> |
154 | | - |
155 | | - {{if .IsSigned}} |
156 | | - <a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a> |
157 | | - <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> |
158 | | - <a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> |
159 | | - <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> |
160 | | - {{else if .IsLandingPageHome}} |
161 | | - <a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a> |
162 | | - <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> |
163 | | - {{else if .IsLandingPageExplore}} |
164 | | - <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a> |
165 | | - {{else if .IsLandingPageOrganizations}} |
166 | | - <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a> |
167 | | - {{end}} |
168 | | - |
169 | | - {{template "custom/extra_links" .}} |
170 | | - |
171 | | - {{/* |
172 | | - <div class="item"> |
173 | | - <div class="ui icon input"> |
174 | | - <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}"> |
175 | | - <i class="search icon"></i> |
176 | | - </div> |
177 | | - </div> |
178 | | - */}} |
179 | | - |
180 | | - {{if .IsSigned}} |
181 | | - <div class="right stackable menu"> |
182 | | - <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted"> |
183 | | - <span class="text"> |
184 | | - <i class="fitted octicon octicon-bell"></i> |
185 | | - <span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span> |
186 | | - |
187 | | - {{if .NotificationUnreadCount}} |
188 | | - <span class="ui red label"> |
189 | | - {{.NotificationUnreadCount}} |
190 | | - </span> |
191 | | - {{end}} |
192 | | - </span> |
193 | | - </a> |
194 | | - |
195 | | - <div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted"> |
196 | | - <span class="text"> |
197 | | - <i class="fitted octicon octicon-plus"></i> |
198 | | - <span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span> |
199 | | - <i class="fitted octicon octicon-triangle-down not-mobile"></i> |
200 | | - </span> |
201 | | - <div class="menu"> |
202 | | - <a class="item" href="{{AppSubUrl}}/repo/create"> |
203 | | - <i class="fitted octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}} |
204 | | - </a> |
205 | | - <a class="item" href="{{AppSubUrl}}/repo/migrate"> |
206 | | - <i class="fitted octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}} |
207 | | - </a> |
208 | | - {{if .SignedUser.CanCreateOrganization}} |
209 | | - <a class="item" href="{{AppSubUrl}}/org/create"> |
210 | | - <i class="fitted octicon octicon-organization"></i> {{.i18n.Tr "new_org"}} |
211 | | - </a> |
212 | | - {{end}} |
213 | | - </div><!-- end content create new menu --> |
214 | | - </div><!-- end dropdown menu create new --> |
215 | | - |
216 | | - <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> |
217 | | - <span class="text"> |
218 | | - <img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}"> |
219 | | - <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> |
220 | | - <span class="mobile-only">{{.SignedUser.Name}}</span> |
221 | | - <i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i> |
222 | | - </span> |
223 | | - <div class="menu" tabindex="-1"> |
224 | | - <div class="ui header"> |
225 | | - {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> |
226 | | - </div> |
227 | | - |
228 | | - <div class="divider"></div> |
229 | | - <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}"> |
230 | | - <i class="octicon octicon-person"></i> |
231 | | - {{.i18n.Tr "your_profile"}}<!-- Your profile --> |
232 | | - </a> |
233 | | - <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars"> |
234 | | - <i class="octicon octicon-star"></i> |
235 | | - {{.i18n.Tr "your_starred"}} |
236 | | - </a> |
237 | | - <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings"> |
238 | | - <i class="octicon octicon-settings"></i> |
239 | | - {{.i18n.Tr "your_settings"}}<!-- Your settings --> |
240 | | - </a> |
241 | | - <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io"> |
242 | | - <i class="octicon octicon-question"></i> |
243 | | - {{.i18n.Tr "help"}}<!-- Help --> |
244 | | - </a> |
245 | | - {{if .IsAdmin}} |
246 | | - <div class="divider"></div> |
247 | | - |
248 | | - <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin"> |
249 | | - <i class="icon settings"></i> |
250 | | - {{.i18n.Tr "admin_panel"}}<!-- Admin Panel --> |
251 | | - </a> |
252 | | - {{end}} |
253 | | - |
254 | | - <div class="divider"></div> |
255 | | - <a class="item" href="{{AppSubUrl}}/user/logout"> |
256 | | - <i class="octicon octicon-sign-out"></i> |
257 | | - {{.i18n.Tr "sign_out"}}<!-- Sign Out --> |
258 | | - </a> |
259 | | - </div><!-- end content avatar menu --> |
260 | | - </div><!-- end dropdown avatar menu --> |
261 | | - </div><!-- end signed user right menu --> |
262 | | - |
263 | | - {{else}} |
264 | | - |
265 | | - <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a> |
266 | | - <div class="right stackable menu"> |
267 | | - {{if .ShowRegistrationButton}} |
268 | | - <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up"> |
269 | | - <i class="octicon octicon-person"></i> {{.i18n.Tr "register"}} |
270 | | - </a> |
271 | | - {{end}} |
272 | | - <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}"> |
273 | | - <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}} |
274 | | - </a> |
275 | | - </div><!-- end anonymous right menu --> |
276 | | - |
277 | | - {{end}} |
278 | | - </div><!-- end container --> |
| 145 | + {{template "base/head_navbar" .}} |
279 | 146 | </div><!-- end bar --> |
280 | 147 | {{end}} |
281 | 148 | {{/* |
|
0 commit comments