Skip to content

Commit b0579b3

Browse files
committed
feature(3331): card image refactor
Signed-off-by: Luutzen Dijkstra <[email protected]>
1 parent 2f66eb9 commit b0579b3

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/components/cards/CardCover.vue

+2-8
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
<template>
77
<div v-if="cardId && ( attachments.length > 0 )" class="card-cover">
8-
<div v-for="(attachment, index) in attachments"
8+
<div v-for="attachment in attachments"
99
:key="attachment.id"
10-
:class="['image-wrapper', { 'rounded-left': index === 0 }, { 'rounded-right': index === attachments.length - 1 }]"
10+
class="image-wrapper"
1111
:style="{ backgroundImage: `url(${attachmentPreview(attachment)})` }" />
1212
</div>
1313
</template>
@@ -76,12 +76,6 @@ export default {
7676
background-size: cover;
7777
background-repeat: no-repeat;
7878
background-position: center center;
79-
&.rounded-left {
80-
border-top-left-radius: calc(var(--border-radius-large) - 1px);
81-
}
82-
&.rounded-right {
83-
border-top-right-radius: calc(var(--border-radius-large) - 1px);
84-
}
8579
}
8680
}
8781
</style>

src/components/cards/CardItem.vue

+1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ export default {
307307
display: flex;
308308
flex-direction: column;
309309
gap: $card-gap;
310+
overflow: hidden;
310311

311312
&:deep(*) {
312313
cursor: pointer;

src/css/variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
$card-max-width: 300px;
77
$card-padding: calc(var(--default-grid-baseline) * 2) calc(var(--default-grid-baseline) * 2) var(--default-grid-baseline);
88
$card-gap: calc(var(--default-grid-baseline) * 3);
9-
$card-image-margin: calc(var(--default-grid-baseline) * -1);
9+
$card-image-margin: calc(var(--default-grid-baseline) * -2);
1010
$stack-gap: calc(var(--default-grid-baseline) * 3);
1111
$board-gap: calc(var(--default-grid-baseline) * 4);

0 commit comments

Comments
 (0)