From 6732250b047d27b63a964dce6fe4b0b950e5d768 Mon Sep 17 00:00:00 2001 From: Gerben Date: Tue, 21 Apr 2020 15:53:38 +0200 Subject: [PATCH] Add login/logout button, show navbar to owner --- public/custom-style.css | 2 +- templates/base/head.tmpl | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/public/custom-style.css b/public/custom-style.css index f675d4a..b14f1fc 100644 --- a/public/custom-style.css +++ b/public/custom-style.css @@ -16,7 +16,7 @@ margin-left: 0; } -.svg[class*=octicon] { +.repo-title .svg[class*=octicon] { vertical-align: baseline; } diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 6650688..27d4c2d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -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 */}} + + {{else}} + + {{svg "octicon-sign-out" 16}} + + {{end}} + {{else}} + + {{svg "octicon-sign-in" 16}} + + {{end}} + {{/*