diff --git a/cmd/drone-server/drone.go b/cmd/drone-server/drone.go index 3fe21ecd8..6f20bbc7c 100644 --- a/cmd/drone-server/drone.go +++ b/cmd/drone-server/drone.go @@ -29,7 +29,10 @@ var ( revision string ) -var conf = flag.String("config", "drone.toml", "") +var ( + conf = flag.String("config", "drone.toml", "") + debug = flag.Bool("debug", false, "") +) func main() { flag.Parse() @@ -187,11 +190,18 @@ func main() { // static is a helper function that will setup handlers // for serving static files. func static() http.Handler { - return http.StripPrefix("/static/", http.FileServer(&assetfs.AssetFS{ + // default file server is embedded + var handler = http.FileServer(&assetfs.AssetFS{ Asset: Asset, AssetDir: AssetDir, Prefix: "cmd/drone-server/static", - })) + }) + if *debug { + handler = http.FileServer( + http.Dir("cmd/drone-server/static"), + ) + } + return http.StripPrefix("/static/", handler) } // index is a helper function that will setup a template diff --git a/cmd/drone-server/static/images/logo.svg b/cmd/drone-server/static/images/logo.svg index 0d7cf1696..9b9374001 100644 --- a/cmd/drone-server/static/images/logo.svg +++ b/cmd/drone-server/static/images/logo.svg @@ -20,7 +20,7 @@ - - - - - + + + + + - -
+ +
diff --git a/cmd/drone-server/static/scripts/views/build.html b/cmd/drone-server/static/scripts/views/build.html index f2afa1eab..02930aa22 100644 --- a/cmd/drone-server/static/scripts/views/build.html +++ b/cmd/drone-server/static/scripts/views/build.html @@ -6,22 +6,29 @@ {{ "+"+user.login }} -
-
-
+ + + + -
+ +
@@ -70,83 +77,14 @@
-
-

-			
+

+
 
 
 			
-	
- - + - - - - diff --git a/cmd/drone-server/static/scripts/views/builds.html b/cmd/drone-server/static/scripts/views/builds.html index 57cda0817..c9f3a9a0c 100644 --- a/cmd/drone-server/static/scripts/views/builds.html +++ b/cmd/drone-server/static/scripts/views/builds.html @@ -6,39 +6,34 @@ {{ "+"+user.login }} -
-
-
- + -
    -
  • -
    -
    - -
    -

    {{ build.sequence }}

    -
    -
    -

    {{ build.branch }} ({{build.sha | trunc }})

    -

    {{ build.author }} · {{ build.started_at | fromNow }}

    -
    -
    -

    {{ build.message }}

    -
    -
    +
    + + + +
  • -
- -
+
+

{{ build.message }}

+

{{ build.author }} pushed to {{ build.branch }} {{ build.started_at | fromNow }}

+
+
+ + \ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/repos.html b/cmd/drone-server/static/scripts/views/repos.html index 3c3547aa1..538d9c85b 100644 --- a/cmd/drone-server/static/scripts/views/repos.html +++ b/cmd/drone-server/static/scripts/views/repos.html @@ -6,40 +6,41 @@ {{ "+"+user.login }} -
-
-
- +
+ -
+ -New -Settings -User Management +
+
- - - - - - - - - - - - - - - - - - - - - - - -
RepoStatusNumberStartedDurationBranchCommit
{{ repo.full_name }}{{ repo.last_build.state }}{{ repo.last_build.number }}{{ repo.last_build.started_at | fromNow }}{{ repo.last_build.duration | toDuration }}{{ repo.last_build.head_commit.ref || repo.last_build.pull_request.source.ref }}{{ repo.last_build.head_commit.sha || repo.last_build.pull_request.source.ref }}
+ New + + + + + + + + + + + + + + + + + + + + + + + + +
RepoStatusNumberStartedDurationBranchCommit
{{ repo.full_name }}{{ repo.last_build.state }}{{ repo.last_build.number }}{{ repo.last_build.started_at | fromNow }}{{ repo.last_build.duration | toDuration }}{{ repo.last_build.head_commit.ref || repo.last_build.pull_request.source.ref }}{{ repo.last_build.head_commit.sha || repo.last_build.pull_request.source.ref }}
+ +
+
\ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/repos_add.html b/cmd/drone-server/static/scripts/views/repos_add.html index ab3ec2288..7d825866e 100644 --- a/cmd/drone-server/static/scripts/views/repos_add.html +++ b/cmd/drone-server/static/scripts/views/repos_add.html @@ -1,13 +1,28 @@ -

Add Repository

+
+ + + + + {{ "+"+user.login }} +
-Back - -
- There was an error adding your repository. Please ensure the - repository exists and you have admin privileges. +
+
-
- - -
+
+
+
+ There was an error adding your repository. Please ensure the + repository exists and you have admin privileges. +
+ +
+ + +
+
+
\ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/repos_edit.html b/cmd/drone-server/static/scripts/views/repos_edit.html index 22085014f..ca1277353 100644 --- a/cmd/drone-server/static/scripts/views/repos_edit.html +++ b/cmd/drone-server/static/scripts/views/repos_edit.html @@ -1,43 +1,74 @@ -

{{ repo.full_name }} / Edit

+
+ + + + + {{ "+"+user.login }} +
-Back +
-
-
- - -
-
- - + -
- - -
-
- - -
-
    -
  • - - - -
  • -
  • - - - -
  • -
- -
- -
{{ repo.keypair.public }}
+ - - - +
+ + +
+
+ +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
    +
  • + + + +
  • +
  • + + + +
  • +
+ + + + + +
+ +
+ +
+

Public Key

+
+
{{ repo.keypair.public }}
+
+
+
\ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/user.html b/cmd/drone-server/static/scripts/views/user.html index e3bd32b8a..7d2f27e85 100644 --- a/cmd/drone-server/static/scripts/views/user.html +++ b/cmd/drone-server/static/scripts/views/user.html @@ -6,67 +6,61 @@ {{ "+"+user.login }} -
-
-
- +
+ + -
+
+
+
+

Login info

+
+
Login
+
{{ user.login }}
+
+
+
Full Name
+
{{ user.name }}
+
+
+
Email
+
{{ user.email }}
+
+
-
-
Login
-
{{ user.login }}
+
+

Tokens

+
+ + +
-
Full Name
-
{{ user.name }}
+
No Personal Tokens Exist
-
Created
-
{{ user.created_at | fromNow }}
- -
Updated
-
{{ user.update_at | fromNow }}
- -
Email
-
{{ user.email }}
- -
Site Admin
-
{{ user.admin }}
- -
Gravatar
-
-
- - -
- - -
- -
No Personal Tokens Exist
- - - - - - - - - - - - - - - - - - - -
LabelIssued
{{ token.label }}{{ token.issued_at | fromNow }}
- Make sure to copy your new personal access token now. You won't be able to see it again! -
{{ token.hash }}
-
+ + + + + + + + + + + + + + + + + + +
LabelIssued
{{ token.label }}{{ token.issued_at | fromNow }}
+ Make sure to copy your new personal access token now. You won't be able to see it again! +
{{ token.hash }}
+
+ +
\ No newline at end of file diff --git a/cmd/drone-server/static/scripts/views/users.html b/cmd/drone-server/static/scripts/views/users.html index 9d86fef9f..28a346b41 100644 --- a/cmd/drone-server/static/scripts/views/users.html +++ b/cmd/drone-server/static/scripts/views/users.html @@ -6,46 +6,49 @@ {{ "+"+user.login }} -
-
-
- +
+ -
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
LoginFull NameCreatedUpdatedEmailSite AdminGravatar
{{ user.login }}{{ user.name }}{{ user.created_at | fromNow }}{{ user.updated_at | fromNow }}{{ user.email }}{{ !!user.admin }}
- -
- - -
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
LoginFull NameCreatedUpdatedEmailSite AdminGravatar
{{ user.login }}{{ user.name }}{{ user.created_at | fromNow }}{{ user.updated_at | fromNow }}{{ user.email }}{{ !!user.admin }}
+
+ +
+
+ + +
+
+
\ No newline at end of file diff --git a/cmd/drone-server/static/styles/drone.css b/cmd/drone-server/static/styles/drone.css index 730a01651..a1360140c 100644 --- a/cmd/drone-server/static/styles/drone.css +++ b/cmd/drone-server/static/styles/drone.css @@ -1,5 +1,5 @@ -@import url(http://fonts.googleapis.com/css?family=Roboto:300,400,600,900); -@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono); +@import url(//fonts.googleapis.com/css?family=Roboto:300,400,600,900); +@import url(//fonts.googleapis.com/css?family=Droid+Sans+Mono); /* RESETS */ @@ -156,7 +156,7 @@ .status.error:before { font-size: 20px; content: '\f082'; - color: #C0392B; + color: #EF5350; opacity: 0.85; } @@ -266,7 +266,7 @@ .card.killed .time-ran, .card.error .time-ran, .card.failure .time-ran { - color: #C0392B + color: #EF5350 } .card .time-duration { @@ -429,7 +429,7 @@ .killed .build-number p, .error .build-number p, .failed .build-number p { - background-color: #C0392B; + background-color: #EF5350; } .list .card .message { @@ -524,15 +524,6 @@ margin-top: 4px; } - pre { - font-family: "Droid Sans Mono","Roboto","Arial"; - font-size: 14px; - color: #cecece; - line-height: 175%; - white-space: pre-wrap; - word-wrap: break-word; - } - /* DATASET */ .card .dataset { @@ -616,7 +607,7 @@ .card.error .dataset .number, .card.killed .dataset .number, .card.failure .dataset .number { - background-color: #CF000F; + background-color: #EF5350; } .card .dataset .branch-sha { @@ -698,9 +689,7 @@ } - section:last-of-type { - padding-bottom: 72px; - } + .show section:first-of-type { margin-top: 0px; @@ -735,7 +724,7 @@ margin-left: auto; margin-right: auto; } - +/* header { height: 64px; width: 100%; @@ -744,7 +733,7 @@ line-height: 72px; overflow: hidden; } - +*/ .dockable { background-color: #fafafa; } @@ -792,7 +781,7 @@ .nav-item:after, .nav-item:before { font-family: "Material-Design-Iconic-Font"; - color: #3f3f3f; + color: rgba(255,255,255,0.749); } .nav-item { @@ -890,7 +879,7 @@ vertical-align: middle; } - .logo, .menu-item { + .menu-item { height: 40px; width: auto; margin: 7px 16px; @@ -910,6 +899,7 @@ margin-left: 0; } + /* .logo:hover { opacity: 1; } @@ -940,6 +930,7 @@ opacity: 1; font-weight: 400; } + */ .menu-item { margin-right: 0; @@ -1031,7 +1022,7 @@ top: 0px; right: 25px; } - +/* .breadcrumb { padding: 0; height: 60px; @@ -1103,7 +1094,7 @@ font-weight: 400; color: #fafafa !important; } - +*/ .test { position: absolute; top: -72px; @@ -1164,17 +1155,6 @@ */ - article { - padding: 30px 20px; - } - - article section { - margin:0px auto; - max-width:960px; - padding: 20px; - background: #FFF; - margin-bottom:30px; - } /* INFO PANE */ @@ -1207,3 +1187,217 @@ margin-top: -20px; font-size: 40px; } + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { + display: none !important; +} + +body { + background:#f5f5f5; +} +header { + background:#FFF; +} +header[show-nav] { + display:none; +} +section.central-container { + margin-top:50px; +} + +header { + height: 60px; + background: #FFF; + line-height: 60px; + overflow: hidden; + padding-left:15px; + padding-right:25px; +} + +header .logo { + content: ''; + display: block; + height: 60px; + width: 33px; + background: url("/static/images/logo.svg") no-repeat center center; + background-size: 33px; + float:left; +} + +.toolbar { + background:#424242; + position:relative; + height:56px; + box-shadow: 0 2px 5px 0 rgba(0,0,0,0.26); + position: sticky; + top: 0px; +} +.toolbar .breadcrumb { + max-width:900px; + margin:0px auto; + line-height:56px; + height:56px; +} +.breadcrumb a { + color:#FFF; + font-size:20px; + line-height:56px; + height:56px; + text-decoration:none; + display:inline-block; +} +.breadcrumb span { + color: rgba(255,255,255,0.749); + line-height:56px; + height:56px; +} +.breadcrumb span:before { + font-family: "Material-Design-Iconic-Font"; + color: rgba(255,255,255,0.749); + line-height:56px; + content: "\f29c"; +} + +.breadcrumb a.icon-home { + position: absolute; + left: -50px; +} +.breadcrumb a.icon-home:after { + font-family: "Material-Design-Iconic-Font"; + line-height:56px; + color: rgba(255,255,255,0.749); + content: "\f297"; + font-size:24px; + vertical-align: middle; +} + +.menu { + position:absolute; + right:25px; + top:0px; +} + +article > pre { + font-family: "Droid Sans Mono","Roboto","Arial"; + font-size: 13px; + color:#fff; + background: #424242; + line-height: 18px; + white-space: pre-wrap; + word-wrap: break-word; + padding: 30px; + margin-top:30px; +} + +article { + padding:0px 20px; + max-width:900px; + margin:0px auto; + box-sizing: content-box; + margin-bottom:30px; + padding-top:15px; +} + +section { + background:#FFF; + padding:0px; + margin-top:30px; + border:1px solid #EEE; +} + +section h2 { + margin: 0px; + padding: 30px 30px; + padding-bottom: 10px; + font-size: 18px; + color: #424242; + font-weight: normal; +} + +section .row { + padding: 0px 30px; + text-decoration: none; + display: block; + display: flex; + text-decoration: none; +} + +section .row:hover { + background:#FAFAFA; +} + +section .row > div:first-child { + padding: 30px 0px; + border-bottom: 1px solid #EEE; + width: 200px; + font-size:14px; + color: #757575; +} + +section .row > div:last-child { + color: #9E9E9E; + flex: 1 1 auto; + padding: 30px 30px; + border-bottom: 1px solid #EEE; + font-size:14px; +} + +section .row:last-child > div { + border-bottom:none; +} + +section .build-row .build-num { + padding: 8px; + display: inline-block; + width: 75px; + border-radius: 2px; + color: rgba(255,255,255,0.9); + font-size: 16px; + text-align: center; + background: #FFD740; +} +.success { + background:#26A65B; +} +.error, +.killed, +.failure { + background: #EF5350; +} + +section .build-row > div:first-child { + width:90px; +} + +section .build-row h3 { + color:#212121; + font-size:18px; + margin-bottom:10px; +} + +section .build-row strong { + color:#616161; + font-weight:normal; +} + +pre.key { + white-space: pre-wrap; + word-wrap: break-word; + padding:30px; + font-size:14px; + line-height:18px; + color:#424242; + font-family: "Droid Sans Mono","Roboto","Arial"; +} + +@media (max-width: 990px) { + .breadcrumb a.icon-home { + position: static; + padding-right:20px; + padding-left:20px; + } + article { + padding-top:0px; + margin-top:-5px; + } +} \ No newline at end of file