add some responsive styles to build timeline, revert in-progress pulsate animation

This commit is contained in:
Artem Zhukov 2015-12-11 23:16:43 +03:00
parent d8301794d6
commit 049270149d
4 changed files with 172 additions and 162 deletions

View File

@ -6,6 +6,8 @@
} }
} }
@animation-duration: 1.5s;
.builds { .builds {
&_item { &_item {
&:hover { &:hover {
@ -32,7 +34,6 @@
} }
&_buttons { &_buttons {
// margin-top: 8px;
transition: opacity 0.2s ease; transition: opacity 0.2s ease;
opacity: 0; opacity: 0;
} }
@ -58,21 +59,29 @@
position: relative; position: relative;
.builds { .builds {
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
&_header {
margin-bottom: 6px;
font-size: 18px;
}
&_progress {
padding: 3px 0;
}
&_item { &_item {
display: inline-block; margin: 4px 0;
vertical-align: top;
position: relative; position: relative;
width: 50%;
margin: 10px 0;
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
width: 24px;
height: 24px;
border-radius: 50%; border-radius: 50%;
background: @well-bg; background: @well-bg;
top: 25px; left: 0;
z-index: 1; z-index: 1;
} }
@ -86,6 +95,15 @@
&__in-progress { &__in-progress {
&:after { &:after {
background: @brand-info; background: @brand-info;
-webkit-animation: pulsate @animation-duration ease-out;
-webkit-animation-iteration-count: infinite;
-moz-animation: pulsate @animation-duration ease-out;
-moz-animation-iteration-count: infinite;
-o-animation: pulsate @animation-duration ease-out;
-o-animation-iteration-count: infinite;
animation: pulsate @animation-duration ease-out;
animation-iteration-count: infinite;
} }
} }
@ -107,132 +125,48 @@
} }
} }
} }
&_header {
margin-bottom: 6px;
font-size: 18px;
}
&_progress {
padding: 3px 0;
}
} }
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 50%;
bottom: 0; bottom: 0;
width: 2px; width: 2px;
margin-left: -1px; margin-left: -1px;
background: darken(@well-bg, 10%); background: darken(@well-bg, 10%);
} }
&-left { &-large {
.builds { .builds {
&_item { &_item {
&:nth-child(odd) { padding-left: 40px;
padding-right: 30px;
.builds { &:after {
&_inner { width: 24px;
border-right: 6px solid darken(@well-bg, 10%); height: 24px;
} top: 25px;
}
&:after {
right: -12px;
}
&:before {
right: 10px;
border-left-color: darken(@well-bg, 10%);
}
} }
&:nth-child(even) { &:before {
padding-left: 30px; left: 20px;
top: 50px; border-right-color: darken(@well-bg, 10%);
top: 25px;
.builds {
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
}
&:after {
left: -12px;
}
&:before {
left: 10px;
border-right-color: darken(@well-bg, 10%);
}
} }
} }
} }
}
&-right { &:after {
.builds { left: 12px;
&_item {
&:first-child {
margin-left: 50%;
}
&:nth-child(even) {
padding-right: 30px;
top: -50px;
.builds {
&_inner {
border-right: 6px solid darken(@well-bg, 10%);
}
}
&:after {
right: -12px;
}
&:before {
right: 10px;
border-left-color: darken(@well-bg, 10%);
}
}
&:nth-child(odd) {
padding-left: 30px;
.builds {
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
}
&:after {
left: -12px;
}
&:before {
left: 10px;
border-right-color: darken(@well-bg, 10%);
}
}
}
} }
} }
&-small { &-small {
.builds { .builds {
&_item { &_item {
display: block;
width: auto;
padding-left: 30px; padding-left: 30px;
margin-bottom: 4px;
&:after { &:after {
left: 0;
top: 16px; top: 16px;
height: 16px; height: 16px;
width: 16px; width: 16px;
@ -241,14 +175,10 @@
&:before { &:before {
left: 10px; left: 10px;
border-right-color: darken(@well-bg, 10%); border-right-color: darken(@well-bg, 10%);
top: 14px; top: 13px;
} }
} }
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
&_header { &_header {
font-size: 14px; font-size: 14px;
.make-xs-column(7); .make-xs-column(7);
@ -266,73 +196,160 @@
} }
&:after { &:after {
left: 9px; left: 8px;
} }
} }
} }
} }
@animation-duration: 1.5s; @media (min-width: @screen-sm-min) {
.builds {
&__timeline {
&-large {
.builds {
&_item {
padding-left: 0;
display: inline-block;
vertical-align: top;
width: 50%;
margin: 10px 0;
.status { &:after {
width: 25px; left: auto;
height: 25px; }
border-radius: 50%;
&__in-progress { &:before {
background: @brand-info; left: auto;
border-right-color: transparent;
}
}
-webkit-animation: pulsate @animation-duration ease-out; &_inner {
-webkit-animation-iteration-count: infinite; border-left: 0;
-moz-animation: pulsate @animation-duration ease-out; }
-moz-animation-iteration-count: infinite; }
-o-animation: pulsate @animation-duration ease-out;
-o-animation-iteration-count: infinite;
animation: pulsate @animation-duration ease-out;
animation-iteration-count: infinite;
}
&__done { &:after {
background: @link-color; left: 50%;
} }
}
&__error { &-left {
background: @brand-danger; .builds {
} &_item {
&:nth-child(odd) {
padding-right: 30px;
&__queued { .builds {
background: @brand-primary; &_inner {
} border-right: 6px solid darken(@well-bg, 10%);
}
}
&__small { &:after {
width: 10px; right: -12px;
height: 10px; }
&:before {
right: 10px;
border-left-color: darken(@well-bg, 10%);
}
}
&:nth-child(even) {
padding-left: 30px;
top: 50px;
.builds {
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
}
&:after {
left: -12px;
}
&:before {
left: 10px;
border-right-color: darken(@well-bg, 10%);
}
}
}
}
}
&-right {
.builds {
&_item {
&:first-child {
margin-left: 50%;
}
&:nth-child(even) {
padding-right: 30px;
top: -50px;
.builds {
&_inner {
border-right: 6px solid darken(@well-bg, 10%);
}
}
&:after {
right: -12px;
}
&:before {
right: 10px;
border-left-color: darken(@well-bg, 10%);
}
}
&:nth-child(odd) {
padding-left: 30px;
.builds {
&_inner {
border-left: 6px solid darken(@well-bg, 10%);
}
}
&:after {
left: -12px;
}
&:before {
left: 10px;
border-right-color: darken(@well-bg, 10%);
}
}
}
}
}
}
} }
} }
.pulsate-frames() { .pulsate-frames() {
.transform(@scaleX, @scaleY) { .transform(@scaleX, @scaleY) {
-webkit-transform: scale(@scaleX, @scaleY); opacity: 1; -webkit-transform: scale3d(@scaleX, @scaleY, 1);
-moz-transform: scale(@scaleX, @scaleY); opacity: 1; -moz-transform: scale3d(@scaleX, @scaleY, 1);
-ms-transform: scale(@scaleX, @scaleY); opacity: 1; -ms-transform: scale3d(@scaleX, @scaleY, 1);
-o-transform: scale(@scaleX, @scaleY); opacity: 1; -o-transform: scale3d(@scaleX, @scaleY, 1);
transform: scale(@scaleX, @scaleY); opacity: 1; transform: scale3d(@scaleX, @scaleY, 1);
} }
0% { 0% {
.transform(1.0, 1.0); .transform(1, 1);
}
25% {
opacity: 1.0;
} }
50% { 50% {
.transform(0.75, 0.75); .transform(0.75, 0.75);
} }
50% {
opacity: 1.0;
}
100% { 100% {
.transform(1.0, 1.0); .transform(1, 1);
} }
} }

View File

@ -3,10 +3,6 @@
.builds_item(key=item.id, class="builds_item__#{item.status}") .builds_item(key=item.id, class="builds_item__#{item.status}")
.builds_inner .builds_inner
.row .row
//- .builds_content
//- .builds_status
//- .status.status__small(class="status__#{item.status}")
.builds_header .builds_header
Link(to="build", params={id: item.id}) Link(to="build", params={id: item.id})
span build # span build #

View File

@ -17,9 +17,6 @@ mixin statusText(build)
.builds_inner .builds_inner
.row .row
.builds_header .builds_header
//- .builds_status
//- .status(class="status__#{build.status}")
if build.project if build.project
span span
Scm(scm=build.project.scm.type) Scm(scm=build.project.scm.type)

View File

@ -1,8 +1,8 @@
- var itemsCount = this.state.items.length; - var itemsCount = this.state.items.length;
.builds.builds__timeline(class="builds__timeline-#{itemsCount % 2 ? 'left' : 'right'}") if itemsCount
if itemsCount .builds.builds__timeline.builds__timeline-large(class="builds__timeline-#{itemsCount % 2 ? 'left' : 'right'}")
each build, index in this.state.items each build, index in this.state.items
Item(build=build, key=build.id) Item(build=build, key=build.id)
else else
p Build history is empty p Build history is empty