Browse Source

Add login/logout button, show navbar to owner

master
Gerben 4 years ago
parent
commit
6732250b04
2 changed files with 21 additions and 1 deletions
  1. +1
    -1
      public/custom-style.css
  2. +20
    -0
      templates/base/head.tmpl

+ 1
- 1
public/custom-style.css View File

@@ -16,7 +16,7 @@
margin-left: 0;
}

.svg[class*=octicon] {
.repo-title .svg[class*=octicon] {
vertical-align: baseline;
}



+ 20
- 0
templates/base/head.tmpl View File

@@ -169,6 +169,26 @@

{{template "custom/body_inner_pre" .}}

{{if .IsSigned}}
{{if gt .SignedUser.MaxRepoCreation 0}}
{{/* a/the ‘first-class citizen’ gets the standard gitea navigation bar */}}
<div class="ui top secondary stackable main menu following bar light">
{{template "base/head_navbar" .}}
</div><!-- end bar -->
{{else}}
<a class="ui primary right corner label link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"
title="{{.i18n.Tr "signed_in_as"}} {{.SignedUser.Name}} — {{.i18n.Tr "sign_out"}}">
<i class="icon">{{svg "octicon-sign-out" 16}}</i>
</a>
{{end}}
{{else}}
<a class="ui{{if .PageIsSignIn}} active{{end}} right corner label" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}"
title="{{.i18n.Tr "sign_in"}}"
>
<i class="icon">{{svg "octicon-sign-in" 16}}</i>
</a>
{{end}}

{{/*
</div>
</body>


Loading…
Cancel
Save