From 6e2f0ee9cda416546fa7b58641a967afaf191f0f Mon Sep 17 00:00:00 2001 From: Brad Date: Sat, 7 Jun 2014 12:17:48 -0700 Subject: [PATCH] updated base template to include styled Login button --- server/static/styles/drone.css | 7 +++++++ server/static/styles/modules/header.less | 7 +++++++ server/template/base.amber | 7 ++++--- server/template/html/400.html | 4 ++-- server/template/html/401.html | 4 ++-- server/template/html/403.html | 4 ++-- server/template/html/404.html | 4 ++-- server/template/html/admin_conf.html | 4 ++-- server/template/html/admin_users.html | 4 ++-- server/template/html/base.html | 4 ++-- server/template/html/login.html | 4 ++-- server/template/html/repo_branch.html | 4 ++-- server/template/html/repo_commit.html | 4 ++-- server/template/html/repo_conf.html | 4 ++-- server/template/html/repo_feed.html | 4 ++-- server/template/html/user_conf.html | 4 ++-- server/template/html/user_feed.html | 4 ++-- server/template/html/user_login.html | 4 ++-- server/template/html/user_repos.html | 4 ++-- 19 files changed, 50 insertions(+), 35 deletions(-) diff --git a/server/static/styles/drone.css b/server/static/styles/drone.css index 7e8bbc4f..06f6458e 100644 --- a/server/static/styles/drone.css +++ b/server/static/styles/drone.css @@ -2897,6 +2897,7 @@ body > header { text-transform: uppercase; color: #CCC; } +.header-login, .header-user { position: absolute; right: 0px; @@ -2911,6 +2912,7 @@ body > header { text-decoration: none; text-transform: uppercase; } +.header-login img, .header-user img { border-radius: 50%; float: right; @@ -2919,6 +2921,11 @@ body > header { margin-top: 10px; margin-left: 20px; } +.header-login { + padding-left: 20px; + padding-right: 20px; + background: #383C44; +} article { margin-left: auto; margin-right: auto; diff --git a/server/static/styles/modules/header.less b/server/static/styles/modules/header.less index 771acbda..28f57c40 100644 --- a/server/static/styles/modules/header.less +++ b/server/static/styles/modules/header.less @@ -19,6 +19,7 @@ body > header { color: #CCC; } +.header-login, .header-user { position:absolute; right:0px; @@ -43,6 +44,12 @@ body > header { } } +.header-login { + padding-left:20px; + padding-right:20px; + background: #383C44; +} + .header-actions { } diff --git a/server/template/base.amber b/server/template/base.amber index 3946943d..1634c3da 100644 --- a/server/template/base.amber +++ b/server/template/base.amber @@ -12,8 +12,6 @@ html link[rel="stylesheet"][href="/static/styles/drone.css"] title block title - block link - $link="" body header a.header-brand[href="/"] @@ -23,7 +21,10 @@ html img.header-avatar[src="//secure.gravatar.com/avatar/"+User.Gravatar+"?s=64"] span.header-username #{User.Login} else - span Login + a[href="/login"].header-login + | Login + + div block content block scripts diff --git a/server/template/html/400.html b/server/template/html/400.html index 5ef3191e..2c7dece3 100644 --- a/server/template/html/400.html +++ b/server/template/html/400.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
400 BAD REQUEST!
diff --git a/server/template/html/401.html b/server/template/html/401.html index 05b439f7..571303f5 100644 --- a/server/template/html/401.html +++ b/server/template/html/401.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
401 NOT AUTHORIZED
diff --git a/server/template/html/403.html b/server/template/html/403.html index 39d4a1cb..6a391c7b 100644 --- a/server/template/html/403.html +++ b/server/template/html/403.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
403 FORBIDDEN
diff --git a/server/template/html/404.html b/server/template/html/404.html index 6cdbff45..a238b794 100644 --- a/server/template/html/404.html +++ b/server/template/html/404.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
404 NOT FOUND
diff --git a/server/template/html/admin_conf.html b/server/template/html/admin_conf.html index d7c8f0b9..175ceb18 100644 --- a/server/template/html/admin_conf.html +++ b/server/template/html/admin_conf.html @@ -11,7 +11,7 @@ - {{$link := "/admin/settings"}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
admin config
diff --git a/server/template/html/admin_users.html b/server/template/html/admin_users.html index 22f10259..cedba3c7 100644 --- a/server/template/html/admin_users.html +++ b/server/template/html/admin_users.html @@ -11,7 +11,7 @@ - {{$link := "/admin/users"}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
admin users
diff --git a/server/template/html/base.html b/server/template/html/base.html index e8801b4f..c00aa377 100644 --- a/server/template/html/base.html +++ b/server/template/html/base.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/login.html b/server/template/html/login.html index e373bfad..fa6120f2 100644 --- a/server/template/html/login.html +++ b/server/template/html/login.html @@ -11,7 +11,7 @@ Login - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/repo_branch.html b/server/template/html/repo_branch.html index c89b87a4..401ac008 100644 --- a/server/template/html/repo_branch.html +++ b/server/template/html/repo_branch.html @@ -11,7 +11,7 @@ {{$__amber_1 := .Repo.Name}}{{$__amber_1}} · {{.Branch}} - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_5 := .User.Login}}{{$__amber_5}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/repo_commit.html b/server/template/html/repo_commit.html index 5e2042ae..7b27dbf2 100644 --- a/server/template/html/repo_commit.html +++ b/server/template/html/repo_commit.html @@ -11,7 +11,7 @@ {{$__amber_1 := .Repo.Name}}{{$__amber_2 := .Commit.Sha}}{{$__amber_1}} · {{$__amber_2}} - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_6 := .User.Login}}{{$__amber_6}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/repo_conf.html b/server/template/html/repo_conf.html index a881c52f..be96101b 100644 --- a/server/template/html/repo_conf.html +++ b/server/template/html/repo_conf.html @@ -11,7 +11,7 @@ {{$__amber_1 := .Repo.Name}}{{$__amber_1}} · Config - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_5 := .User.Login}}{{$__amber_5}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/repo_feed.html b/server/template/html/repo_feed.html index 66f154dd..c03991f3 100644 --- a/server/template/html/repo_feed.html +++ b/server/template/html/repo_feed.html @@ -11,7 +11,7 @@ {{$__amber_1 := .Repo.Name}}{{$__amber_1}} - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_5 := .User.Login}}{{$__amber_5}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/user_conf.html b/server/template/html/user_conf.html index d9419c78..f07806e5 100644 --- a/server/template/html/user_conf.html +++ b/server/template/html/user_conf.html @@ -11,7 +11,7 @@ {{$__amber_1 := .User.Login}}{{$__amber_1}} · Profile - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_5 := .User.Login}}{{$__amber_5}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/user_feed.html b/server/template/html/user_feed.html index dd1cdfc6..373b07c7 100644 --- a/server/template/html/user_feed.html +++ b/server/template/html/user_feed.html @@ -11,7 +11,7 @@ Build Feed - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
diff --git a/server/template/html/user_login.html b/server/template/html/user_login.html index af3896ba..9b2fe940 100644 --- a/server/template/html/user_login.html +++ b/server/template/html/user_login.html @@ -11,7 +11,7 @@ - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}
User Login
diff --git a/server/template/html/user_repos.html b/server/template/html/user_repos.html index 60ea2d7c..05fe7164 100644 --- a/server/template/html/user_repos.html +++ b/server/template/html/user_repos.html @@ -11,7 +11,7 @@ Repos - {{$link := ""}} +
@@ -20,7 +20,7 @@ {{$__amber_4 := .User.Login}}{{$__amber_4}} {{else}} - Login{{end}} + Login{{end}}