diff options
author | Piotr Orzechowski <piotr@orzechowski.tech> | 2018-08-27 04:23:27 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-08-26 22:23:27 -0400 |
commit | 56d931aeac653ed948cbecf643fc74809b32dec3 (patch) | |
tree | c1087bf31abf4f31d1b87b605d5cf035531a0292 /templates | |
parent | 4ae5a54c1f9395fafafe50fcab45a705eeb03e48 (diff) | |
download | gitea-56d931aeac653ed948cbecf643fc74809b32dec3.tar.gz gitea-56d931aeac653ed948cbecf643fc74809b32dec3.zip |
Hide home button when landing page is not set to home (#4651)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head.tmpl | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index a593414962..65eec65e59 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -153,15 +153,19 @@ </div> {{if .IsSigned}} - <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a> - <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> - <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> - {{else}} - <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a> + <a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a> + <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> + <a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> + <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> + {{else if .IsLandingPageHome}} + <a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a> + <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> + {{else if .IsLandingPageExplore}} + <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a> + {{else if .IsLandingPageOrganizations}} + <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a> {{end}} - <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a> - {{template "custom/extra_links" .}} {{/* |