add pdf-cover

This commit is contained in:
isUnknown 2024-11-28 16:56:55 +01:00
parent bd95cf4613
commit 7cc2b2a9e8
19 changed files with 119 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,17 @@
Description:
----
Tags:
----
Sort: 2
----
Uuid: sXCMFnDdsxSwONdI
----
Template: image

View file

@ -2,7 +2,7 @@ Description:
---- ----
Tags: Tags: bouton poussoir
---- ----

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

View file

@ -0,0 +1,17 @@
Description:
----
Tags: forme & design
----
Sort: 7
----
Uuid: BK2esNJ3pyPfL1fH
----
Template: image

View file

@ -18,6 +18,9 @@ Moodboard:
- file://o5O69A12RBr8N7L0 - file://o5O69A12RBr8N7L0
- file://wtE4h2yC4VQVl6IL - file://wtE4h2yC4VQVl6IL
- file://BK2esNJ3pyPfL1fH
- file://HtVg8Gk0NaJWlfqa
- file://sXCMFnDdsxSwONdI
---- ----

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

View file

@ -0,0 +1,17 @@
Description:
----
Tags:
----
Sort: 8
----
Uuid: HtVg8Gk0NaJWlfqa
----
Template: image

View file

@ -1,5 +1,38 @@
Comments: Comments:
-
location:
page:
uri: >
projects/miss-dior-blooming-bouquet/proposal
title: Offre commerciale
href: '/projects/miss-dior-blooming-bouquet?dialog=proposal&fileIndex=0'
project:
title: Miss Dior Blooming Bouquet
uri: projects/miss-dior-blooming-bouquet
file:
uuid: file://3vTh1tMFeFM2JxaN
url: file://3vTh1tMFeFM2JxaN
position:
pageIndex: 1
x: '60.110185093015'
y: '44.594594594595'
replies: [ ]
text: test
author:
name: Adrien Payet
email: adrien.payet@outlook.com
uuid: user://WWjXgPWk
role: admin
date: 2024-11-28T16:30:56+01:00
id: m41h238q
type: comment
isRead: false
----
Cover: - file://wS6ILTHIDQb1DHJN
---- ----
Label: Offre n°2 Label: Offre n°2

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,5 @@
Uuid: wS6ILTHIDQb1DHJN
----
Template: pdf-cover

View file

@ -0,0 +1,6 @@
title: Image
accept:
mime: image/*
type: image
focus: false

View file

@ -7,6 +7,14 @@ focus: false
fields: fields:
comments: comments:
type: hidden type: hidden
cover:
label: Image de couverture
type: files
multiple: false
width: 1/3
layout: cards
uploads: pdf-cover
label: label:
label: Nom label: Nom
type: text type: text
width: 1/3

View file

@ -41,11 +41,11 @@ tabs:
label: Verre brut label: Verre brut
type: files type: files
multiple: false multiple: false
template: pdf uploads: pdf
finishedGlass: finishedGlass:
label: Verre parachevé label: Verre parachevé
type: files type: files
mutliple: false mutliple: false
template: pdf uploads: pdf
stepName: stepName:
type: hidden type: hidden

View file

@ -17,6 +17,7 @@ function getFileData($file) {
if($file->extension() == "pdf") { if($file->extension() == "pdf") {
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : []; $data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
$data['cover'] = $file->cover()->exists() && $file->cover()->isNotEmpty() ? $file->cover()->toFile()->resize(576)->url() : false;
} }
return $data; return $data;

View file

@ -5,7 +5,6 @@
:data-status="setStatus(page.steps, page.content.currentstep, step)" :data-status="setStatus(page.steps, page.content.currentstep, step)"
> >
<h2 :id="step.id"> <h2 :id="step.id">
<!-- ADRIEN / TIMOTHÉE : DYNAMISER L'ICONE -->
<span :data-icon="step.id">{{ step.label }}</span> <span :data-icon="step.id">{{ step.label }}</span>
</h2> </h2>
<div class="cards | flow"> <div class="cards | flow">
@ -125,11 +124,12 @@
>{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time >{{ dayjs(file.modified).format("DD MMMM YYYY") }}</time
> >
</div> </div>
<div <template v-if="index === 0">
v-if="index === 0" <figure v-if="file.cover" class="card__images pdf-cover">
class="card__images" <img :src="file.cover" alt="" />
data-icon="document" </figure>
></div> <div v-else class="card__images" data-icon="document"></div>
</template>
<footer <footer
v-if="file.comments?.length > 0" v-if="file.comments?.length > 0"
class="order-last | text-sm text-primary font-medium" class="order-last | text-sm text-primary font-medium"

View file

@ -40,7 +40,7 @@
v-model="localSelectedTags" v-model="localSelectedTags"
/> />
<label class="btn btn--sm btn--primary" :for="`${tag}`">{{ <label class="btn btn--sm btn--primary" :for="`${tag}`">{{
StringUtils.toPascalCase(tag) tag
}}</label> }}</label>
</template> </template>
</div> </div>