Commit ff0f70c0 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Change length of connecting lines based on number of builds

parent cc8ad60f
(function() { (function() {
function addMarginToBuild () { function addMarginToBuild () {
const $secondChild = $('.build:nth-child(2)'); const $secondChildBuildNode = $('.build:nth-child(2)');
if ($secondChild.length) { const $firstChildBuildNode = $secondChildBuildNode.prev('.build');
$secondChild.closest('.stage-column').addClass('left-margin'); // const $previousBuildColumn = $secondChildBuildNode.closest('.stage-column').prev('.stage-column');
if ($secondChildBuildNode.length) {
$secondChildBuildNode.closest('.stage-column').addClass('left-margin');
$firstChildBuildNode.addClass('left-connector');
} }
} }
......
...@@ -303,11 +303,26 @@ ...@@ -303,11 +303,26 @@
.stage-column { .stage-column {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin-right: 48px;
&:not(:last-child) {
margin-right: 44px;
}
&.left-margin { &.left-margin {
&:not(:first-child) { &:not(:first-child) {
margin-left: 48px; margin-left: 44px;
.left-connector {
&::before {
content: '';
position: absolute;
top: 50%;
left: -48px;
border-top: 2px solid $border-color;
width: 48px;
height: 1px;
}
}
} }
} }
...@@ -348,7 +363,10 @@ ...@@ -348,7 +363,10 @@
} }
.build-content { .build-content {
width: 130px; width: 164px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.ci-status-text { .ci-status-text {
width: 110px; width: 110px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment