project blueprint - optional steps working

This commit is contained in:
isUnknown 2024-09-26 17:21:24 +02:00
parent 595c275100
commit 8da0fb0e36
30 changed files with 296 additions and 127 deletions

View file

@ -0,0 +1,153 @@
<template>
<article class="project-item | flex | rounded-2xl | px-32 py-32">
<hgroup>
<h3>{{ project.title }}</h3>
<p>
Dernière mise à jour le
<time :datetime="project.modified">{{ frenchFormattedModified }}</time>
</p>
</hgroup>
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
<ol class="project-steps" data-steps="1">
<li class="project-step" data-status="in-progress">
<span class="pill" data-icon="search">Votre Brief</span>
</li>
</ol>
</article>
</template>
<script setup>
import dayjs from "dayjs";
import "dayjs/locale/fr";
const { project } = defineProps({ project: Array });
dayjs.locale("fr");
const frenchFormattedModified = dayjs(project.modified).format(
"dddd D MMMM YYYY"
);
</script>
<style scoped>
.project-item {
--wrap: no-wrap;
background: var(--color-background);
}
.project-item hgroup {
flex: 1 1 0%;
}
.project-item h3 {
font-family: var(--font-serif);
font-size: var(--text-lg);
margin-bottom: var(--space-8);
}
.project-item p {
font-size: var(--text-sm);
line-height: var(--leading-sm);
}
.project-logo {
order: -1;
background: var(--color-grey-50);
color: var(--color-grey-400);
text-align: center;
line-height: 4.5rem;
width: 4.5rem;
height: 4.5rem;
}
.project-steps {
--color: var(--color-primary-100);
flex: 1 1 0%;
display: flex;
gap: var(--space-16);
margin-top: -2.75rem;
position: relative;
}
.project-steps[data-steps="1"]::after {
content: "étapes à venir";
font-size: var(--text-sm);
font-weight: 500;
width: 8rem;
position: absolute;
text-align: center;
color: var(--color-grey-700);
background: var(--color-background);
bottom: -2rem;
left: 50%;
transform: translate(-50%, -0.2em);
}
.project-step {
--color: var(--color-white);
position: relative;
flex: 1 1 0%;
text-align: center;
}
.project-step:last-child {
text-align: right;
}
.project-step:only-child,
.project-step:first-child {
text-align: left;
}
.project-step[data-status="in-progress"]:only-child::before,
.project-step[data-status="in-progress"]:only-child::after {
content: "";
display: inline-block;
height: 1.25rem;
position: absolute;
right: 3.75rem;
bottom: -2rem;
}
.project-step[data-status="in-progress"]:only-child::before {
height: 1rem;
background-repeat: repeat;
background-position: left center;
background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50%' cy='50%' r='4' opacity='0.15' fill='black'/%3E%3C/svg%3E%0A");
background-size: 0.75rem;
left: 5.5rem;
right: 5.5rem;
bottom: -1.875rem;
}
.project-step[data-status="in-progress"]:only-child::after {
--icon-size: 1.25rem;
width: var(--icon-size);
background: var(--color-grey-300);
mask-repeat: no-repeat;
mask-position: center;
mask-size: var(--icon-size);
mask-image: var(--icon-point);
right: 3.75rem;
bottom: -2rem;
}
.project-step .pill::after {
content: "";
display: inline-block;
width: var(--icon-size, 1.25rem);
height: var(--icon-size, 1.25rem);
background-color: var(--icon-color, var(--color-primary-100));
mask-repeat: no-repeat;
mask-position: center;
mask-size: var(--size, 1.25rem);
mask-image: var(--icon, var(--icon-point));
position: absolute;
bottom: -2rem;
}
.project-step[data-status="done"] > .pill,
.project-step[data-status="uncompleted"] > .pill {
--background: transparent;
}
.project-step[data-status="done"] .pill::after {
mask-image: var(--icon-check-3);
}
.project-step[data-status="in-progress"] .pill::after {
mask-image: var(--icon-point-active);
}
.project-step[data-status="uncompleted"] .pill::after {
--icon-color: var(--color-grey-300);
}
</style>

View file

@ -0,0 +1,37 @@
<template>
<section
class="flex-1"
aria-labelledby="votre-brief-label"
data-status="done"
>
<h2 id="votre-brief-label">
<span data-icon="votre-brief">Votre brief</span>
</h2>
<div class="cards | flow">
<article class="card">
<hgroup class="order-last">
<h3 class="card__title | font-serif | text-lg">Votre Brief</h3>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
</div>
<figure class="card__images" data-count="13">
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
</article>
</div>
</section>
</template>

View file

@ -0,0 +1,117 @@
<template>
<section class="h-full | flex flex-col" style="--row-gap: var(--space-32)">
<header
class="project-details | flex items-baseline | bg-white | rounded-2xl | p-16 | w-full"
>
<div class="project-details__description | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Description du projet</h2>
<textarea
name="description"
id="description"
placeholder="Ajoutez une description générale de votre projet…"
rows="3"
class="border border-grey-200 | rounded-xl | p-16 | w-full"
></textarea>
</div>
<div class="project-details__filters | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Filtrer par tags</h2>
<div class="flex" style="gap: var(--space-8)">
<button class="btn btn--sm btn--grey" id="all">Voir tout</button>
<button class="btn btn--sm btn--primary">Bouchon</button>
<button class="btn btn--sm btn--primary">Bouton Poussoir</button>
<button class="btn btn--sm btn--primary">Coloris & Nuances</button>
<button class="btn btn--sm btn--primary">DA Globale</button>
<button class="btn btn--sm btn--primary">Forme & Design</button>
<button class="btn btn--sm btn--primary">Matériaux & Textures</button>
<button class="btn btn--sm btn--primary">Parachèvements</button>
</div>
</div>
</header>
<!-- <div class="h-full | masonry">
<button
data-icon="upload"
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
>
Ajouter une ou plusieurs images
</button>
</div> -->
<div class="h-full | masonry">
<button
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
>
<FileUpload
name="demo[]"
url="/api/upload"
@upload="onAdvancedUpload($event)"
:multiple="true"
accept="image/*"
:maxFileSize="1000000"
>
<template #empty>
<span>Drag and drop files to here to upload.</span>
</template>
</FileUpload>
</button>
<Toast />
</div>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
</section>
</template>
<script setup>
import Toast from "primevue/toast";
import FileUpload from "primevue/fileupload";
import { useToast } from "primevue/usetoast";
const toast = useToast();
const onAdvancedUpload = () => {
toast.add({
severity: "info",
summary: "Success",
detail: "File Uploaded",
life: 3000,
});
};
</script>

View file

@ -0,0 +1,23 @@
<template>
<section class="h-full | grid-center">
<div
class="card | items-center | text-center | w-full max-w"
style="--row-gap: var(--space-32); --max-w: 27.5rem"
>
<h2 class="font-serif text-lg">Créez votre premier brief de projet !</h2>
<p class="text-grey-700">
Bienvenu à votre nouvel espace de projet. <br />Commencez par consulter
les inspirations <br />et partagez vos intentions !
</p>
<button
class="btn | w-full"
@click="emit('update:step', 'ModeSelection')"
>
Commencer
</button>
</div>
</section>
</template>
<script setup>
const emit = defineEmits(["update:step"]);
</script>

View file

@ -0,0 +1,99 @@
<template>
<section
class="h-full | flex flex-col justify-center items-center | mx-auto | max-w"
style="--max-w: 42rem; --row-gap: var(--space-32)"
>
<div class="flex">
<div
@click="emit('update:step', 'AddImages')"
class="card card--cta | flex-1 | h-full"
style="--padding: var(--space-32); --row-gap: var(--space-32)"
>
<svg
aria-hidden="true"
width="100"
height="100"
viewBox="0 0 100 100"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M92.8571 46.4292H64.2857C62.3133 46.4292 60.7143 48.0282 60.7143 50.0006V92.8577C60.7143 94.8302 62.3133 96.4292 64.2857 96.4292H92.8571C94.8296 96.4292 96.4286 94.8302 96.4286 92.8577V50.0006C96.4286 48.0282 94.8296 46.4292 92.8571 46.4292Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M92.8571 3.57202H64.2857C62.3133 3.57202 60.7143 5.171 60.7143 7.14345V21.5006C60.7143 23.473 62.3133 25.072 64.2857 25.072H92.8571C94.8296 25.072 96.4286 23.473 96.4286 21.5006V7.14345C96.4286 5.171 94.8296 3.57202 92.8571 3.57202Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M35.7143 3.57202H7.14284C5.17039 3.57202 3.57141 5.171 3.57141 7.14345V50.0006C3.57141 51.973 5.17039 53.572 7.14284 53.572H35.7143C37.6867 53.572 39.2857 51.973 39.2857 50.0006V7.14345C39.2857 5.171 37.6867 3.57202 35.7143 3.57202Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M35.7143 74.9291H7.14284C5.17039 74.9291 3.57141 76.5281 3.57141 78.5005V92.8577C3.57141 94.8301 5.17039 96.4291 7.14284 96.4291H35.7143C37.6867 96.4291 39.2857 94.8301 39.2857 92.8577V78.5005C39.2857 76.5281 37.6867 74.9291 35.7143 74.9291Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<h2 class="font-serif text-lg">Créer via la plateforme</h2>
<p class="text-sm text-grey-700">
Ajouter différents éléments tels que des images et du texte sur la
plateforme afin de créer votre brief.
</p>
</div>
<div
class="card card--cta | flex-1 | h-full"
style="--padding: var(--space-32); --row-gap: var(--space-32)"
>
<svg
aria-hidden="true"
width="100"
height="100"
viewBox="0 0 100 100"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.57153 75.0001V82.143C3.57153 85.9318 5.07663 89.5654 7.75572 92.2445C10.4348 94.9236 14.0684 96.4287 17.8572 96.4287H82.143C85.9318 96.4287 89.5654 94.9236 92.2445 92.2445C94.9236 89.5654 96.4287 85.9318 96.4287 82.143V75.0001M28.5715 28.5715L50.0001 3.57153M50.0001 3.57153L71.4287 28.5715M50.0001 3.57153V67.8573"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<h2 class="font-serif text-lg">Ajouter un pdf</h2>
<p class="text-sm text-grey-700">
Vous avez déjà constitué votre brief en amont et souhaitez directement
limporter.
</p>
</div>
</div>
<div
class="card | bg-grey-200 | items-center | text-center | w-full"
style="--padding: var(--space-32); --row-gap: var(--space-16)"
>
<h2 class="font-serif text-lg">Quest ce que le brief ?</h2>
<p class="text-sm text-grey-700">
Le brief est un outil créatif qui permet de définir les perspectives
esthétiques de votre projet. Il sagit dune planche dinspiration qui
aide à affirmer lambiance et les influences que vous souhaitez apporter
à votre projet.
</p>
</div>
</section>
</template>
<script setup>
const emit = defineEmits("update:step");
</script>