Skip to content

Commit 926f72f

Browse files
spezaSkarlso
authored andcommitted
Fix scaling of pipelines on overview (#73) (#128)
* Fix scaling of pipelines on overview (#73) * Fix scaling with custom grid container * Simplify grid-template-columns size
1 parent 8b312dd commit 926f72f

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

frontend/client/views/overview/index.vue

+18-21
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
2-
<div class="columns is-multiline">
2+
<div class="grid-container">
33
<template v-for="(pipeline, index) in pipelines">
4-
<div class="column is-one-third" :key="index" v-if="!pipeline.p.notvalid">
5-
<div class="pipeline-box notification content-article">
4+
<div :key="index" v-if="!pipeline.p.notvalid">
5+
<div class="notification pipeline-box content-article">
66
<div class="status-display-success" v-if="pipeline.r.status === 'success'"></div>
77
<div class="status-display-fail" v-else-if="pipeline.r.status === 'failed'"></div>
88
<div class="status-display-unknown" v-else></div>
@@ -14,9 +14,9 @@
1414
<div>
1515
<span class="subtitle">{{ pipeline.p.name }}</span>
1616
</div>
17-
</router-link>
17+
</router-link>
1818
<hr class="pipeline-hr">
19-
<div class="pipeline-info">
19+
<div>
2020
<i class="fa fa-hourglass"></i>
2121
<span style="color: #b1adad;">
2222
Duration:
@@ -38,7 +38,7 @@
3838
unknown
3939
</span><br />
4040
<div class="pipelinegrid-footer">
41-
<a class="button is-primary" @click="checkPipelineArgs(pipeline.p)" style="width: 250px;">
41+
<a class="button is-primary" @click="checkPipelineArgs(pipeline.p)" style="width: 100%;">
4242
<span class="icon">
4343
<i class="fa fa-play-circle"></i>
4444
</span>
@@ -52,7 +52,7 @@
5252
</template>
5353
<div v-if="pipelines.length == 0" class="no-pipelines-div">
5454
<span class="no-pipelines-text">No pipelines are available. Please create a pipeline first.</span>
55-
</div>
55+
</div>
5656
</div>
5757
</template>
5858

@@ -163,7 +163,14 @@ export default {
163163

164164
<style lang="scss">
165165
166-
.no-pipelines-div {
166+
.grid-container {
167+
display: grid;
168+
grid-template-columns: repeat(auto-fill, 400px);
169+
grid-row-gap: 10px;
170+
grid-column-gap: 10px;
171+
}
172+
173+
.no-pipelines-div {
167174
width: 100%;
168175
text-align: center;
169176
margin-top: 50px;
@@ -188,7 +195,7 @@ export default {
188195
189196
.status-display-success {
190197
@include status-display();
191-
background-color: rgb(49, 196, 49);
198+
background-color: rgb(49, 196, 49);
192199
}
193200
194201
.status-display-folder {
@@ -207,11 +214,11 @@ export default {
207214
}
208215
209216
.pipeline-box {
210-
width: 377px;
217+
padding-right: 20px;
211218
}
212219
213220
.outer-box {
214-
padding-left: 40px;
221+
padding-left: 40px;
215222
min-height: 170px;
216223
width: 100%;
217224
}
@@ -263,10 +270,6 @@ export default {
263270
}
264271
265272
.pipeline-hr {
266-
position: absolute;
267-
width: 325px;
268-
margin-left: -13px;
269-
margin-top: 18px;
270273
background-image: linear-gradient(
271274
to right,
272275
black 33%,
@@ -277,13 +280,7 @@ export default {
277280
background-repeat: repeat-x;
278281
}
279282
280-
.pipeline-info {
281-
padding-top: 33px;
282-
}
283-
284283
.pipelinegrid-footer {
285-
margin: auto;
286-
width: 82%;
287284
padding-top: 20px;
288285
}
289286

0 commit comments

Comments
 (0)