rewrite build header

This commit is contained in:
Lisa Passing 2015-03-04 18:02:49 +01:00
parent c8f1fddda8
commit e9732c965e
16 changed files with 411 additions and 163 deletions

View File

@ -24,7 +24,7 @@
@import "app/main/repository";
@import "app/main/sponsors";
@import "app/main/summary";
@import "app/main/tools";
// @import "app/main/tools";
@import "app/main";
@import "app/maximize";
@import "app/misc";
@ -47,14 +47,16 @@
@import "app/modules/section";
@import "app/modules/loader";
// @import "app/modules/tiles";
@import "app/modules/tiles";
@import "app/modules/buttons";
@import "app/modules/icons";
@import "app/modules/search";
@import "app/modules/dropdown";
@import "app/modules/tabs";
@import "app/layout";
@import "app/layouts/dashboard";
@import "app/layouts/error";
@import "app/layouts/footer";
@import "app/top";
@import "app/layouts/buildheader";
@import "app/top";

View File

@ -47,4 +47,14 @@
right: 0
left: 0
bottom: 0
margin: auto
margin: auto
%inline-block
display: inline-block
@mixin colorTiles($color)
.tile-status
background-color: $color
.repo-header-title a,
.repo-build-status
color: $color

View File

@ -56,4 +56,10 @@ $tab-nav-inactive-bg-hover: $white
$tab-active-bg: $blue-grey-light
// log
$log-header-bg: #444444
$log-header-bg: #444444
// new build header
$font-size-xxl: 30px
$grey: #A6ADAD
$cream-light: #FAFAF8
$cream-dark: lighten(mix(#F7F7F4, $grey), 10)

View File

@ -59,3 +59,7 @@
transform: scale(0)
40%
transform: scale(1.0)
.sync-spinner--grey
i
background-color: #A6ADAD

View File

@ -0,0 +1,100 @@
.repo
font-size: $font-size-normal
color: $grey
a
color: $grey
.repo-header
header
margin: 1rem 0 2rem
> *
vertical-align: middle
&.started,
&.created
@include colorTiles($start-color)
&.failed
@include colorTiles($fail-color)
&.errored
@include colorTiles($error-color)
&.canceled
@include colorTiles($cancel-color)
&.passed
@include colorTiles($pass-color)
&.inactive
@include colorTiles($cancel-color)
.repo-header-title
@extend %inline-block
margin: 0
font-weight: 400
font-size: $font-size-xxl
.repo-header-icons
a
@extend %inline-block
height: 1.7em
.icon
width: 1.7em
height: 100%
@media #{$medium-up}
@extend %inline-block
.repo-menus
@media #{$medium-up}
.dropdown
float: right
.tabnav
float: left
.tabbody
clear: both
margin-top: 4px
.repo-main-commit
&,
small
margin: 0
font-weight: 400
font-size: $font-size-big
color: #818181
line-height: 1
small
margin-right: .3em
font-weight: 600
.repo-main-author
@media #{$medium-up}
position: absolute
bottom: 0
.repo-main-info
@include resetul
padding-right: 2em
margin-right: 1.4em
border-right: $cream-dark 1px solid
line-height: 1.8
.icon
margin-right: .3em
.repo-main-tools
position: absolute
top: 0
bottom: 0
right: 0
a
display: block
margin-bottom: .5em
text-align: center
background-color: $grey
&:hover
background-color: darken($grey, 10)
.icon
width: 1em
height: 1.4em
vertical-align: middle
.icon--codeclimate
width: 1.2em

View File

@ -117,3 +117,8 @@ $button-border-color: #d4d4d4
background-color: lighten(#696867, 10)
&:focus
background-color: #696867
.button-circle
width: 1.7em
height: 1.7em
border-radius: 50%

View File

@ -83,3 +83,42 @@ $dropdown-border: #C3D9DB
.filter-current:hover ~ .filter-dropdown,
.filter-dropdown:hover
display: block
.dropdown
position: relative
.dropdown--classic
width: 10.7rem
overflow: auto
.dropdown-button
background-color: $grey
border: none
color: $white
font-size: $font-size-normal
&:hover
background-color: darken($grey, 10)
.icon-arrow-down
border-top-color: $white
@media #{$medium-up}
float: right
.dropdown-menu
@include resetul
@include border-bottom-radius(4px)
position: absolute
top: 29px // height of the button
width: 100%
overflow: hidden
background-color: $grey
a
@extend %inline-block
width: 100%
padding: .4em 2em
color: $white
&:hover
background-color: darken($grey, 10)
display: none

View File

@ -1,21 +1,38 @@
.icon
width: 1em
height: 1em
display: inline-block
background:
size: 100%
repeat: no-repeat
.icon-cal
.icon-cal,
.icon--cal
background-image: inline-image('dashboard/cal.svg')
.icon-github
.icon-clock,
.icon--clock
background-image: inline-image('ui/clock.svg')
.icon-github,
.icon--github
background-image: inline-image('dashboard/github.svg')
.icon-branch
.icon--github-circle
background-image: inline-image('icons/github.svg')
.icon-branch,
.icon--branch
background-image: inline-image('dashboard/branch.svg')
.icon-hash
.icon-hash,
.icon--hash
background-image: inline-image('dashboard/hash.svg')
.icon-cog,
.icon--cog
background-image: inline-image('icons/settings.svg')
.icon-star
background-image: inline-image('dashboard/star-off.svg')
@ -34,6 +51,9 @@
.icon.started
background-image: inline-image('dashboard/status-pending.svg')
.icon.push
background-image: inline-image('icons/push.svg')
.icon-lock
background-image: inline-image('dashboard/private-icon.svg')
@ -42,6 +62,20 @@
&:hover
background-image: inline-image('dashboard/burger-hover.svg')
.icon-sync,
.icon--trigger
background-image: inline-image('icons/sync-account-icon.svg')
.icon--downloadLog
background-image: inline-image('icons/download-log-icon.svg')
.icon--removeLog
background-image: inline-image('icons/remove-log-icon.svg')
.icon--down
background-image: inline-image('icons/end-of-log-icon.svg')
.icon--codeclimate
background-image: inline-image('icons/code-climate-icon.svg')
.icon-arrow-down
width : 0
height : 0
@ -50,14 +84,4 @@
margin-left : 5px
border-left : 5px solid transparent
border-right : 5px solid transparent
border-top : 5px solid $dashboard-text-color
.icon-sync
background-image: inline-image('icons/sync-account-icon.svg')
.icon--downloadLog
background-image: inline-image('icons/download-log-icon.svg')
.icon--removeLog
background-image: inline-image('icons/remove-log-icon.svg')
.icon--down
background-image: inline-image('icons/end-of-log-icon.svg')
border-top : 5px solid $dashboard-text-color

View File

@ -0,0 +1,47 @@
.tabnav
ul
@include resetul
@include border-top-radius(4px)
width: 100%
background-color: $cream-light
clear: both
overflow: auto
@media #{$small-only}
margin-top: 2em
li
&:first-child a
border-top-left-radius: 4px
&:last-child a
border-top-right-radius: 4px
a
@extend %inline-block
width: 100%
border: 2px solid transparent
padding: .3em 1em .2em
.active
a
border-top-color: $cream-dark
border-left-color: $cream-dark
border-right-color: $cream-dark
background-color: $white
&:after
content: none
@media #{$medium-up}
ul
@extend %inline-block
li
float: left
a
&:after
content: ""
position: relative
left: 1.35em
display: inline-block
width: 2px
height: 10px
background-color: $cream-dark
li:last-child a:after
content: none

View File

@ -1,139 +1,43 @@
/*
* tile component as seen on dashboard
*/
.tiles
background : #f4f3ea
padding : 30px 0 10px 0
.columns + .columns:last-child
float: left
.tile
@extend border-radius-4px
position: relative
margin-bottom : 20px
padding : 0 10px 0 0
min-height : 125px
background : $white
color : $dashboard-text-color
font-size : 14px
border-radius : 4px
overflow: hidden
padding: .8rem .8rem .8rem 3rem
background-color: $cream-light
&:after
content: ""
@media #{$medium-up}
height: 145px
.tile-main
height: 100%
img
width: 16px
height: 16px
// todo refactor
.tile-main
@media #{$xlarge-up}
@include grid-column(9)
.tile-additional
@media #{$xlarge-up}
@include grid-column(3)
.tile-status
position: absolute
top: 0
bottom: 0
left: 0
width: 2.5em
height: 100%
border-top-left-radius: 4px
border-bottom-left-radius: 4px
.icon
display: block
position: absolute
top: 0
right: 0
bottom: 0
width: 3em
background: linear-gradient(90deg, rgba($white, .2), $white 50%, $white)
.duration, .finished
margin-top : 8px
background-repeat: no-repeat
background-position: 0 1px
background-size : 11px 11px
text-indent : 15px
.duration
background-image: url('/images/dashboard/time.svg')
line-height : 13px
.finished
background-image: url('/images/dashboard/cal.svg')
line-height : 14px
.build-status
margin: 5px 0 0
.build-information
padding: 8px 0 6px 45px
.org
margin : 0
.repo
font-size : 20px
display : inline-block
margin : 0
max-width : 250px
white-space : nowrap
line-height : 20px
text-overflow : ellipsis
.star-feature
position : absolute
top : 0
right : 0
background : url('/images/dashboard/star-on.svg') no-repeat 7px 10px
background-size : 20px 20px
.build-bar
position: absolute
background:
repeat: no-repeat
position: 7px 10px
size: 20px 20px
min-height : 100%
width : 33px
border-radius : 4px 0 0 4px
.repo a:hover,
.build-status a:hover,
.repo a:active,
.build-status a:active
text-decoration: underline
.repo a:focus,
.build-status a:focus
outline: 1px dotted
.passed
.build-bar
background:
color: $pass-color
image: url('/images/dashboard/status-passed.svg')
.org,
.repo a,
.build-status a
color: $pass-color
.failed
.build-bar
background:
color: $fail-color
image: url('/images/dashboard/status-failed.svg')
.org,
.repo a,
.build-status a
color: $fail-color
.started
.build-bar
background:
color: $start-bg-color
image: url('/images/dashboard/status-pending.svg')
.org,
.repo a,
.build-status a
color: $start-color
width: 1.1em
height: 1.1em
margin: .5em auto 1.1em
.errored
.build-bar
background:
color: $error-color
image: url('/images/dashboard/status-errored.svg')
.org,
.repo a,
.build-status a
color: $error-color
.if_private
display : inline-block
background : url('/images/dashboard/private-icon.svg') no-repeat 0 0
background-size : contain
height : 12px
width : 9px
margin-left : 5px
text-indent : -9999px
.tile-additional
position: relative

View File

@ -1,9 +1,61 @@
<div id="repo" {{bind-attr class="view.className"}}>
<div id="repo" {{bind-attr class="view.className :repo"}}>
{{#if view.isEmpty}}
{{view 'repos-empty'}}
{{else}}
{{#if repo.isLoaded}}
<div id="repo-header">
<article id="repo-header" class="repo-header passed">
<header>
<h1 class="repo-header-title">{{#link-to "repo" repo}}{{repo.slug}}{{/link-to}}</h1>
<div class="repo-header-icons">
<a {{bind-attr href="controller.urlGithub"}}><span class="icon icon--github-circle"></span></a>
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target=view}}>
<img {{bind-attr src="view.statusImageUrl"}} title="Build Status Images"/>
</a>
</div>
<p class="description">{{description}}</p>
</header>
<div class="repo-menus">
{{view 'repo-show-tools'}}
{{view 'repo-show-tabs'}}
<div class="tabbody repo-main">
<section class="tile tile--pass row" role="tabpanel" aria-labelledby="tab1" id="panel1">
<div class="tile-status">
<span class="icon icon-status passed"></span>
<span class="icon push"></span>
</div>
<div class="tile-main medium-8 columns">
<h2 class="repo-main-commit"><small class="repo-main-branch">master</small> Merge pull request #398 from craigcitro/quieter-mac</h2>
<div class="repo-main-description">
Something someting something
</div>
<div class="repo-main-author">
<img src="" alt=""> Hiro Asari authored and commited
</div>
</div>
<div class="tile-additional medium-4 columns end">
<ul class="repo-main-info">
<li class="repo-build-status"><span class="icon icon--hash"></span>234 passed</li>
<li><span class="icon icon--github"></span>Commit 324eabf2</li>
<li><span class="icon icon--github"></span>Compare 22323...233</li>
<li><span class="icon icon--clock"></span>ran for 16 sec</li>
<li><span class="icon icon--cal"></span>12 minutes ago</li>
</ul>
{{view 'repo-actions'}}
</div>
</section>
</div>
</div>
</article>
{{!-- <div id="repo-header">
<h3>{{#link-to "repo" repo}}{{repo.slug}}{{/link-to}}</h3>
<div class="github-icon"><a {{bind-attr href="controller.urlGithub"}}><img src="/images/icons/github.svg" width="21" height="21"/></a></div>
<div class="status-image">
@ -22,9 +74,9 @@
<div class="tab tab--main">
{{outlet}}
</div>
</div> --}}
{{else}}
<div class="loading"><span>Loading</span></div>
<span class="sync-spinner"><i></i><i></i><i></i></span>
{{/if}}
{{/if}}
</div>

View File

@ -1 +1 @@
<div class="loading"><span>Loading</span></div>
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>

View File

@ -1 +1 @@
<div class="loading"><span>Loading</span></div>
<div class="loading"><span>Loading</span></div>

View File

@ -1,4 +1,40 @@
<div id="actions">
<div id="actions" class="repo-main-tools">
<a href="#" title="" class="button-circle"><span class="icon icon--trigger"></span></a>
<a href="#" title="" class="button-circle"><span class="icon icon--codeclimate"></span></a>
{{#if view.displayCancelBuild}}
<a href="#" {{action "cancelBuild" target=view}}
{{bind-attr class="view.canCancelBuild::disabled"}} title="Cancel Build"></a>
{{/if}}
{{#if view.displayCancelJob}}
<a href="#" {{action "cancelJob" target=view}}
{{bind-attr class="view.canCancelJob::disabled"}} title="Cancel Job"></a>
{{/if}}
{{#if view.displayRequeueBuild}}
{{#if view.requeueing}}
<span class="loading"></span>
{{else}}
<a href="#" {{action "requeueBuild" target=view}}
{{bind-attr class="view.canRequeueBuild::disabled"}} title="Restart Build"></a>
{{/if}}
{{/if}}
{{#if view.displayRequeueJob}}
{{#if view.requeueing}}
<span class="loading"></span>
{{else}}
<a href="#" {{action "requeueJob" target=view}}
{{bind-attr class="view.canRequeueJob::disabled"}} title="Restart Job"></a>
{{/if}}
{{/if}}
{{#if view.displayCodeClimate}}
<a href="#" name="code-climate"
{{action "codeClimatePopup" target=view}}
{{bind-attr class=":open-popup"}} title="Test Coverage with Code Climate"></a>
{{/if}}
</div>
{{!-- <div id="actions">
<ul>
{{#if view.displayCancelBuild}}
<li class="icon cancel-build" title="Cancel Build">
@ -41,7 +77,7 @@
{{/if}}
</ul>
</div>
</div> --}}
<div id="remove-log-popup" class="popup">
<a href="#" class="close" {{action "popupClose" target=view}}></a>

View File

@ -1,4 +1,13 @@
<ul class="tabs tabs--main">
<div class="tabnav" role="tablist">
<ul>
<li role="presentation" class="active"><a href="#" title="" role="tab" aria-selected="true" id="tab1" aria-controls="panel1">Current</a></li>
<li role="presentation"><a href="#" title="" role="tab" aria-selected="false">Build History</a></li>
<li role="presentation"><a href="#" title="" role="tab" aria-selected="false">Pull Requests</a></li>
<li role="presentation"><a href="#" title="" role="tab" aria-selected="false">Branch Summary</a></li>
</ul>
</div>
{{!-- <ul class="tabs tabs--main">
<li id="tab_current" {{bind-attr class="view.classCurrent"}}>
<h5>
{{#if repo.slug}}
@ -99,3 +108,4 @@
</h5>
</li>
</ul>
--}}

View File

@ -1,4 +1,12 @@
<div id="tools">
<div class="dropdown dropdown--classic">
<button class="dropdown-button button" type=""><span class="icon icon--cog"></span> Settings <span class="icon icon-arrow-down"></span></button>
<ul id="tools" class="dropdown-menu">
<li><a href="#" title="">Settings</a></li>
<li><a href="#" title="">Requests</a></li>
</ul>
</div>
{{!-- <div id="tools">
<a href="#" {{action "menu" target=view}} class="menu-popup-button">Settings</a>
<ul class="menu">
@ -91,3 +99,4 @@ addons:
</li>
</ol>
</div>
--}}