Fix kanban cards style #6

This commit is contained in:
Timothée Goguely 2024-11-19 15:55:27 +01:00
parent 3e57a4bdc9
commit b0c04e277a
2 changed files with 76 additions and 77 deletions

View file

@ -11,6 +11,9 @@
row-gap: var(--row-gap); row-gap: var(--row-gap);
} }
.card__title {
position: initial;
}
.card__title > a { .card__title > a {
font: inherit; font: inherit;
color: currentColor; color: currentColor;
@ -26,7 +29,7 @@
position: relative; position: relative;
width: 100%; width: 100%;
border: 4px solid var(--color-grey-50); border: 4px solid var(--color-grey-50);
border-radius: var(--rounded-2xl); border-radius: var(--rounded-lg);
overflow: hidden; overflow: hidden;
margin-bottom: var(--space-16); margin-bottom: var(--space-16);
aspect-ratio: 408/220; aspect-ratio: 408/220;

View file

@ -6,9 +6,10 @@
</h2> </h2>
<div class="cards | flow"> <div class="cards | flow">
<article class="card" v-if="step.id !== 'proposal'"> <article class="card" v-if="step.id !== 'proposal'">
<router-link :to="'/' + step.uri">
<hgroup class="order-last"> <hgroup class="order-last">
<h3 class="card__title | font-serif | text-lg">{{ step.label }}</h3> <h3 class="card__title | font-serif | text-lg">
<router-link :to="'/' + step.uri" class="link-full">{{ step.label }}</router-link>
</h3>
</hgroup> </hgroup>
<div class="card__meta | flex"> <div class="card__meta | flex">
<time <time
@ -17,7 +18,6 @@
>{{ dayjs(step.modified).format("DD MMMM YYYY") }}</time >{{ dayjs(step.modified).format("DD MMMM YYYY") }}</time
> >
</div> </div>
<!-- All images --> <!-- All images -->
<figure <figure
v-if="step.id.includes('Brief') && step.files[0]?.type === 'image'" v-if="step.id.includes('Brief') && step.files[0]?.type === 'image'"
@ -33,7 +33,6 @@
:alt="image.alt" :alt="image.alt"
/> />
</figure> </figure>
<!-- First image --> <!-- First image -->
<figure v-if="step.id === 'virtualSample'" class="card__images"> <figure v-if="step.id === 'virtualSample'" class="card__images">
<img <img
@ -42,20 +41,17 @@
:alt="step.files[0].alt" :alt="step.files[0].alt"
/> />
</figure> </figure>
<!-- Document --> <!-- Document -->
<div <div
v-if="step.files[0]?.type === 'document'" v-if="step.files[0]?.type === 'document'"
class="card__images" class="card__images"
data-icon="document" data-icon="document"
></div> ></div>
<footer v-if="step?.files[0]?.comments?.length > 0" class="order-last | text-sm text-primary font-medium">
<footer v-if="step?.files[0]?.comments?.length > 0">
{{ step.files[0].comments.length }} commentaire{{ {{ step.files[0].comments.length }} commentaire{{
step.files[0].comments.length > 1 ? "s" : "" step.files[0].comments.length > 1 ? "s" : ""
}} }}
</footer> </footer>
</router-link>
</article> </article>
<template v-if="step.id == 'proposal' && step.files.length"> <template v-if="step.id == 'proposal' && step.files.length">
@ -64,12 +60,11 @@
v-for="(file, index) in step.files" v-for="(file, index) in step.files"
:key="file.name" :key="file.name"
> >
<router-link :to="'/' + step.uri + '&fileIndex=' + index">
<hgroup class="order-last"> <hgroup class="order-last">
<h3 class="card__title | font-serif | text-lg"> <h3 class="card__title | font-serif | text-lg">
{{ <router-link :to="'/' + step.uri + '&fileIndex=' + index" class="link-full">
file.label.length ? file.label : file.name.replace(".pdf", "") {{ file.label.length ? file.label : file.name.replace(".pdf", "") }}
}} </router-link>
</h3> </h3>
</hgroup> </hgroup>
<div class="card__meta | flex"> <div class="card__meta | flex">
@ -84,13 +79,11 @@
class="card__images" class="card__images"
data-icon="document" data-icon="document"
></div> ></div>
<footer v-if="file.comments?.length > 0" class="order-last | text-sm text-primary font-medium">
<footer v-if="file.comments?.length > 0">
{{ file.comments.length }} commentaire{{ {{ file.comments.length }} commentaire{{
file.comments.length > 1 ? "s" : "" file.comments.length > 1 ? "s" : ""
}} }}
</footer> </footer>
</router-link>
</article> </article>
</template> </template>
</div> </div>
@ -149,6 +142,9 @@ function setStatus() {
max-height: calc(100% - var(--header-height)); max-height: calc(100% - var(--header-height));
overflow-y: auto; overflow-y: auto;
} }
.kanban .card {
row-gap: 0;
}
.kanban > section h2 { .kanban > section h2 {
position: relative; position: relative;