proposal step : handle multiple files
This commit is contained in:
parent
9ade34e6ea
commit
86d3f8b22c
7 changed files with 119 additions and 31 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<section class="flex-1" :aria-labelledby="step.id" :data-status="status">
|
||||
<router-link :to="'/' + step.uri">
|
||||
<h2 :id="step.id">
|
||||
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
||||
<span :data-icon="step.id">{{ step.label }}</span>
|
||||
</h2>
|
||||
<div class="cards | flow">
|
||||
<article v-if="step.id !== 'proposal'" class="card">
|
||||
<h2 :id="step.id">
|
||||
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
|
||||
<span :data-icon="step.id">{{ step.label }}</span>
|
||||
</h2>
|
||||
<div class="cards | flow">
|
||||
<article class="card" v-if="step.id !== 'proposal'">
|
||||
<router-link :to="'/' + step.uri">
|
||||
<hgroup class="order-last">
|
||||
<h3 class="card__title | font-serif | text-lg">{{ step.label }}</h3>
|
||||
</hgroup>
|
||||
|
|
@ -57,10 +57,16 @@
|
|||
step.files[0].comments.length > 1 ? "s" : ""
|
||||
}}
|
||||
</footer>
|
||||
</article>
|
||||
</router-link>
|
||||
</article>
|
||||
|
||||
<template v-if="step.id == 'proposal' && step.files.length">
|
||||
<article class="card" v-for="file in step.files">
|
||||
<template v-if="step.id == 'proposal' && step.files.length">
|
||||
<article
|
||||
class="card"
|
||||
v-for="(file, index) in step.files"
|
||||
:key="file.name"
|
||||
>
|
||||
<router-link :to="'/' + step.uri + '&fileIndex=' + index">
|
||||
<hgroup class="order-last">
|
||||
<h3 class="card__title | font-serif | text-lg">
|
||||
{{
|
||||
|
|
@ -75,17 +81,21 @@
|
|||
>{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time
|
||||
>
|
||||
</div>
|
||||
<div class="card__images" data-icon="document"></div>
|
||||
<div
|
||||
v-if="index === 0"
|
||||
class="card__images"
|
||||
data-icon="document"
|
||||
></div>
|
||||
|
||||
<footer v-if="file.comments?.length > 0">
|
||||
{{ file.comments.length }} commentaire{{
|
||||
file.comments.length > 1 ? "s" : ""
|
||||
}}
|
||||
</footer>
|
||||
</article>
|
||||
</template>
|
||||
</div>
|
||||
</router-link>
|
||||
</router-link>
|
||||
</article>
|
||||
</template>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue